From e864ec6d69ab5a9fb5695e7a8bdf05a51499fb2c Mon Sep 17 00:00:00 2001 From: Andy Smith Date: Fri, 12 Sep 2025 10:49:30 -0500 Subject: [PATCH 1/5] Organize existing popup styles --- app/assets/stylesheets/popup.css | 54 +++++++++++-------- app/views/cards/assignments/new.html.erb | 2 +- .../cards/display/perma/_collection.html.erb | 2 +- app/views/cards/taggings/new.html.erb | 2 +- app/views/filters/menu/_collections.html.erb | 19 +++---- .../filters/settings/_assignees.html.erb | 2 +- app/views/filters/settings/_closers.html.erb | 2 +- app/views/filters/settings/_creators.html.erb | 2 +- .../filters/settings/_indexed_by.html.erb | 2 +- .../filters/settings/_sorted_by.html.erb | 2 +- app/views/filters/settings/_tags.html.erb | 2 +- 11 files changed, 50 insertions(+), 41 deletions(-) diff --git a/app/assets/stylesheets/popup.css b/app/assets/stylesheets/popup.css index e9c3bcbaf..4deab9f7e 100644 --- a/app/assets/stylesheets/popup.css +++ b/app/assets/stylesheets/popup.css @@ -41,17 +41,9 @@ } } - .popup__footer { - background-color: var(--color-canvas); - border-block-start: 1px solid var(--color-ink-lighter); - font-size: var(--text-small); - inset: auto 0 0; - line-height: 1.6; - margin-block-start: var(--block-space-half); - padding: 1.5ch; - position: sticky; - text-align: center; - z-index: 1; + .popup__title { + font-weight: 800; + white-space: nowrap; } .popup__group { @@ -87,6 +79,22 @@ } } + .popup__group-title { + background: var(--color-canvas); + font-size: var(--text-small); + font-weight: bold; + list-style: none; + padding: var(--block-space-half) var(--inline-space-half); + position: sticky; + text-transform: uppercase; + top: calc(-1 * var(--block-space)); + z-index: 1; + + &::-webkit-details-marker { + display: none; + } + } + .popup__list { display: flex; flex-direction: column; @@ -125,8 +133,7 @@ } .icon { - block-size: 1em; - inline-size: 1em; + --icon-size: 1em; } &:has(input:checked) { @@ -155,21 +162,22 @@ } } - .popup__title { - font-weight: 800; - } - - .popup__group-title { - background: var(--color-canvas); + .popup__footer { + background-color: var(--color-canvas); + border-block-start: 1px solid var(--color-ink-lighter); font-size: var(--text-small); - font-weight: bold; - padding: var(--block-space-half) var(--inline-space-half); + inset: auto 0 0; + line-height: 1.6; + margin-block-start: var(--block-space-half); + padding: 1.5ch; position: sticky; - text-transform: uppercase; - top: calc(-1 * var(--block-space)); + text-align: center; z-index: 1; } + /* Variants + /* ------------------------------------------------------------------------ */ + .popup--animated { opacity: 0; transform: scale(0.2) translateX(-50%); diff --git a/app/views/cards/assignments/new.html.erb b/app/views/cards/assignments/new.html.erb index 69c499524..27eaf3a91 100644 --- a/app/views/cards/assignments/new.html.erb +++ b/app/views/cards/assignments/new.html.erb @@ -5,7 +5,7 @@ dialog_target: "dialog", navigable_list_focus_on_selection_value: false, navigable_list_actionable_items_value: true } do %> - Assign this to… + Assign this to… <% if @collection.users.active.count > 1 %> <%= text_field_tag :search, nil, placeholder: "Filter…", class: "input input--transparent txt-small margin-block-half", autofocus: true, diff --git a/app/views/cards/display/perma/_collection.html.erb b/app/views/cards/display/perma/_collection.html.erb index bd8bb7873..d73e49486 100644 --- a/app/views/cards/display/perma/_collection.html.erb +++ b/app/views/cards/display/perma/_collection.html.erb @@ -12,7 +12,7 @@ dialog_target: "dialog", navigable_list_focus_on_selection_value: false, navigable_list_actionable_items_value: true } do %> - Move this card to… + Move this card to… <% if Current.user.collections.count > 1 %> <%= text_field_tag :search, nil, placeholder: "Filter…", class: "input input--transparent txt-small margin-block-half font-weight-normal", autofocus: true, diff --git a/app/views/cards/taggings/new.html.erb b/app/views/cards/taggings/new.html.erb index fda452f3a..ae49ef1cd 100644 --- a/app/views/cards/taggings/new.html.erb +++ b/app/views/cards/taggings/new.html.erb @@ -5,7 +5,7 @@ data-navigable-list-actionable-items-value="true" data-action="keydown->navigable-list#navigate filter:changed->navigable-list#reset dialog:show@document->navigable-list#reset" > - Tag this… + Tag this… <%= form_with url: card_taggings_path(@card), class: "flex flex-column gap-half full-width margin-block-half" do |form| %> <%= form.text_field :tag_title, placeholder: @tags.any? ? "Add a new tag or filter…" : "Name this tag…", class: "input txt-small full-width", diff --git a/app/views/filters/menu/_collections.html.erb b/app/views/filters/menu/_collections.html.erb index 0375ff705..2b81a5890 100644 --- a/app/views/filters/menu/_collections.html.erb +++ b/app/views/filters/menu/_collections.html.erb @@ -1,11 +1,12 @@ -<%= form_with url: user_filtering.self_filter_path, method: :get, class: "display-contents", - data: { controller: "form" } do |form| %> - <% if user_filtering.collections.any? %> +<% if user_filtering.collections.any? %> +
+ Collections - - <% end %> + <%= form_with url: user_filtering.self_filter_path, method: :get, class: "display-contents", data: { controller: "form" } do |form| %> + + <% end %> +
<% end %> diff --git a/app/views/filters/settings/_assignees.html.erb b/app/views/filters/settings/_assignees.html.erb index 03b70336a..4634ba338 100644 --- a/app/views/filters/settings/_assignees.html.erb +++ b/app/views/filters/settings/_assignees.html.erb @@ -14,7 +14,7 @@ <%= filter_dialog "Assigned to…" do %> - Assigned to… + Assigned to… <% if User.active.many? %> <%= text_field_tag :search, nil, placeholder: "Filter…", class: "input input--transparent txt-small", autofocus: true, diff --git a/app/views/filters/settings/_closers.html.erb b/app/views/filters/settings/_closers.html.erb index fb8d723b2..a5d3e41ac 100644 --- a/app/views/filters/settings/_closers.html.erb +++ b/app/views/filters/settings/_closers.html.erb @@ -14,7 +14,7 @@ <%= filter_dialog "Closed by…" do %> - Closed by… + Closed by… <% if user_filtering.users.many? %> <%= text_field_tag :search, nil, placeholder: "Filter…", class: "input input--transparent txt-small", autofocus: true, diff --git a/app/views/filters/settings/_creators.html.erb b/app/views/filters/settings/_creators.html.erb index 6546ffdf1..249fffa70 100644 --- a/app/views/filters/settings/_creators.html.erb +++ b/app/views/filters/settings/_creators.html.erb @@ -14,7 +14,7 @@ <%= filter_dialog "Added by…" do %> - Added by… + Added by… <% if user_filtering.users.many? %> <%= text_field_tag :search, nil, placeholder: "Filter…", class: "input input--transparent txt-small", autofocus: true, diff --git a/app/views/filters/settings/_indexed_by.html.erb b/app/views/filters/settings/_indexed_by.html.erb index 085e85fca..2060c1d14 100644 --- a/app/views/filters/settings/_indexed_by.html.erb +++ b/app/views/filters/settings/_indexed_by.html.erb @@ -9,7 +9,7 @@ <%= filter_dialog "Filter by…" do %> - Filter by… + Filter by…