From f2edee4fec39bf6e938f43c9cce17a5ce8535b35 Mon Sep 17 00:00:00 2001 From: eth3lbert Date: Sun, 15 Jun 2025 17:29:43 +0800 Subject: [PATCH 1/8] VersionList::Row: Replace yank button with a dropdown menu --- app/components/version-list/row.hbs | 17 ++++++++-- app/components/version-list/row.module.css | 36 +++++++++++++++++++--- app/components/yank-button.hbs | 2 -- e2e/acceptance/sudo.spec.ts | 6 ++++ e2e/acceptance/versions.spec.ts | 2 ++ public/assets/ellipsis-circle.svg | 3 ++ tests/acceptance/sudo-test.js | 6 ++++ tests/acceptance/versions-test.js | 2 ++ 8 files changed, 64 insertions(+), 10 deletions(-) create mode 100644 public/assets/ellipsis-circle.svg diff --git a/app/components/version-list/row.hbs b/app/components/version-list/row.hbs index e6630036423..f74ede82525 100644 --- a/app/components/version-list/row.hbs +++ b/app/components/version-list/row.hbs @@ -117,7 +117,18 @@ {{/if}} - - - + + + {{svg-jar "ellipsis-circle" local-class="icon"}} + Actions + + + + + + + + + + \ No newline at end of file diff --git a/app/components/version-list/row.module.css b/app/components/version-list/row.module.css index c4eed5f5b48..10515a52545 100644 --- a/app/components/version-list/row.module.css +++ b/app/components/version-list/row.module.css @@ -235,11 +235,37 @@ margin-top: var(--space-2xs); } -.yank-button { - position: relative; - margin-left: var(--space-xs); +.dropdown { + line-height: 1rem; +} - @media only screen and (max-width: 550px) { - display: none; +.icon { + width: 1.4em; + height: auto; +} + +.trigger { + background: none; + border: none; + padding: 0; +} + +.menu { + right: 0; + min-width: max-content; +} + +.menu-button { + align-items: center; + gap: var(--space-2xs); + cursor: pointer; + text-transform: capitalize; + + /* This duplicates the styles in .button[disabled] as there's no + * obvious way to compose them, given the target selectors. */ + &[disabled] { + background: linear-gradient(to bottom, var(--bg-color-top-light) 0%, var(--bg-color-bottom-light) 100%); + color: var(--disabled-text-color) !important; + cursor: not-allowed; } } diff --git a/app/components/yank-button.hbs b/app/components/yank-button.hbs index a6020c07665..3bdef5f4767 100644 --- a/app/components/yank-button.hbs +++ b/app/components/yank-button.hbs @@ -1,7 +1,6 @@ {{#if @version.yanked}}