From 8d515adac517c4871b33fba48cf37e25580e96e3 Mon Sep 17 00:00:00 2001 From: Ben <45583362+ben-basten@users.noreply.github.com> Date: Wed, 25 Sep 2024 12:04:53 -0400 Subject: [PATCH] feat(web): fixed combobox positioning (#12848) * fix(web): modal sticky bottom scrolling * chore: minor styling tweaks * wip: add portal so modals show on Safari in detail panel * feat: fixed position dropdown menu * chore: refactoring and cleanup * feat: zooming and virtual keyboard working for iPadOS/Safari * Revert "feat: zooming and virtual keyboard working for iPadOS/Safari" This reverts commit cac29bac0df9112cec1d4c66af82dd343081e08a. * wip: minor code cleanup * wip: recover from visual viewport changes * wip: ease in a little more visualviewport magic * wip: code cleanup * fix: only show dropdown above when viewport is zoomed out * fix: code review suggestions for code style Co-authored-by: Daniel Dietzler <36593685+danieldietzler@users.noreply.github.com> * fix: better variable naming * chore: better documentation for the bottom breakpoint --------- Co-authored-by: Daniel Dietzler <36593685+danieldietzler@users.noreply.github.com> --- .../asset-viewer/detail-panel-tags.svelte | 5 +- .../asset-viewer/detail-panel.svelte | 15 ++- .../shared-components/combobox.svelte | 116 +++++++++++++++++- .../full-screen-modal.svelte | 22 ++-- web/src/lib/i18n/en.json | 2 +- 5 files changed, 134 insertions(+), 26 deletions(-) diff --git a/web/src/lib/components/asset-viewer/detail-panel-tags.svelte b/web/src/lib/components/asset-viewer/detail-panel-tags.svelte index 434682f73ec27..449f61183fb33 100644 --- a/web/src/lib/components/asset-viewer/detail-panel-tags.svelte +++ b/web/src/lib/components/asset-viewer/detail-panel-tags.svelte @@ -1,6 +1,7 @@ +
{#if isOpen} @@ -228,7 +334,7 @@ role="option" aria-selected={selectedIndex === 0} aria-disabled={true} - class="text-left w-full px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-700 cursor-default aria-selected:bg-gray-100 aria-selected:dark:bg-gray-700" + class="text-left w-full px-4 py-2 hover:bg-gray-200 dark:hover:bg-gray-700 cursor-default aria-selected:bg-gray-200 aria-selected:dark:bg-gray-700" id={`${listboxId}-${0}`} on:click={() => closeDropdown()} > @@ -240,7 +346,7 @@
  • handleSelect(option)} role="option" diff --git a/web/src/lib/components/shared-components/full-screen-modal.svelte b/web/src/lib/components/shared-components/full-screen-modal.svelte index b5b21f0c23516..ececa25b1ef7f 100644 --- a/web/src/lib/components/shared-components/full-screen-modal.svelte +++ b/web/src/lib/components/shared-components/full-screen-modal.svelte @@ -68,28 +68,24 @@ use:focusTrap >
    -
    +
    - {#if isStickyBottom} -
    - -
    - {/if}
    + {#if isStickyBottom} +
    + +
    + {/if}
    diff --git a/web/src/lib/i18n/en.json b/web/src/lib/i18n/en.json index aaa3c77e2bb48..534ac086360b1 100644 --- a/web/src/lib/i18n/en.json +++ b/web/src/lib/i18n/en.json @@ -1194,7 +1194,7 @@ "tag_assets": "Tag assets", "tag_created": "Created tag: {tag}", "tag_feature_description": "Browsing photos and videos grouped by logical tag topics", - "tag_not_found_question": "Cannot find a tag? Create one here", + "tag_not_found_question": "Cannot find a tag? Create a new tag.", "tag_updated": "Updated tag: {tag}", "tagged_assets": "Tagged {count, plural, one {# asset} other {# assets}}", "tags": "Tags",