-
+
+
+
+
+
-
+
diff --git a/front/ui-docs/components/ui/modal.md b/front/ui-docs/components/ui/modal.md
index 261dcb65a..2e73cdaa8 100644
--- a/front/ui-docs/components/ui/modal.md
+++ b/front/ui-docs/components/ui/modal.md
@@ -22,6 +22,8 @@ const isOpen5 = ref(false)
const isOpen6 = ref(false)
const isOpen7 = ref(false)
const isOpen8 = ref(false)
+const isOpen9 = ref(false)
+const isOpen10 = ref(false)
@@ -59,7 +61,7 @@ import Modal from "~/components/ui/Modal.vue";
-## Modal actions
+## Add actions
Use the `#actions` slot to add actions to a modal. Actions typically take the form of [buttons](./button).
@@ -76,10 +78,7 @@ Make sure to add `autofocus` to the preferred button.
Modal content
-
-
+
@@ -94,10 +93,8 @@ Make sure to add `autofocus` to the preferred button.
Modal content
-
-
@@ -106,6 +103,34 @@ Make sure to add `autofocus` to the preferred button.
+### Add a cancel button
+
+All modals can be closed so it makes sense to add a `cancel` button. Note that `Modal` also implements the `ESC` shortcut by default.
+
+The `cancel` prop accepts a string and will add a cancel button.
+
+Note that the Cancel button has `autofocus`. If you want another button to auto-focus, implement the Cancel button manually inside the `#action` slot.
+
+## Add elements to the top left corner
+
+Use this slot for indicators such as the user's photo.
+
+
+ Open modal
+
+
+ Modal content
+
+
+
+
+
+
+ Ok
+
+
+
+
## Alert inside modal
You can nest [Funkwhale alerts](./alert) to visually highlight content within the modal.
@@ -117,7 +142,7 @@ You can nest [Funkwhale alerts](./alert) to visually highlight content within th
Open modal
-
+
Modal content
@@ -139,7 +164,7 @@ You can nest [Funkwhale alerts](./alert) to visually highlight content within th
>
Open modal
-
+
Modal content
@@ -150,9 +175,6 @@ You can nest [Funkwhale alerts](./alert) to visually highlight content within th
-
- Cancel
-
Ok
@@ -162,123 +184,6 @@ You can nest [Funkwhale alerts](./alert) to visually highlight content within th
-# Destructive Modal
-
-The `destructive` prop is used to visually indicate a potentially dangerous or irreversible action. When set to `true`, the modal will have a distinctive red styling to draw the user's attention and highlight the critical nature of the action.
-
-| Prop | Data type | Required? | Default | Description |
-| ------------- | --------- | --------- | ------- | ---------------------------------------------------- |
-| `destructive` | `true` | No | `false` | Applies a red styling to emphasize dangerous actions |
-
-
-
-```vue-html
-
- Dangerous action consequences
-
-```
-
-
-
-
-
-### Styling Effects
-
-When the `destructive` prop is set to `true`, the modal will:
-
-- Add a red border
-- Style the title in red
-
-To visually distinguish the modal from standard modals
-
-### Best Practices
-
-- Use the `destructive` prop sparingly
-- Clearly explain the consequences of the action unsing ``
-- Provide a clear way to cancel the action
-- Use descriptive action button labels
-
-The example in the "Confirm a dangerous action" section demonstrates the recommended usage of the destructive modal.
-
-
-
-```vue-html
-
-
-
- Detailed consequences of the action
-
-
-
-
-
- Cancel
-
-
- Confirm Deletion
-
-
-
-```
-
-
-
- Delete my account
-
-
-
-
- Detailed consequences of the action
-
-
-
-
- Cancel
-
-
- Confirm Deletion
-
-
-
-
-
-
-
## Confirm a dangerous action
Note that confirmation dialogs interrupt the user's workflow. Consider adding a recovery functionality such as "undo" instead.
@@ -298,55 +203,88 @@ Note that confirmation dialogs interrupt the user's workflow. Consider adding a
:::
+### Destructive Modal
+
+The `destructive` prop is used to visually indicate a potentially dangerous or irreversible action. When set to `true`, the modal will have a distinctive red styling to draw the user's attention and highlight the critical nature of the action.
+
+| Prop | Data type | Required? | Default | Description |
+| ------------- | --------- | --------- | ------- | ---------------------------------------------------- |
+| `destructive` | `true` | No | `false` | Applies a red styling to emphasize dangerous actions |
+
+### Styling Effects
+
+When the `destructive` prop is set to `true`, the modal will:
+
+- Add a red border
+- Style the title in red
+
+To visually distinguish the modal from standard modals
+
+### Best Practices
+
+- Use the `destructive` prop sparingly
+- Clearly explain the consequences of the action unsing ``
+- Provide a clear way to cancel the action. If you use the `cancel` prop, the Cancel button will have autofocus, preventing accidental confirmation.
+- Use descriptive action button labels
+
+The example in the "Confirm a dangerous action" section demonstrates the recommended usage of the destructive modal.
+
```vue-html
-
- Delete my account ...
+
+Delete my account
-
-
+
-1 082 music files that you uploaded will be deleted.
-7 879 items in your collections will be unlinked.
+ Detailed consequences of the action
-Do you want to delete your account forever?
-
-You will not be able to restore your account.
-
- Keep my account
-
-
- I understand. Delete my account now!
+
+ Confirm Deletion
```
-
-Delete my account ...
+
+Delete my account
-
-
-
-1 082 music files that you uploaded will be deleted.
-7 879 items in your collections will be unlinked.
-
-
-Do you want to delete your account forever?
-
-You will not be able to restore your account.
-
-
-Keep my account
-
-
-I understand. Delete my account now!
-
-
+
+
+
+ Detailed consequences of the action
+
+
+
+
+ Confirm Deletion
+
+
@@ -391,3 +329,47 @@ primary
+
+## Responsivity
+
+### Designing for small screens
+
+On slim phones, the content may only be 260px wide (Galaxy S5). Make sure the content wraps accordingly.
+
+### Long, scrolling content
+
+Consider using an indicator such as a line or a shadow to convey that there is content below the fold.
+
+```vue-html
+
+ Open modal
+
+
+ Nested modal content
+
+