From da13744ad9858a0ab02ecfd9be1ed57b6fd0c5f9 Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Thu, 12 Jun 2025 14:19:52 -0500 Subject: [PATCH 01/11] Allow adding new cards even in filtered or All Collections views This is viable now that you can change the collection a card is in as introduced in c4ca5d34e48007fc73448b0ff7ebc8fa9dbea877 --- app/views/cards/index/engagement/_considering.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/cards/index/engagement/_considering.html.erb b/app/views/cards/index/engagement/_considering.html.erb index a3604335e..3c081ebbf 100644 --- a/app/views/cards/index/engagement/_considering.html.erb +++ b/app/views/cards/index/engagement/_considering.html.erb @@ -3,7 +3,7 @@ Considering - <% if collection = filter.single_collection || (Current.user.collections.first if Current.user.collections.one?) %> + <% if collection = filter.single_collection || Current.user.collections.first %> <%= button_to collection_cards_path(collection), method: :post, class: "card card--new-card-button btn", form_class: "full-width" do %>
<%= icon_tag "add" %> From f2473a4770039eb8164379633ba9ede65fe19a23 Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Thu, 12 Jun 2025 15:39:38 -0500 Subject: [PATCH 02/11] Add an obvious link to the collection --- app/assets/stylesheets/card-perma.css | 4 ++++ app/views/cards/index.html.erb | 6 +++--- app/views/cards/show.html.erb | 6 ++++++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/app/assets/stylesheets/card-perma.css b/app/assets/stylesheets/card-perma.css index f61b22806..c17819c59 100644 --- a/app/assets/stylesheets/card-perma.css +++ b/app/assets/stylesheets/card-perma.css @@ -74,6 +74,10 @@ } } + .card-perma__collection-header { + margin-block-end: 4ch; + } + /* Child items /* ------------------------------------------------------------------------ */ diff --git a/app/views/cards/index.html.erb b/app/views/cards/index.html.erb index 8d25e5c7e..997ec7a30 100644 --- a/app/views/cards/index.html.erb +++ b/app/views/cards/index.html.erb @@ -6,10 +6,10 @@ <%= render "cards/index/header", filter: @filter %> <% end %> -
-

+
+ <%= filter_title @filter %> -

+ <%= render "filters/settings", filter: @filter %>
diff --git a/app/views/cards/show.html.erb b/app/views/cards/show.html.erb index ef0989929..d4829446c 100644 --- a/app/views/cards/show.html.erb +++ b/app/views/cards/show.html.erb @@ -29,6 +29,12 @@ <% end %> +
+ <%= link_to cards_path(collection_ids: [ @card.collection ]), class: "txt-large overflow-ellipsis margin-none txt-ink", style: "view-transistion-name: card-colleciton-title" do %> + ← <%= @card.collection.name %> + <% end %> +
+
<%= render "cards/container", card: @card %> From 99af6b1e5c6b2053ee3ee2b8d831f656657ce986 Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Thu, 12 Jun 2025 15:43:03 -0500 Subject: [PATCH 03/11] Don't navigate, activate the menu --- app/views/cards/display/common/_collection.html.erb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/views/cards/display/common/_collection.html.erb b/app/views/cards/display/common/_collection.html.erb index aacabb869..2fe9356dc 100644 --- a/app/views/cards/display/common/_collection.html.erb +++ b/app/views/cards/display/common/_collection.html.erb @@ -1,6 +1,5 @@ -
+
\ No newline at end of file + \ No newline at end of file From 913fc7b30e3b5379ed8702c68f698871c2dfac19 Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Thu, 12 Jun 2025 15:47:01 -0500 Subject: [PATCH 04/11] Only in the presence of the top notch --- app/assets/stylesheets/card-perma.css | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/card-perma.css b/app/assets/stylesheets/card-perma.css index c17819c59..9a4de11ed 100644 --- a/app/assets/stylesheets/card-perma.css +++ b/app/assets/stylesheets/card-perma.css @@ -75,7 +75,11 @@ } .card-perma__collection-header { - margin-block-end: 4ch; + margin-block-end: var(--block-space); + + #main:has(.card-perma__notch--top) & { + margin-block-end: 4ch; + } } /* Child items From 1adc48eeabec8ade00603cf16a3b7ee3c74a0c90 Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Thu, 12 Jun 2025 15:51:15 -0500 Subject: [PATCH 05/11] Fix typo, move to peer element --- app/views/cards/index.html.erb | 4 ++-- app/views/cards/show.html.erb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/cards/index.html.erb b/app/views/cards/index.html.erb index 997ec7a30..33a2d752e 100644 --- a/app/views/cards/index.html.erb +++ b/app/views/cards/index.html.erb @@ -6,8 +6,8 @@ <%= render "cards/index/header", filter: @filter %> <% end %> -
- +
+ <%= filter_title @filter %> <%= render "filters/settings", filter: @filter %> diff --git a/app/views/cards/show.html.erb b/app/views/cards/show.html.erb index d4829446c..f8d83cfb0 100644 --- a/app/views/cards/show.html.erb +++ b/app/views/cards/show.html.erb @@ -30,7 +30,7 @@ <% end %>
- <%= link_to cards_path(collection_ids: [ @card.collection ]), class: "txt-large overflow-ellipsis margin-none txt-ink", style: "view-transistion-name: card-colleciton-title" do %> + <%= link_to cards_path(collection_ids: [ @card.collection ]), class: "txt-large overflow-ellipsis margin-none txt-ink", style: "view-transistion-name: card-collection-title" do %> ← <%= @card.collection.name %> <% end %>
From 123a21362ed1714f50b43d5ebb1a221b5051de9b Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Thu, 12 Jun 2025 16:46:01 -0500 Subject: [PATCH 06/11] Add Fizzy menu to card perma --- app/views/cards/show.html.erb | 5 +-- app/views/cards/show/_collections.html.erb | 48 ++++++++++++++++++++++ app/views/cards/show/_header.html.erb | 43 +++++++++++++++++++ 3 files changed, 92 insertions(+), 4 deletions(-) create mode 100644 app/views/cards/show/_collections.html.erb create mode 100644 app/views/cards/show/_header.html.erb diff --git a/app/views/cards/show.html.erb b/app/views/cards/show.html.erb index f8d83cfb0..4b7cf2f5b 100644 --- a/app/views/cards/show.html.erb +++ b/app/views/cards/show.html.erb @@ -23,10 +23,7 @@
<% end %> - + <%= render "cards/show/header" %> <% end %>
diff --git a/app/views/cards/show/_collections.html.erb b/app/views/cards/show/_collections.html.erb new file mode 100644 index 000000000..581ed1c10 --- /dev/null +++ b/app/views/cards/show/_collections.html.erb @@ -0,0 +1,48 @@ +<%= form_with url: cards_path, method: :get, class: "flex flex-column max-width popup__list full-width", + data: { controller: "form" } do |form| %> + <% if Current.user.collections.one? %> + <%= link_to cards_path, class: "popup__group flex align-center", data: { value: Current.user.collections.first.name.downcase, filter_target: "item", navigable_list_target: "item" } do %> + <%= tag.div class: "btn popup__item min-width flex-item-grow" do %> + <%= Current.user.collections.first.name %> + GO TO + <% end %> + <% end %> + <% elsif Current.user.collections.many? %> + <%= link_to cards_path, class: "popup__group flex align-center", data: { value: "all collections", filter_target: "item", navigable_list_target: "item" } do %> + + <%= tag.div class: "btn popup__item min-width flex-item-grow" do %> + All collections + GO TO + <% end %> + <% end %> + + <% Current.user.collections.order(:name).each do |collection| %> + + <% end %> + <% end %> +<% end %> diff --git a/app/views/cards/show/_header.html.erb b/app/views/cards/show/_header.html.erb new file mode 100644 index 000000000..e0ccbb91b --- /dev/null +++ b/app/views/cards/show/_header.html.erb @@ -0,0 +1,43 @@ + \ No newline at end of file From fd33911273665956f1bb4da3cafebaf8cf96083f Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Mon, 16 Jun 2025 14:13:52 -0500 Subject: [PATCH 07/11] Don't match hotkeys inside Lexical --- app/javascript/controllers/hotkey_controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/controllers/hotkey_controller.js b/app/javascript/controllers/hotkey_controller.js index 2106155f3..1c85d69e8 100644 --- a/app/javascript/controllers/hotkey_controller.js +++ b/app/javascript/controllers/hotkey_controller.js @@ -9,7 +9,7 @@ export default class extends Controller { } #shouldIgnore(event) { - return event.defaultPrevented || event.target.closest("input, textarea") + return event.defaultPrevented || event.target.closest("input, textarea, lexical-editor") } get #isClickable() { From 71117409bbacad923eba975e32eed775e75c7ebe Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Mon, 16 Jun 2025 16:06:56 -0500 Subject: [PATCH 08/11] Rework Fizzy menu design - Adds dialpad actions with shortcuts - Makes everything respond to filtering and navigation w/keyboard --- app/assets/images/clipboard.svg | 1 + app/assets/images/collection-add.svg | 1 + app/assets/images/collection.svg | 1 + app/assets/stylesheets/buttons.css | 38 ++++++++++ app/assets/stylesheets/fizzy-menu.css | 10 +++ app/assets/stylesheets/icons.css | 3 + app/views/cards/index/_header.html.erb | 5 +- app/views/cards/show/_header.html.erb | 75 +++++++++---------- app/views/events/_filter.html.erb | 9 +-- .../filter/_custom_collections.html.erb | 18 +---- app/views/events/filter/_header.html.erb | 42 +++++++++-- .../filter/_new_collection_option.html.erb | 7 -- app/views/events/index.html.erb | 7 -- 13 files changed, 130 insertions(+), 87 deletions(-) create mode 100644 app/assets/images/clipboard.svg create mode 100644 app/assets/images/collection-add.svg create mode 100644 app/assets/images/collection.svg delete mode 100644 app/views/events/filter/_new_collection_option.html.erb diff --git a/app/assets/images/clipboard.svg b/app/assets/images/clipboard.svg new file mode 100644 index 000000000..76025da1d --- /dev/null +++ b/app/assets/images/clipboard.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/collection-add.svg b/app/assets/images/collection-add.svg new file mode 100644 index 000000000..5b3d88aad --- /dev/null +++ b/app/assets/images/collection-add.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/collection.svg b/app/assets/images/collection.svg new file mode 100644 index 000000000..5d6249839 --- /dev/null +++ b/app/assets/images/collection.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/stylesheets/buttons.css b/app/assets/stylesheets/buttons.css index 4c6e84874..791655cb1 100644 --- a/app/assets/stylesheets/buttons.css +++ b/app/assets/stylesheets/buttons.css @@ -225,5 +225,43 @@ inline-size: 100%; } } + + .btn__group--chunky { + --gap: 0.2em; + + gap: var(--gap); + margin: var(--block-space-half) auto calc(var(--block-space-half) / 2); + + .btn { + --btn-border-radius: 0.4em; + + align-content: end; + aspect-ratio: 5/3; + flex-basis: calc(33% - var(--gap) / 3); + flex-direction: column; + font-size: var(--text-small); + line-height: 1; + justify-content: center; + position: relative; + row-gap: 0.3lh; + text-align: center; + + kbd { + border: none; + box-shadow: none; + inset: 0.66em 0.33em auto auto; + opacity: 0.5; + position: absolute; + } + + .icon { + --icon-size: 2em !important; + } + + span { + display: flex; + } + } + } } diff --git a/app/assets/stylesheets/fizzy-menu.css b/app/assets/stylesheets/fizzy-menu.css index 77a5d95f3..29e2c5631 100644 --- a/app/assets/stylesheets/fizzy-menu.css +++ b/app/assets/stylesheets/fizzy-menu.css @@ -1,3 +1,13 @@ +.fizzy-dialog { + --panel-border-color: var(--color-selected-dark); + --panel-border-radius: 1.4em; + + box-shadow: 0 0 0 1px oklch(var(--lch-blue-medium) / 5%), + 0 0.2em 0.2em oklch(var(--lch-blue-medium) / 5%), + 0 0.4em 0.4em oklch(var(--lch-blue-medium) / 5%), + 0 0.8em 0.8em oklch(var(--lch-blue-medium) / 5%); +} + .fizzy-menu { --input-border-color: var(--color-selected-dark); --input-padding: 0.2em 2em 0.2em 0.9em; diff --git a/app/assets/stylesheets/icons.css b/app/assets/stylesheets/icons.css index e1e041b4b..ef10e142f 100644 --- a/app/assets/stylesheets/icons.css +++ b/app/assets/stylesheets/icons.css @@ -30,7 +30,10 @@ .icon--camera { --svg: url("camera.svg "); } .icon--caret-down { --svg: url("caret-down.svg "); } .icon--check { --svg: url("check.svg "); } + .icon--clipboard { --svg: url("clipboard.svg "); } .icon--close { --svg: url("close.svg "); } + .icon--collection { --svg: url("collection.svg "); } + .icon--collection-add { --svg: url("collection-add.svg "); } .icon--comment { --svg: url("comment.svg "); } .icon--copy-paste { --svg: url("copy-paste.svg "); } .icon--crown { --svg: url("crown.svg "); } diff --git a/app/views/cards/index/_header.html.erb b/app/views/cards/index/_header.html.erb index 8b39f39a4..1422c5fb6 100644 --- a/app/views/cards/index/_header.html.erb +++ b/app/views/cards/index/_header.html.erb @@ -18,17 +18,16 @@ Fizzy <% end %> - <%= tag.dialog class:"filter popup popup--animated panel flex-column align-start gap-half fill-white shadow", + <%= tag.dialog class:"fizzy-dialog filter popup popup--animated panel flex-column align-start fill-white", data: { action: "turbo:before-cache@document->dialog#close keydown->navigable-list#navigate filter:changed->navigable-list#reset", controller: "filter navigable-list", dialog_target: "dialog", navigable_list_focus_on_selection_value: false, navigable_list_actionable_items_value: true } do %> - <%= render "events/filter/header" %> - <%= render "events/filter/new_collection_option" %> <%= text_field_tag :search, nil, placeholder: "Filter…", class: "input input--transparent txt-small", autofocus: true, type: "search", autocorrect: "off", autocomplete: "off", data: { "1p-ignore": "true", filter_target: "input", action: "input->filter#filter" } %> + <%= render "events/filter/header" %> <%= render "cards/index/collections_filter", filter: filter %> diff --git a/app/views/cards/show/_header.html.erb b/app/views/cards/show/_header.html.erb index e0ccbb91b..355b9de7f 100644 --- a/app/views/cards/show/_header.html.erb +++ b/app/views/cards/show/_header.html.erb @@ -1,43 +1,36 @@ \ No newline at end of file + <%= tag.dialog class:"fizzy-dialog filter popup popup--animated panel flex-column align-start fill-white", + data: { + action: "turbo:before-cache@document->dialog#close keydown->navigable-list#navigate filter:changed->navigable-list#reset", + controller: "filter navigable-list", + dialog_target: "dialog", + navigable_list_focus_on_selection_value: false, + navigable_list_actionable_items_value: true } do %> + <%= text_field_tag :search, nil, placeholder: "Filter…", class: "input input--transparent txt-small", autofocus: true, + type: "search", autocorrect: "off", autocomplete: "off", data: { "1p-ignore": "true", filter_target: "input", action: "input->filter#filter" } %> + <%= render "events/filter/header" %> + + <%= render "cards/show/collections" %> + +

+ Press <%= hotkey_label(["ctrl", "J"]) -%> anytime to open this, esc to close, to move, enter to navigate, SHIFT+ENTER to select. +

+ <% end %> +
+ + \ No newline at end of file diff --git a/app/views/events/_filter.html.erb b/app/views/events/_filter.html.erb index 4f1a6f06a..7fca3769a 100644 --- a/app/views/events/_filter.html.erb +++ b/app/views/events/_filter.html.erb @@ -13,7 +13,7 @@ Fizzy <% end %> - <%= tag.dialog class: "filter events__popup popup popup--animated panel flex-column align-start gap-half fill-white shadow", + <%= tag.dialog class: "fizzy-dialog filter events__popup popup popup--animated panel flex-column align-start fill-white", style: "z-index: 5;", data: { action: "turbo:before-cache@document->dialog#close keydown->navigable-list#navigate filter:changed->navigable-list#reset", @@ -21,19 +21,16 @@ dialog_target: "dialog", navigable_list_focus_on_selection_value: false, navigable_list_actionable_items_value: true } do %> - <%= render "events/filter/header" %> - <%= render "events/filter/new_collection_option" %> - <%= text_field_tag :search, nil, placeholder: "Filter…", class: "input input--transparent txt-small", autofocus: true, type: "search", autocorrect: "off", autocomplete: "off", data: { "1p-ignore": "true", filter_target: "input", action: "input->filter#filter" } %> + <%= render "events/filter/header" %> <%= render "events/filter/custom_collections" %> <%= form_with url: events_path, method: :get, class: "flex flex-column max-width popup__list full-width", data: { controller: "form" } do |form| %> - <%= render "events/filter/all_collections_option", form: form, filter: filter %> - <% if Current.user.collections.many? %>
+ <%= render "events/filter/all_collections_option", form: form, filter: filter %> <%= render partial: "events/filter/collection_option", collection: Current.user.collections.alphabetically, as: :collection, locals: { form: form, filter: filter } %>
<% end %> diff --git a/app/views/events/filter/_custom_collections.html.erb b/app/views/events/filter/_custom_collections.html.erb index 033cbbb8e..591d6fdfa 100644 --- a/app/views/events/filter/_custom_collections.html.erb +++ b/app/views/events/filter/_custom_collections.html.erb @@ -1,23 +1,7 @@