diff --git a/app/assets/stylesheets/fizzy-menu.css b/app/assets/stylesheets/fizzy-menu.css index cb7361a72..7a38895f3 100644 --- a/app/assets/stylesheets/fizzy-menu.css +++ b/app/assets/stylesheets/fizzy-menu.css @@ -52,6 +52,7 @@ flex-wrap: wrap; gap: var(--gap); inline-size: 100%; + list-style: none; justify-content: center; margin: var(--block-space) auto calc(var(--block-space-half) / 2); max-inline-size: 100%; diff --git a/app/javascript/controllers/navigable_list_controller.js b/app/javascript/controllers/navigable_list_controller.js index 533c3bb89..78a7e2176 100644 --- a/app/javascript/controllers/navigable_list_controller.js +++ b/app/javascript/controllers/navigable_list_controller.js @@ -74,6 +74,8 @@ export default class extends Controller { async #setCurrentFrom(element) { const selectedItem = this.#visibleItems.find(item => item.contains(element)) + console.log(selectedItem) + if (selectedItem) { this.#clearSelection() selectedItem.setAttribute(this.selectionAttributeValue, "true") diff --git a/app/views/cards/index/_collections_filter.html.erb b/app/views/cards/index/_collections_filter.html.erb index 7761ce1ad..3b3b6580f 100644 --- a/app/views/cards/index/_collections_filter.html.erb +++ b/app/views/cards/index/_collections_filter.html.erb @@ -5,14 +5,14 @@ <% end %> <% if Current.user.collections.one? %> - <%= link_to cards_path(filter.as_params.except(:collection_ids)), class: "popup__group", data: { filter_target: "item", navigable_list_target: "item" } do %> + <%= link_to cards_path(filter.as_params.except(:collection_ids)), class: "popup__group", id: "filter-collection-init", data: { filter_target: "item", navigable_list_target: "item" } do %> <%= tag.div class: "popup__item btn" do %> <%= Current.user.collections.first.name %> GO TO <% end %> <% end %> <% elsif Current.user.collections.many? %> - <%= link_to cards_path(filter.as_params.except(:collection_ids)), class: "popup__group", data: { filter_target: "item", navigable_list_target: "item" } do %> + <%= link_to cards_path(filter.as_params.except(:collection_ids)), class: "popup__group", id: "filter-collections-all", data: { filter_target: "item", navigable_list_target: "item" } do %>