From 796c933fb800dce90b2dd93fea33de6129fae875 Mon Sep 17 00:00:00 2001 From: Ben <45583362+ben-basten@users.noreply.github.com> Date: Mon, 8 Apr 2024 21:02:09 +0000 Subject: [PATCH] feat(web,a11y): standardize the FullScreenModal UI (#8566) * feat(web,a11y): standardize the FullScreenModal look * consistent header, padding, close button, and radius as BaseModal * vertically stacking ConfirmDialogue CTA buttons in narrow screens * adding aria-modal tags for screen reader * add viewport-specific height limits on modals, to enable scrolling * prevent focus from being hidden under sticky content in modals * standardize FullScreenModal widths using a Prop * wip: consistent padding with header * fix: alignment on "create user" and "edit user" modals * fix: horizontal modal content alignment * fix: create user CTA buttons * chore: remove unnecessary warning --------- Co-authored-by: Jason Rasmussen --- ....svelte => delete-confirm-dialogue.svelte} | 3 +- .../admin-page/jobs/jobs-panel.svelte | 1 + ...dialoge.svelte => restore-dialogue.svelte} | 3 +- .../settings/confirm-disable-login.svelte | 2 +- .../album-page/album-options.svelte | 101 +++++----- .../components/album-page/albums-list.svelte | 5 +- .../album-page/share-info-modal.svelte | 6 +- .../faces-page/merge-face-selector.svelte | 1 + .../faces-page/merge-suggestion-modal.svelte | 161 ++++++++-------- .../faces-page/set-birth-date-modal.svelte | 54 +++--- .../lib/components/forms/api-key-form.svelte | 36 ++-- .../components/forms/api-key-secret.svelte | 40 ++-- .../components/forms/create-user-form.svelte | 94 +++++----- .../components/forms/edit-album-form.svelte | 56 +++--- .../components/forms/edit-user-form.svelte | 130 ++++++------- .../library-exclusion-pattern-form.svelte | 79 ++++---- .../forms/library-import-path-form.svelte | 60 +++--- .../forms/library-import-paths-form.svelte | 4 +- .../forms/library-scan-settings-form.svelte | 2 +- .../forms/library-user-picker-form.svelte | 39 ++-- .../map-page/map-settings-modal.svelte | 174 +++++++++--------- .../actions/remove-from-album.svelte | 1 + .../actions/remove-from-shared-link.svelte | 3 +- .../photos-page/delete-asset-dialog.svelte | 3 +- .../shared-components/base-modal.svelte | 27 +-- .../shared-components/change-date.svelte | 4 +- .../shared-components/change-location.svelte | 6 +- .../shared-components/confirm-dialogue.svelte | 47 ++--- .../full-screen-modal.svelte | 51 ++++- .../shared-components/modal-header.svelte | 40 ++++ .../navigation-bar/avatar-selector.svelte | 32 +--- .../shared-components/show-shortcuts.svelte | 99 +++++----- .../version-announcement-box.svelte | 44 ++--- .../lib/components/slideshow-settings.svelte | 43 ++--- .../user-settings-page/device-list.svelte | 2 + .../partner-settings.svelte | 1 + .../user-api-key-list.svelte | 6 +- .../(user)/albums/[albumId]/+page.svelte | 1 + web/src/routes/(user)/people/+page.svelte | 44 ++--- .../(user)/sharing/sharedlinks/+page.svelte | 3 +- web/src/routes/(user)/trash/+page.svelte | 3 +- .../admin/library-management/+page.svelte | 1 + .../routes/admin/user-management/+page.svelte | 90 +++++---- 43 files changed, 749 insertions(+), 853 deletions(-) rename web/src/lib/components/admin-page/{delete-confirm-dialoge.svelte => delete-confirm-dialogue.svelte} (97%) rename web/src/lib/components/admin-page/{restore-dialoge.svelte => restore-dialogue.svelte} (95%) create mode 100644 web/src/lib/components/shared-components/modal-header.svelte diff --git a/web/src/lib/components/admin-page/delete-confirm-dialoge.svelte b/web/src/lib/components/admin-page/delete-confirm-dialogue.svelte similarity index 97% rename from web/src/lib/components/admin-page/delete-confirm-dialoge.svelte rename to web/src/lib/components/admin-page/delete-confirm-dialogue.svelte index 3abc07502e..fb4fd35fc3 100644 --- a/web/src/lib/components/admin-page/delete-confirm-dialoge.svelte +++ b/web/src/lib/components/admin-page/delete-confirm-dialogue.svelte @@ -42,7 +42,8 @@ dispatch('cancel')} diff --git a/web/src/lib/components/admin-page/jobs/jobs-panel.svelte b/web/src/lib/components/admin-page/jobs/jobs-panel.svelte index 15b91c98b0..0d01e2c3e4 100644 --- a/web/src/lib/components/admin-page/jobs/jobs-panel.svelte +++ b/web/src/lib/components/admin-page/jobs/jobs-panel.svelte @@ -147,6 +147,7 @@ {#if confirmJob} (confirmJob = null)} diff --git a/web/src/lib/components/admin-page/restore-dialoge.svelte b/web/src/lib/components/admin-page/restore-dialogue.svelte similarity index 95% rename from web/src/lib/components/admin-page/restore-dialoge.svelte rename to web/src/lib/components/admin-page/restore-dialogue.svelte index b98932f829..44edb1e7aa 100644 --- a/web/src/lib/components/admin-page/restore-dialoge.svelte +++ b/web/src/lib/components/admin-page/restore-dialogue.svelte @@ -28,7 +28,8 @@ void; - +

Are you sure you want to disable all login methods? Login will be completely disabled.

diff --git a/web/src/lib/components/album-page/album-options.svelte b/web/src/lib/components/album-page/album-options.svelte index 43ac29e700..e0d11b3b22 100644 --- a/web/src/lib/components/album-page/album-options.svelte +++ b/web/src/lib/components/album-page/album-options.svelte @@ -1,10 +1,8 @@ - dispatch('close')}> -
-
-
-
-

Options

+ dispatch('close')}> +
+
+

SETTINGS

+
+ {#if order} + + {/if} + dispatch('toggleEnableActivity')} + /> +
+
+
+
PEOPLE
+
+ +
- dispatch('close')} /> +
+
{user.name}
+
Owner
- -
-
-

SETTINGS

-
- {#if order} - - {/if} - dispatch('toggleEnableActivity')} - /> + {#each album.sharedUsers as user (user.id)} +
+
+
+
{user.name}
-
-
PEOPLE
-
- -
-
- -
-
{user.name}
-
Owner
-
- {#each album.sharedUsers as user (user.id)} -
-
- -
-
{user.name}
-
- {/each} -
-
-
+ {/each}
diff --git a/web/src/lib/components/album-page/albums-list.svelte b/web/src/lib/components/album-page/albums-list.svelte index 749be7e750..12b55cc0c9 100644 --- a/web/src/lib/components/album-page/albums-list.svelte +++ b/web/src/lib/components/album-page/albums-list.svelte @@ -432,7 +432,7 @@ {#if allowEdit} {#if albumToEdit} - (albumToEdit = null)}> + (albumToEdit = null)}> (albumToEdit = null)} /> {/if} @@ -458,7 +458,8 @@ {#if albumToDelete} (albumToDelete = null)} diff --git a/web/src/lib/components/album-page/share-info-modal.svelte b/web/src/lib/components/album-page/share-info-modal.svelte index b96974e0e3..01a5a0a234 100644 --- a/web/src/lib/components/album-page/share-info-modal.svelte +++ b/web/src/lib/components/album-page/share-info-modal.svelte @@ -121,7 +121,8 @@ {#if selectedRemoveUser && selectedRemoveUser?.id === currentUser?.id} - dispatch('close')}> -
-
-
-

- Merge People - {title} -

-
- dispatch('close')} /> + dispatch('close')}> +
+ {#if !choosePersonToMerge} +
+ +
+
+ ([personMerge1, personMerge2] = [personMerge2, personMerge1])} + /> +
+ + + {:else} +
+
+ +
+
+
+ {#each potentialMergePeople as person (person.id)} +
+ +
+ {/each} +
+ {/if} +
-
- {#if !choosePersonToMerge} -
- -
-
- ([personMerge1, personMerge2] = [personMerge2, personMerge1])} - /> -
- - - {:else} -
-
- -
-
-
- {#each potentialMergePeople as person (person.id)} -
- -
- {/each} -
-
-
- {/if} -
- -
-

Are these the same person?

-
-
-

They will be merged together

-
-
- - -
-
+
+

Are these the same person?

+
+
+

They will be merged together

+
+
+ +
diff --git a/web/src/lib/components/faces-page/set-birth-date-modal.svelte b/web/src/lib/components/faces-page/set-birth-date-modal.svelte index bfd71206c0..bb715997ec 100644 --- a/web/src/lib/components/faces-page/set-birth-date-modal.svelte +++ b/web/src/lib/components/faces-page/set-birth-date-modal.svelte @@ -3,7 +3,6 @@ import Button from '../elements/buttons/button.svelte'; import FullScreenModal from '../shared-components/full-screen-modal.svelte'; import { mdiCake } from '@mdi/js'; - import Icon from '$lib/components/elements/icon.svelte'; import DateInput from '../elements/date-input.svelte'; export let birthDate: string; @@ -21,36 +20,27 @@ }; - -
-
- -

Set date of birth

- -

- Date of birth is used to calculate the age of this person at the time of a photo. -

-
- -
handleSubmit()} autocomplete="off"> -
- -
-
- - -
-
+ +
+

+ Date of birth is used to calculate the age of this person at the time of a photo. +

+ +
handleSubmit()} autocomplete="off"> +
+ +
+
+ + +
+
diff --git a/web/src/lib/components/forms/api-key-form.svelte b/web/src/lib/components/forms/api-key-form.svelte index 15d2aefc66..d65c51aa5e 100644 --- a/web/src/lib/components/forms/api-key-form.svelte +++ b/web/src/lib/components/forms/api-key-form.svelte @@ -1,5 +1,4 @@ - -
-
- -

- {title} -

+ +
+
+ +
- -
- - -
- -
- - -
-
-
+
+ + +
+ diff --git a/web/src/lib/components/forms/api-key-secret.svelte b/web/src/lib/components/forms/api-key-secret.svelte index b5ed9550f6..5c4d4d62c1 100644 --- a/web/src/lib/components/forms/api-key-secret.svelte +++ b/web/src/lib/components/forms/api-key-secret.svelte @@ -1,5 +1,4 @@ - -
-
- -

API Key

+ handleDone()}> +
+

+ This value will only be shown once. Please be sure to copy it before closing the window. +

+
-

- This value will only be shown once. Please be sure to copy it before closing the window. -

-
+
+ +