From 113f8f299d8be360a835747dee490aecb294ef86 Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Wed, 1 Oct 2025 13:37:48 -0500 Subject: [PATCH 01/15] Remove note about selection --- app/views/filters/menu/_shortcut_notice.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/filters/menu/_shortcut_notice.html.erb b/app/views/filters/menu/_shortcut_notice.html.erb index f4c28b43f..ed1d1fb70 100644 --- a/app/views/filters/menu/_shortcut_notice.html.erb +++ b/app/views/filters/menu/_shortcut_notice.html.erb @@ -1,5 +1,5 @@ <% if platform.desktop? %> <% end %> From aca06d4fdff1521545714ada10e358e7cc38154c Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Wed, 1 Oct 2025 13:38:32 -0500 Subject: [PATCH 02/15] Don't break inside this clause --- app/views/filters/menu/_shortcut_notice.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/filters/menu/_shortcut_notice.html.erb b/app/views/filters/menu/_shortcut_notice.html.erb index ed1d1fb70..feeda0c3f 100644 --- a/app/views/filters/menu/_shortcut_notice.html.erb +++ b/app/views/filters/menu/_shortcut_notice.html.erb @@ -1,5 +1,5 @@ <% if platform.desktop? %>
- Press <%= hotkey_label(["ctrl", "J"]) -%> anytime to open this, esc to close, to move, enter to navigate. + Press <%= hotkey_label(["ctrl", "J"]) -%> anytime to open this, esc to close, to move, enter to navigate.
<% end %> From a1e650fb501658b7e84f4bc0192f7047c9159205 Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Wed, 1 Oct 2025 13:58:15 -0500 Subject: [PATCH 03/15] Remove filtering checkboxes, replace with icon; modify icon --- app/assets/images/collection.svg | 2 +- .../filters/menu/collections/_all_option.html.erb | 9 +-------- .../filters/menu/collections/_collection.html.erb | 14 +------------- 3 files changed, 3 insertions(+), 22 deletions(-) diff --git a/app/assets/images/collection.svg b/app/assets/images/collection.svg index 5d6249839..cdbe7d4da 100644 --- a/app/assets/images/collection.svg +++ b/app/assets/images/collection.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/app/views/filters/menu/collections/_all_option.html.erb b/app/views/filters/menu/collections/_all_option.html.erb index 4c933510f..288877618 100644 --- a/app/views/filters/menu/collections/_all_option.html.erb +++ b/app/views/filters/menu/collections/_all_option.html.erb @@ -2,14 +2,7 @@ <% if Current.user.collections.many? %> From e046227ebc34a14cdeff04f7a25cf76ca4fbf6c3 Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Wed, 1 Oct 2025 16:15:15 -0500 Subject: [PATCH 07/15] No need for a prefix here --- app/views/filters/settings/_collections.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/filters/settings/_collections.html.erb b/app/views/filters/settings/_collections.html.erb index 1c3d2a428..fffdd65c6 100644 --- a/app/views/filters/settings/_collections.html.erb +++ b/app/views/filters/settings/_collections.html.erb @@ -6,7 +6,7 @@ action: "keydown.esc->dialog#close click@document->dialog#closeOnClickOutside", filter_show: user_filtering.show_collections?, multi_selection_combobox_no_selection_label_value: "Collection…", - multi_selection_combobox_label_prefix_value: "Collection" } do %> + multi_selection_combobox_label_prefix_value: "" } do %> +<%= form_with url: events_path, + method: :get, class: "flex-inline position-relative", + data: { controller: "form", turbo_frame: "cards_container", turbo_action: "advance" } do |form| %> + <%= tag.div class: "flex-inline position-relative quick-filter", + data: { + controller: "dialog multi-selection-combobox", + action: "keydown.esc->dialog#close click@document->dialog#closeOnClickOutside", + filter_show: user_filtering.show_collections?, + multi_selection_combobox_no_selection_label_value: user_filtering.selected_collections_label } do %> + - + - <%= filter_dialog "Collection…" do %> - Collection… + <%= filter_dialog "Collection…" do %> + Collection… - <% if user_filtering.collections.many? %> - <%= text_field_tag nil, nil, placeholder: "Filter…", class: "input input--transparent txt-small font-weight-normal", autofocus: true, - type: "search", autocorrect: "off", autocomplete: "off", data: { "1p-ignore": "true", filter_target: "input", action: "input->filter#filter" } %> - <% end %> - - + + <% end %> + <% end %> <% end %> From e2f0d2f85b038d9dcecef959bf7d6717f0359dc7 Mon Sep 17 00:00:00 2001 From: Jorge Manrubia Date: Thu, 2 Oct 2025 10:26:04 +0200 Subject: [PATCH 09/15] Skip new turbo frame containing events --- app/views/events/event/_layout.html.erb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/views/events/event/_layout.html.erb b/app/views/events/event/_layout.html.erb index 48b25d0bd..69a1560e6 100644 --- a/app/views/events/event/_layout.html.erb +++ b/app/views/events/event/_layout.html.erb @@ -1,9 +1,11 @@ <%= link_to event.notifiable_target, class: "event event--#{ event.action } #{ "golden-effect" if event.card.golden? } center-block flex flex-column full-width align-start justify-start position-relative", style: "--card-color: #{ card.closed? ? "var(--color-card-complete)" : card.color };", - data: { related_element_target: "related", - related_element_group_value: card.id, - action: "mouseover->related-element#highlight mouseout->related-element#unhighlight" } do %> + target: "_top", + data: { + related_element_target: "related", + related_element_group_value: card.id, + action: "mouseover->related-element#highlight mouseout->related-element#unhighlight" } do %>

<%= card.id %> From 08c6a384928542620baf3b88dfdb006b50f82ec6 Mon Sep 17 00:00:00 2001 From: Jorge Manrubia Date: Thu, 2 Oct 2025 10:30:14 +0200 Subject: [PATCH 10/15] Remove falling back status that we don't support anymore --- app/models/card.rb | 1 - app/models/filter/fields.rb | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/models/card.rb b/app/models/card.rb index 9175d6b96..c837c781a 100644 --- a/app/models/card.rb +++ b/app/models/card.rb @@ -22,7 +22,6 @@ class Card < ApplicationRecord case index when "stalled" then stalled when "postponing_soon" then postponing_soon - when "falling_back_soon" then falling_back_soon when "closed" then closed.recently_closed_first when "golden" then golden when "draft" then drafted diff --git a/app/models/filter/fields.rb b/app/models/filter/fields.rb index fc11752fc..027ae8ac6 100644 --- a/app/models/filter/fields.rb +++ b/app/models/filter/fields.rb @@ -1,7 +1,7 @@ module Filter::Fields extend ActiveSupport::Concern - INDEXES = %w[ all stalled postponing_soon falling_back_soon golden draft ] + INDEXES = %w[ all stalled postponing_soon golden draft ] SORTED_BY = %w[ newest oldest latest ] delegate :default_value?, to: :class From 2f38cb3ecd4c9eeccfec9f05fe62b312f2530158 Mon Sep 17 00:00:00 2001 From: Jorge Manrubia Date: Thu, 2 Oct 2025 10:30:32 +0200 Subject: [PATCH 11/15] Wire up collection filtering: it should be performed in the generic cards view --- app/javascript/controllers/filter_settings_controller.js | 8 +++++++- app/views/filters/_settings.html.erb | 3 ++- app/views/filters/settings/_collections.html.erb | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/app/javascript/controllers/filter_settings_controller.js b/app/javascript/controllers/filter_settings_controller.js index 7a207da80..6be549e5c 100644 --- a/app/javascript/controllers/filter_settings_controller.js +++ b/app/javascript/controllers/filter_settings_controller.js @@ -5,7 +5,7 @@ import { post } from "@rails/request.js" export default class extends Controller { static classes = ["filtersSet"] static targets = ["field", "form"] - static values = { refreshUrl: String, noFilteringUrl: String } + static values = { refreshUrl: String, noFilteringUrl: String, cardsUrl: String } initialize() { this.debouncedToggle = debounce(this.#toggle.bind(this), 50) @@ -31,6 +31,12 @@ export default class extends Controller { this.debouncedToggle() } + submitToGenericCardsView() { + this.formTarget.action = this.cardsUrlValue + this.formTarget.dataset.turboFrame = "top" + this.formTarget.requestSubmit() + } + #toggle() { this.element.classList.toggle(this.filtersSetClass, this.#hasFiltersSet) } diff --git a/app/views/filters/_settings.html.erb b/app/views/filters/_settings.html.erb index 16b37ba6d..dbd2f7b66 100644 --- a/app/views/filters/_settings.html.erb +++ b/app/views/filters/_settings.html.erb @@ -6,7 +6,8 @@ toggle_class_toggle_class: "filters--expanded", filter_settings_filters_set_class: "filters--has-filters-set", filter_settings_no_filtering_url_value: no_filtering_url, - filter_settings_refresh_url_value: settings_refresh_path } do %> + filter_settings_refresh_url_value: settings_refresh_path, + filter_settings_cards_url_value: cards_path } do %> <%= form_with url: filter_url, method: :get, class: "", data: { controller: "form", turbo_frame: "cards_container", diff --git a/app/views/filters/settings/_collections.html.erb b/app/views/filters/settings/_collections.html.erb index fffdd65c6..c1bf2d9c2 100644 --- a/app/views/filters/settings/_collections.html.erb +++ b/app/views/filters/settings/_collections.html.erb @@ -29,7 +29,7 @@ <%= tag.li class: "popup__item", data: { filter_target: "item", navigable_list_target: "item", multi_selection_combobox_target: "item", multi_selection_combobox_value: collection.id, multi_selection_combobox_label: collection.name }, role: "checkbox", aria: { checked: filter.collections.include?(collection) } do %> - From 6b10d23fa97b5912a6eb3d9a0eb8dce26e8fe3b3 Mon Sep 17 00:00:00 2001 From: Jorge Manrubia Date: Thu, 2 Oct 2025 14:24:57 +0200 Subject: [PATCH 12/15] Fix: deselect collections in the collections filter --- .../controllers/multi_selection_combobox_controller.js | 6 ++---- app/views/filters/_settings.html.erb | 3 --- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/app/javascript/controllers/multi_selection_combobox_controller.js b/app/javascript/controllers/multi_selection_combobox_controller.js index f67f1cbf0..80d7f0826 100644 --- a/app/javascript/controllers/multi_selection_combobox_controller.js +++ b/app/javascript/controllers/multi_selection_combobox_controller.js @@ -82,15 +82,13 @@ export default class extends Controller { #clearHiddenFields() { this.element.querySelectorAll('input[type="hidden"]').forEach(field => { - if (field !== this.hiddenField) { - field.remove() - } + field.remove() }) } #addHiddenFields() { this.#selectedValues().forEach(value => { - const [field] = this.hiddenFieldTemplateTarget.content.cloneNode(true).children + const [ field ] = this.hiddenFieldTemplateTarget.content.cloneNode(true).children field.removeAttribute("id") field.value = value this.element.appendChild(field) diff --git a/app/views/filters/_settings.html.erb b/app/views/filters/_settings.html.erb index dbd2f7b66..b43909c9a 100644 --- a/app/views/filters/_settings.html.erb +++ b/app/views/filters/_settings.html.erb @@ -15,9 +15,6 @@ action: "turbo:submit-end->filter-settings#resetIfNoFiltering", turbo_action: "advance" } do |form| %> <%= hidden_field_tag :expand_all, true, disabled: !user_filtering.expanded?, data: { toggle_enable_target: "element"} %> - <% user_filtering.filter.collections.each do |collection| %> - <%= filter_hidden_field_tag "collection_ids[]", collection.id %> - <% end %> <%= yield form if block_given? %> From 6c06da6624420b05a533118842e64a647b2fea15 Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Thu, 2 Oct 2025 14:31:07 -0500 Subject: [PATCH 13/15] Fix missing close bracket from merge --- app/views/filters/_settings.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/filters/_settings.html.erb b/app/views/filters/_settings.html.erb index f6fc431f4..b8f907c45 100644 --- a/app/views/filters/_settings.html.erb +++ b/app/views/filters/_settings.html.erb @@ -8,7 +8,7 @@ filter_settings_no_filtering_url_value: no_filtering_url, filter_settings_refresh_url_value: settings_refresh_path, filter_settings_cards_url_value: cards_path, - turbo_permanent: true do %> + turbo_permanent: true } do %> <%= form_with url: filter_url, method: :get, class: "", data: { controller: "form", turbo_frame: "cards_container", From 159a96a339926baa8b3076d8ce15ba5a157f234d Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Thu, 2 Oct 2025 14:31:14 -0500 Subject: [PATCH 14/15] Formatting --- app/views/filters/menu/custom/_filter.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/filters/menu/custom/_filter.html.erb b/app/views/filters/menu/custom/_filter.html.erb index 5ed324e03..b398a18a0 100644 --- a/app/views/filters/menu/custom/_filter.html.erb +++ b/app/views/filters/menu/custom/_filter.html.erb @@ -2,8 +2,8 @@ <%= icon_tag "bookmark", class: "popup__icon" %> <%= link_to cards_path(filter_id: filter.id), class: "popup__btn btn" do %>
-
<%= filter.collections_label %>
-
<%= filter.summary %>
+
<%= filter.collections_label %>
+
<%= filter.summary %>
<% end %> From 67ab3d307edd5a937bc04e2f52dafd5e4be811a8 Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Thu, 2 Oct 2025 15:37:07 -0500 Subject: [PATCH 15/15] Visually hide the pagination indicator It was appearing when the page first loads and anytime you changed the filter --- app/helpers/pagination_helper.rb | 4 ++-- app/views/users/_activity_timeline.html.erb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/helpers/pagination_helper.rb b/app/helpers/pagination_helper.rb index ee665e98a..6c67400c7 100644 --- a/app/helpers/pagination_helper.rb +++ b/app/helpers/pagination_helper.rb @@ -54,8 +54,8 @@ module PaginationHelper def day_timeline_pagination_link(day_timeline, filter) if day_timeline.next_day - link_to "Load more...", events_days_path(day: day_timeline.next_day.strftime("%Y-%m-%d"), **filter.as_params), - data: { frame: day_timeline_pagination_frame_id_for(day_timeline.next_day), pagination_target: "paginationLink" } + link_to "Load more…", events_days_path(day: day_timeline.next_day.strftime("%Y-%m-%d"), **filter.as_params), + class: "txt-reversed", data: { frame: day_timeline_pagination_frame_id_for(day_timeline.next_day), pagination_target: "paginationLink" } end end diff --git a/app/views/users/_activity_timeline.html.erb b/app/views/users/_activity_timeline.html.erb index 1c3b84d56..cbe5ce302 100644 --- a/app/views/users/_activity_timeline.html.erb +++ b/app/views/users/_activity_timeline.html.erb @@ -3,8 +3,8 @@ <%= render "events/day", day_timeline: day_timeline %> <% if day_timeline.next_day %> - <%= link_to "Load more...", user_path(user, day: day_timeline.next_day.strftime("%Y-%m-%d"), **filter.as_params), - data: { frame: day_timeline_pagination_frame_id_for(day_timeline.next_day), pagination_target: "paginationLink" } %> + <%= link_to "Load more…", user_path(user, day: day_timeline.next_day.strftime("%Y-%m-%d"), **filter.as_params), + class: "txt-reversed", data: { frame: day_timeline_pagination_frame_id_for(day_timeline.next_day), pagination_target: "paginationLink" } %> <% end %> <% end %>