From ca2bdc7309688532bdd2846535759f31387d1d7e Mon Sep 17 00:00:00 2001 From: moozzi Date: Wed, 19 Aug 2026 08:43:36 +0200 Subject: [PATCH] Change tables styles for `Saved Searches` --- .../stylesheets/components/settings.css | 84 ++++++++++++++++++- .../settings/saved_searches/index.html.slim | 8 +- 2 files changed, 89 insertions(+), 3 deletions(-) diff --git a/app/assets/stylesheets/components/settings.css b/app/assets/stylesheets/components/settings.css index d9858068..864037d0 100644 --- a/app/assets/stylesheets/components/settings.css +++ b/app/assets/stylesheets/components/settings.css @@ -294,7 +294,7 @@ text-align: left; font-weight: var(--font-weight-semibold); color: var(--color-text-primary); - font-size: var(--font-size-sm); + font-size: var(--font-size-xs); text-transform: uppercase; letter-spacing: 0.05em; } @@ -759,3 +759,85 @@ .settings-page .saved-searches-new-button-section { padding-bottom: var(--spacing-6); } + +.settings-page .saved-searches-section .email-table { + table-layout: fixed; + + td:last-child { + display: table-cell; + } + + th:nth-child(1), + td:nth-child(1) { + width: 50%; + } + + th:nth-child(2), + td:nth-child(2) { + width: 40%; + } +} + +.settings-page .saved-searches-section .email-table-wrap { + overflow: visible; + margin-bottom: var(--spacing-3); +} + +.settings-page .saved-searches-section .email-table { + overflow: visible; +} + +.row-actions { + position: relative; + display: inline-flex; +} + +.row-actions-toggle { + list-style: none; + display: inline-flex; + align-items: center; + justify-content: center; + width: 32px; + height: 32px; + border-radius: var(--border-radius-md); + color: var(--color-text-secondary); + cursor: pointer; +} + +.row-actions-menu { + position: absolute; + right: 0; + top: calc(100% + var(--spacing-1)); + background: var(--color-bg-card); + border: var(--border-width) solid var(--color-border); + border-radius: var(--border-radius-md); + box-shadow: var(--shadow-lg); + padding: var(--spacing-2); + min-width: 160px; + display: flex; + flex-direction: column; + gap: var(--spacing-1); + z-index: 200; +} + +.row-actions-item { + display: block; + width: 100%; + padding: var(--spacing-2) var(--spacing-3); + border: none; + background: none; + text-align: left; + border-radius: var(--border-radius-sm); + color: var(--color-text-primary); + font-size: var(--font-size-sm); + cursor: pointer; + text-decoration: none; +} + +.row-actions-item:hover { + background: var(--color-bg-hover); +} + +.row-actions-item-danger { + color: var(--color-danger); +} diff --git a/app/views/settings/saved_searches/index.html.slim b/app/views/settings/saved_searches/index.html.slim index 655e62c3..733e030f 100644 --- a/app/views/settings/saved_searches/index.html.slim +++ b/app/views/settings/saved_searches/index.html.slim @@ -23,8 +23,12 @@ td code = ss.query td - = link_to "Edit", edit_settings_saved_search_path(ss), class: "button-secondary button-small" - = button_to "Delete", settings_saved_search_path(ss), method: :delete, class: "button-danger-secondary button-small", data: { turbo_confirm: "Delete this saved search?" } + details.row-actions data-controller="nav-dropdown" + summary.row-actions-toggle aria-label="Actions" + i.fa-solid.fa-ellipsis-vertical + .row-actions-menu + = link_to "Edit", edit_settings_saved_search_path(ss), class: "row-actions-item" + = button_to "Delete", settings_saved_search_path(ss), method: :delete, class: "row-actions-item row-actions-item-danger", data: { turbo_confirm: "Delete this saved search?" } - if @global_searches.any? h2 Global Searches