diff --git a/app/assets/images/expand.svg b/app/assets/images/expand.svg new file mode 100644 index 000000000..fdf5de301 --- /dev/null +++ b/app/assets/images/expand.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/stylesheets/card-columns.css b/app/assets/stylesheets/card-columns.css index 1a50f110f..be049c19c 100644 --- a/app/assets/stylesheets/card-columns.css +++ b/app/assets/stylesheets/card-columns.css @@ -84,6 +84,10 @@ .card { display: none; } + + &:not(.cards--considering) { + margin-block-start: var(--column-width-collapsed); + } } &:not(.is-collapsed) { @@ -107,6 +111,10 @@ } } + .cards__new-column { + margin-block-start: var(--column-width-collapsed); + } + /* Used when filtering */ .cards--grid { --cards-gap: 1rem; @@ -191,15 +199,46 @@ inline-size: 100%; margin-block-end: calc(-0.5 * var(--cards-gap)); justify-content: center; + } - &:hover, - &:has(~ .cards__expander-menu:hover) { - background-color: var(--column-color); - filter: none; + .cards:is(.cards--considering) &:hover { + cursor: unset; + filter: none; + } + + @media (any-hover: hover) { + .btn--circle, + ~ .btn--circle, + ~ .cards__expander-menu .btn--circle { + transition: opacity 300ms ease-in-out; + opacity: 0; + + .cards:hover & { + opacity: 1; + } } } } + .btn.cards__expander-button { + --btn-background: transparent; + + block-size: var(--column-width-collapsed); + inline-size: var(--column-width-collapsed); + inset: 0 0 auto auto; + position: absolute; + translate: calc(var(--column-gap) * -2); + z-index: var(--z-popup); + + .cards--considering & { + translate: none; + } + + .cards.is-collapsed & { + display: none; + } + } + .cards__expander-count { line-height: var(--column-width-collapsed); inline-size: var(--column-width-collapsed); @@ -226,9 +265,9 @@ } .cards__expander-menu { - inset: 0 0 auto auto; + inset: 0 auto auto 0; position: absolute; - translate: calc(var(--column-gap) * -2); + translate: calc(var(--column-gap) * 2); z-index: var(--z-popup); .btn--circle { @@ -249,14 +288,25 @@ .blank-slate--card { box-shadow: none !important; - border: 2px dashed color-mix(in srgb, var(--card-color) 40%, var(--color-canvas));; - font-weight: 600; - rotate: 2deg; + color: color-mix(in srgb, var(--card-color) 70%, var(--color-canvas)); p { + font-size: var(--text-small); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; + + &.blank-slate-for-grid { + display: none; + + .cards--grid & { + display: initial; + } + } + + .cards--grid &:not(.blank-slate-for-grid) { + display: none; + } } } @@ -383,23 +433,32 @@ .cards--considering { --gradient-opacity: 25%; + --bottom-gradient-size: 4em; - background-color: var(--color-canvas); - background-image: linear-gradient(90deg, - transparent 0%, - color-mix(in srgb, var(--color-considering) var(--gradient-opacity), transparent) 33%, - color-mix(in srgb, var(--color-considering) var(--gradient-opacity), transparent) 66%, - transparent 100%); + padding-bottom: var(--bottom-gradient-size); + position: relative; - @supports(mask: radial-gradient(black)) { + @supports(mask: linear-gradient(black)) { &:before { + background-image: linear-gradient(90deg, + transparent 0%, + color-mix(in srgb, var(--color-considering) var(--gradient-opacity), transparent) 33%, + color-mix(in srgb, var(--color-considering) var(--gradient-opacity), transparent) 66%, + transparent 100%); + content: ""; + inset: calc(var(--column-width-collapsed) + var(--block-space-half)) 0 0 0; + position: absolute; + z-index: 0; + } + + &:after { background: linear-gradient(90deg, color-mix(in oklch, var(--color-considering) 0%, transparent) 0%, color-mix(in oklch, var(--color-considering) 20%, transparent) 25%, color-mix(in oklch, var(--color-considering) 20%, transparent) 50%, color-mix(in oklch, var(--color-considering) 0%, transparent) 100%); content: ""; - inset: 0; + inset: calc(var(--column-width-collapsed) + var(--block-space-half)) 0 0 0; mask: var(--wavy-background-mask); position: absolute; z-index: 0; @@ -416,7 +475,7 @@ .cards__decoration { --gradient-opacity: 30%; - --size: 4.25em; + --size: 2.2em; background-color: var(--color-canvas); background-image: radial-gradient(ellipse at bottom, @@ -424,7 +483,7 @@ transparent 70%); block-size: var(--size); inline-size: 100%; - inset: calc(var(--size) * -1) 0 auto 0; + inset: calc(var(--column-width-collapsed) + var(--block-space) - var(--size)) 0 auto 0; position: absolute; z-index: -1; @@ -433,23 +492,31 @@ } @supports(mask: radial-gradient(black)) { + --gradient-opacity: 30%; + &:before { background: radial-gradient(ellipse at bottom, color-mix(in srgb, var(--color-considering) var(--gradient-opacity), transparent) 0%, transparent 70%); content: ""; inset: 0; - mask: radial-gradient(6px at 50% calc(100% + 3px), transparent calc(99% - 2px), black calc(101% - 2px) 99%, transparent 101%) calc(50% - 8px) calc(50% - 3px + .5px)/16px 6px, + mask: radial-gradient(6px at 50% calc(100% + 3px), + transparent calc(99% - 2px), + black calc(101% - 2px) 99%, transparent 101%) calc(50% - 8px) calc(50% - 3px + .5px)/16px 6px, radial-gradient(6px at 50% -3px, transparent calc(99% - 2px), black calc(101% - 2px) 99%, transparent 101%) 50% calc(50% + 3px)/16px 6px; position: absolute; z-index: 0; } } + } - &.cards__decoration--end { - inset: auto 0 calc(var(--size) * -1); - rotate: 180deg; - } + .cards__decoration-end { + background: linear-gradient( transparent 0%, var(--color-canvas) 90%); + block-size: var(--bottom-gradient-size); + content: ""; + inset: auto 0 0; + position: absolute; + z-index: 1; } .card { @@ -458,6 +525,7 @@ background-color: var(--color-canvas); line-height: 1.2; + z-index: 2; @media (min-width: 640px) { --text-xx-large: 1.6em; @@ -532,18 +600,12 @@ /* ------------------------------------------------------------------------ */ .cards--on-deck { - --column-color: var(--color-ink-lighter); + --card-color: var(--color-ink-light) !important; .card { --card-color: var(--color-card-complete) !important; } - &.cards.is-collapsed { - .cards__expander:after { - background: var(--column-color); - } - } - .bubble { display: none !important; } @@ -572,11 +634,4 @@ z-index: 1; } } - - /* Closed - /* ------------------------------------------------------------------------ */ - - .cards--closed { - --column-color: var(--color-ink-lighter); - } } diff --git a/app/assets/stylesheets/cards.css b/app/assets/stylesheets/cards.css index de83b807c..24db77061 100644 --- a/app/assets/stylesheets/cards.css +++ b/app/assets/stylesheets/cards.css @@ -323,8 +323,14 @@ } .card:has(.card__closed), - .card-perma:has(.card__closed) { + .card:is(.card--postponed), + .card-perma:has(.card__closed), + .card-perma:has(.card--postponed) { --card-color: var(--color-card-complete) !important; + + .bubble { + display: none; + } } .card__closed-title { diff --git a/app/assets/stylesheets/icons.css b/app/assets/stylesheets/icons.css index 0f2e8177a..02d418624 100644 --- a/app/assets/stylesheets/icons.css +++ b/app/assets/stylesheets/icons.css @@ -45,6 +45,7 @@ .icon--crown { --svg: url("crown.svg "); } .icon--email { --svg: url("email.svg "); } .icon--everyone { --svg: url("everyone.svg "); } + .icon--expand { --svg: url("expand.svg "); } .icon--gear { --svg: url("gear.svg "); } .icon--filter { --svg: url("filter.svg "); } .icon--globe { --svg: url("globe.svg "); } diff --git a/app/controllers/account/settings_controller.rb b/app/controllers/account/settings_controller.rb index 585e87400..6b08abba2 100644 --- a/app/controllers/account/settings_controller.rb +++ b/app/controllers/account/settings_controller.rb @@ -1,6 +1,4 @@ class Account::SettingsController < ApplicationController - include FilterScoped - def show @account = Account.sole @users = User.active.alphabetically diff --git a/app/controllers/cards_controller.rb b/app/controllers/cards_controller.rb index 526806879..9a0d5d19c 100644 --- a/app/controllers/cards_controller.rb +++ b/app/controllers/cards_controller.rb @@ -6,8 +6,6 @@ class CardsController < ApplicationController before_action :set_collection, only: %i[ create ] before_action :set_card, only: %i[ show edit update destroy ] - enable_collection_filtering only: :index - PAGE_SIZE = 25 def index diff --git a/app/controllers/concerns/filter_scoped.rb b/app/controllers/concerns/filter_scoped.rb index 2c422be2a..a9341f604 100644 --- a/app/controllers/concerns/filter_scoped.rb +++ b/app/controllers/concerns/filter_scoped.rb @@ -6,12 +6,6 @@ module FilterScoped before_action :set_user_filtering end - class_methods do - def enable_collection_filtering(**options) - before_action :enable_collection_filtering, **options - end - end - private def set_filter if params[:filter_id].present? @@ -32,24 +26,4 @@ module FilterScoped def expanded_param ActiveRecord::Type::Boolean.new.cast(params[:expand_all]) end - - def enable_collection_filtering - # We pass a block so that we don't have to pass around the script_name and host - # to the model to make +url_for+ invocable - @user_filtering.enable_collection_filtering do |**options| - url_for(options) - end - end - - def enable_referral_collection_filtering - @user_filtering.enable_collection_filtering do |**options| - if request.referer.present? - uri = URI.parse(request.referer) - uri.query = Rack::Utils.build_query(options) - uri.to_s - else - url_for(options) - end - end - end end diff --git a/app/controllers/events_controller.rb b/app/controllers/events_controller.rb index 744a7f925..5b52b02fa 100644 --- a/app/controllers/events_controller.rb +++ b/app/controllers/events_controller.rb @@ -1,8 +1,6 @@ class EventsController < ApplicationController include DayTimelinesScoped - enable_collection_filtering only: :index - def index fresh_when @day_timeline end diff --git a/app/controllers/my/menus_controller.rb b/app/controllers/my/menus_controller.rb index 1a8316957..a81705df3 100644 --- a/app/controllers/my/menus_controller.rb +++ b/app/controllers/my/menus_controller.rb @@ -1,14 +1,7 @@ class My::MenusController < ApplicationController include FilterScoped - before_action :enable_referral_collection_filtering, if: :collection_filtering_enabled? - def show fresh_when @user_filtering end - - private - def collection_filtering_enabled? - params[:enable_collection_filtering].present? - end end diff --git a/app/controllers/notifications/settings_controller.rb b/app/controllers/notifications/settings_controller.rb index 4323ed3c8..42608b558 100644 --- a/app/controllers/notifications/settings_controller.rb +++ b/app/controllers/notifications/settings_controller.rb @@ -1,5 +1,4 @@ class Notifications::SettingsController < ApplicationController - include FilterScoped before_action :set_settings def show diff --git a/app/controllers/notifications_controller.rb b/app/controllers/notifications_controller.rb index 41446b2fb..d188e3a1e 100644 --- a/app/controllers/notifications_controller.rb +++ b/app/controllers/notifications_controller.rb @@ -1,6 +1,4 @@ class NotificationsController < ApplicationController - include FilterScoped - def index @unread = Current.user.notifications.unread.ordered unless current_page_param set_page_and_extract_portion_from Current.user.notifications.read.ordered diff --git a/app/controllers/webhooks_controller.rb b/app/controllers/webhooks_controller.rb index fceb37c5c..8f8315186 100644 --- a/app/controllers/webhooks_controller.rb +++ b/app/controllers/webhooks_controller.rb @@ -1,6 +1,4 @@ class WebhooksController < ApplicationController - include FilterScoped - before_action :ensure_can_administer before_action :set_collection before_action :set_webhook, except: %i[ index new create ] diff --git a/app/models/user/filtering.rb b/app/models/user/filtering.rb index 6e00ecbc1..c9f049ab3 100644 --- a/app/models/user/filtering.rb +++ b/app/models/user/filtering.rb @@ -71,28 +71,12 @@ class User::Filtering filter.collections.any? end - def enable_collection_filtering(&block) - @collection_filtering_route_resolver = block - end - - def self_filter_path(...) - if supports_collection_filtering? - @collection_filtering_route_resolver.call(...) - else - cards_path(...) - end - end - def single_collection_or_first # Default to the first selected or, when no selection, to the first one filter.collections.first || collections.first end def cache_key - ActiveSupport::Cache.expand_cache_key([ user, filter, expanded?, collections, tags, users, filters, supports_collection_filtering? ], "user-filtering") - end - - def supports_collection_filtering? - @collection_filtering_route_resolver.present? + ActiveSupport::Cache.expand_cache_key([ user, filter, expanded?, collections, tags, users, filters ], "user-filtering") end end diff --git a/app/views/account/settings/show.html.erb b/app/views/account/settings/show.html.erb index 72bca26cb..732c49abc 100644 --- a/app/views/account/settings/show.html.erb +++ b/app/views/account/settings/show.html.erb @@ -1,7 +1,7 @@ <% @page_title = "Account Settings" %> <% content_for :header do %> - <%= render "filters/menu", user_filtering: @user_filtering %> + <%= render "filters/menu" %>

<%= @page_title %>

<% end %> diff --git a/app/views/cards/index.html.erb b/app/views/cards/index.html.erb index 47d15dcb8..99121d028 100644 --- a/app/views/cards/index.html.erb +++ b/app/views/cards/index.html.erb @@ -10,7 +10,7 @@ <% end %> <% content_for :header do %> - <%= render "filters/menu", user_filtering: @user_filtering %> + <%= render "filters/menu" %>

<%= @user_filtering.selected_collections_label %> diff --git a/app/views/cards/show.html.erb b/app/views/cards/show.html.erb index 9b35b9b1e..36371cbb1 100644 --- a/app/views/cards/show.html.erb +++ b/app/views/cards/show.html.erb @@ -10,7 +10,7 @@ <% end %> <% content_for :header do %> - <%= render "filters/menu", user_filtering: @user_filtering %> + <%= render "filters/menu" %> <%= link_to collection_url(@card.collection), class: "header__title btn borderless txt-large", style: "--btn-padding: 0.25ch 1ch 0.25ch 0.75ch; view-transistion-name: card-collection-title;", diff --git a/app/views/collections/columns/closeds/show.html.erb b/app/views/collections/columns/closeds/show.html.erb index 160361ea8..ff2fce6c7 100644 --- a/app/views/collections/columns/closeds/show.html.erb +++ b/app/views/collections/columns/closeds/show.html.erb @@ -1,11 +1,33 @@ -<%= turbo_frame_tag :closed_column do %> - <% if @page.used? %> - <%= with_manual_pagination :closed_column, @page do %> - <%= render "collections/columns/list", cards: @page.records, draggable: true %> +<% @page_title = "Column: Closed" %> + +<% content_for :header do %> + <%= render "filters/menu" %> + +
+ <%= link_to @collection, class: "btn borderless txt-medium", data: { controller: "hotkey", action: "keydown.esc@document->hotkey#click" } do %> + + ← + <%= @collection.name %> + <% end %> - <% else %> -
-

Drag cards here

-
- <% end %> +
+ +

+ <%= @page_title %> +

<% end %> + +
+ <%= turbo_frame_tag :closed_column do %> + <% if @page.used? %> + <%= with_manual_pagination :closed_column, @page do %> + <%= render "collections/columns/list", cards: @page.records, draggable: true %> + <% end %> + <% else %> +
+

Drag cards here

+

Nothing here

+
+ <% end %> + <% end %> +
diff --git a/app/views/collections/columns/not_nows/show.html.erb b/app/views/collections/columns/not_nows/show.html.erb index d50ed3371..923c83186 100644 --- a/app/views/collections/columns/not_nows/show.html.erb +++ b/app/views/collections/columns/not_nows/show.html.erb @@ -1,11 +1,33 @@ -<%= turbo_frame_tag :not_now_column do %> - <% if @page.used? %> - <%= with_manual_pagination :not_now_column, @page do %> - <%= render "collections/columns/list", cards: @page.records, draggable: true %> +<% @page_title = "Column: Now now" %> + +<% content_for :header do %> + <%= render "filters/menu" %> + +
+ <%= link_to @collection, class: "btn borderless txt-medium", data: { controller: "hotkey", action: "keydown.esc@document->hotkey#click" } do %> + + ← + <%= @collection.name %> + <% end %> - <% else %> -
-

Drag cards here

-
- <% end %> +
+ +

+ <%= @page_title %> +

<% end %> + +
+ <%= turbo_frame_tag :not_now_column do %> + <% if @page.used? %> + <%= with_manual_pagination :not_now_column, @page do %> + <%= render "collections/columns/list", cards: @page.records, draggable: true %> + <% end %> + <% else %> +
+

Drag cards here

+

Nothing here

+
+ <% end %> + <% end %> +
diff --git a/app/views/collections/columns/show.html.erb b/app/views/collections/columns/show.html.erb index 49724acc3..dc8702340 100644 --- a/app/views/collections/columns/show.html.erb +++ b/app/views/collections/columns/show.html.erb @@ -1,11 +1,33 @@ -<%= turbo_frame_tag dom_id(@column, :cards) do %> - <% if @page.used? %> - <%= with_manual_pagination dom_id(@column, :cards), @page do %> - <%= render "collections/columns/list", cards: @page.records, draggable: true %> +<% @page_title = "Column: #{ @column.name }" %> + +<% content_for :header do %> + <%= render "filters/menu" %> + +
+ <%= link_to @column.collection, class: "btn borderless txt-medium", data: { controller: "hotkey", action: "keydown.esc@document->hotkey#click" } do %> + + ← + <%= @column.collection.name %> + <% end %> - <% else %> -
-

Drag cards here

-
- <% end %> +
+ +

+ <%= @page_title %> +

<% end %> + +
+ <%= turbo_frame_tag dom_id(@column, :cards) do %> + <% if @page.used? %> + <%= with_manual_pagination dom_id(@column, :cards), @page do %> + <%= render "collections/columns/list", cards: @page.records, draggable: true %> + <% end %> + <% else %> +
+

Drag cards here

+

Nothing here

+
+ <% end %> + <% end %> +
diff --git a/app/views/collections/columns/streams/show.html.erb b/app/views/collections/columns/streams/show.html.erb index 1eb93e74a..651cb4c03 100644 --- a/app/views/collections/columns/streams/show.html.erb +++ b/app/views/collections/columns/streams/show.html.erb @@ -1,11 +1,32 @@ -<%= turbo_frame_tag :stream_column do %> - <% if @page.used? %> - <%= with_manual_pagination :stream_column, @page do %> - <%= render "collections/columns/list", cards: @page.records, draggable: true %> +<% @page_title = "Column: The Stream" %> + +<% content_for :header do %> + <%= render "filters/menu" %> + +
+ <%= link_to @collection, class: "btn borderless txt-medium", data: { controller: "hotkey", action: "keydown.esc@document->hotkey#click" } do %> + + ← + <%= @collection.name %> + <% end %> - <% else %> -
-

Drag cards here

-
- <% end %> +
+ +

+ <%= @page_title %> +

<% end %> + +
+ <%= turbo_frame_tag :stream_column do %> + <% if @page.used? %> + <%= with_manual_pagination :stream_column, @page do %> + <%= render "collections/columns/list", cards: @page.records, draggable: true %> + <% end %> + <% else %> +
+

Nothing here

+
+ <% end %> + <% end %> +
\ No newline at end of file diff --git a/app/views/collections/edit.html.erb b/app/views/collections/edit.html.erb index f565cc972..df0d6dc79 100644 --- a/app/views/collections/edit.html.erb +++ b/app/views/collections/edit.html.erb @@ -1,7 +1,7 @@ <% @page_title = "Collection Settings" %> <% content_for :header do %> - <%= render "filters/menu", user_filtering: @user_filtering %> + <%= render "filters/menu" %>
<%= link_to @collection, class: "btn borderless txt-medium", data: { controller: "hotkey", action: "keydown.esc@document->hotkey#click" } do %> diff --git a/app/views/collections/new.html.erb b/app/views/collections/new.html.erb index 39ca1937f..ba9f1151f 100644 --- a/app/views/collections/new.html.erb +++ b/app/views/collections/new.html.erb @@ -1,7 +1,7 @@ <% @page_title = "Create a new collection" %> <% content_for :header do %> - <%= render "filters/menu", user_filtering: @user_filtering %> + <%= render "filters/menu" %> <% end %>
diff --git a/app/views/collections/show.html.erb b/app/views/collections/show.html.erb index 96392f1d2..c89e70976 100644 --- a/app/views/collections/show.html.erb +++ b/app/views/collections/show.html.erb @@ -10,7 +10,7 @@ <% end %> <% content_for :header do %> - <%= render "filters/menu", user_filtering: @user_filtering %> + <%= render "filters/menu" %>
<%= render "cards/webhooks", collection: @collection if Current.user.admin? %> diff --git a/app/views/collections/show/_closed.html.erb b/app/views/collections/show/_closed.html.erb index 8d7f41a43..383bba6db 100644 --- a/app/views/collections/show/_closed.html.erb +++ b/app/views/collections/show/_closed.html.erb @@ -6,7 +6,9 @@ data-drag-and-drop-url="<%= columns_card_drops_closure_path("__id__") %>" > - <%= render "collections/show/expander", title: "Done", count: collection.cards.closed.count, column_id: "closed-cards" %> + <%= render "collections/show/expander", title: "Done", count: collection.cards.closed.count, column_id: "closed-cards" do %> + <%= render "collections/show/menu/expand", column_path: collection_columns_closed_path(collection) %> + <% end %> <%= column_frame_tag :closed_column, src: collection_columns_closed_path(collection) %> diff --git a/app/views/collections/show/_column.html.erb b/app/views/collections/show/_column.html.erb index cc7ac0697..f4043bccb 100644 --- a/app/views/collections/show/_column.html.erb +++ b/app/views/collections/show/_column.html.erb @@ -11,5 +11,10 @@ <%= render "collections/show/menu/column", column: column %> <% end %> + <%= link_to collection_column_path(column.collection, column), class: "btn btn--circle txt-x-small borderless cards__expander-button", data: { turbo_frame: "_top" } do %> + <%= icon_tag "expand", class: "translucent" %> + Expand column + <% end %> + <%= column_frame_tag dom_id(column, :cards), src: collection_column_path(column.collection, column) %> diff --git a/app/views/collections/show/_not_now.html.erb b/app/views/collections/show/_not_now.html.erb index b24999067..c99b9b3af 100644 --- a/app/views/collections/show/_not_now.html.erb +++ b/app/views/collections/show/_not_now.html.erb @@ -6,7 +6,9 @@ data-drag-and-drop-url="<%= columns_card_drops_not_now_path("__id__") %>" > - <%= render "collections/show/expander", title: "Not Now", count: collection.cards.postponed.count, column_id: "not-now" %> + <%= render "collections/show/expander", title: "Not Now", count: collection.cards.postponed.count, column_id: "not-now" do %> + <%= render "collections/show/menu/expand", column_path: collection_columns_not_now_path(collection) %> + <% end %> <%= column_frame_tag :not_now_column, src: collection_columns_not_now_path(collection) %> diff --git a/app/views/collections/show/_stream.html.erb b/app/views/collections/show/_stream.html.erb index f107d0cda..9d0d932b3 100644 --- a/app/views/collections/show/_stream.html.erb +++ b/app/views/collections/show/_stream.html.erb @@ -5,6 +5,13 @@ data-drag-and-drop-url="<%= columns_card_drops_stream_path("__id__") %>">
+
+

The Stream

+ <%= link_to collection_columns_stream_path(collection), class: "btn btn--circle txt-x-small borderless cards__expander-button", data: { turbo_frame: "_top" } do %> + <%= icon_tag "expand", class: "translucent" %> + Expand column + <% end %> +
<%= render "columns/show/add_card_button", collection: collection %> <% if page.used? %> @@ -13,6 +20,7 @@ <% end %> <% end %> -
+
<% end %> + diff --git a/app/views/collections/show/menu/_column.html.erb b/app/views/collections/show/menu/_column.html.erb index fd0894fc8..156642b31 100644 --- a/app/views/collections/show/menu/_column.html.erb +++ b/app/views/collections/show/menu/_column.html.erb @@ -6,14 +6,20 @@ diff --git a/app/views/collections/show/menu/_columns.html.erb b/app/views/collections/show/menu/_columns.html.erb index 60a62c1b5..d0c2072bd 100644 --- a/app/views/collections/show/menu/_columns.html.erb +++ b/app/views/collections/show/menu/_columns.html.erb @@ -1,4 +1,4 @@ -
+
diff --git a/app/views/collections/show/menu/_expand.html.erb b/app/views/collections/show/menu/_expand.html.erb new file mode 100644 index 000000000..878233975 --- /dev/null +++ b/app/views/collections/show/menu/_expand.html.erb @@ -0,0 +1,4 @@ +<%= link_to column_path, class: "btn btn--circle txt-x-small borderless cards__expander-button", data: { turbo_frame: "_top" } do %> + <%= icon_tag "expand", class: "translucent" %> + Expand column +<% end %> diff --git a/app/views/events/index.html.erb b/app/views/events/index.html.erb index 8acc92214..d6a777d40 100644 --- a/app/views/events/index.html.erb +++ b/app/views/events/index.html.erb @@ -4,7 +4,7 @@ <%= render "filters/broadcasts", filter: @filter %> <% content_for :header do %> - <%= render "filters/menu", user_filtering: @user_filtering %> + <%= render "filters/menu" %> <%= render "events/index/add_card_button", user_filtering: @user_filtering %>

diff --git a/app/views/filters/_menu.html.erb b/app/views/filters/_menu.html.erb index a117bdfa7..ae4a3443b 100644 --- a/app/views/filters/_menu.html.erb +++ b/app/views/filters/_menu.html.erb @@ -8,6 +8,6 @@ dialog_target: "dialog", navigable_list_focus_on_selection_value: false, navigable_list_actionable_items_value: true } do %> - <%= turbo_frame_tag "my_menu", src: my_menu_path(enable_collection_filtering: user_filtering.supports_collection_filtering?, **user_filtering.filter.as_params), target: "_top" %> + <%= turbo_frame_tag "my_menu", src: my_menu_path, target: "_top" %> <% end %> diff --git a/app/views/filters/menu/_collections.html.erb b/app/views/filters/menu/_collections.html.erb index c9298093e..f6dfad1ec 100644 --- a/app/views/filters/menu/_collections.html.erb +++ b/app/views/filters/menu/_collections.html.erb @@ -1,10 +1,7 @@ <% # Using method: :get inside Turbo frame triggers some special Turbo handling where the script_name is lost %> -<%= form_with url: user_filtering.self_filter_path(script_name: Account.sole.slug), method: :get, class: "display-contents", - data: { controller: "form" } do |form| %> - <% if user_filtering.collections.any? %> - <%= collapsible_nav_section "Collections" do %> - <%= render "filters/menu/collections/all_option", form: form, user_filtering: user_filtering %> - <%= render partial: "filters/menu/collections/collection", collection: user_filtering.collections, as: :collection, locals: { form: form, user_filtering: user_filtering } %> - <% end %> +<% if user_filtering.collections.any? %> + <%= collapsible_nav_section "Collections" do %> + <%= render "filters/menu/collections/all_option", user_filtering: user_filtering %> + <%= render partial: "filters/menu/collections/collection", collection: user_filtering.collections, as: :collection %> <% end %> <% end %> diff --git a/app/views/filters/menu/collections/_all_option.html.erb b/app/views/filters/menu/collections/_all_option.html.erb index 8ee95a795..e5a682b9b 100644 --- a/app/views/filters/menu/collections/_all_option.html.erb +++ b/app/views/filters/menu/collections/_all_option.html.erb @@ -1,5 +1,3 @@ -<% clear_url_path = user_filtering.self_filter_path(user_filtering.as_params.except(:collection_ids), script_name: request.script_name) %> - <% if Current.user.collections.many? %>