From f962368155d3e78351675ac90bea6b128360df13 Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Fri, 31 Oct 2025 16:20:42 -0500 Subject: [PATCH 1/2] Treat the collection link like a back button rather than a title --- app/helpers/collections_helper.rb | 7 +++---- app/views/cards/show.html.erb | 4 +++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/helpers/collections_helper.rb b/app/helpers/collections_helper.rb index 3342cb480..c6da036a5 100644 --- a/app/helpers/collections_helper.rb +++ b/app/helpers/collections_helper.rb @@ -1,9 +1,8 @@ module CollectionsHelper def link_back_to_collection(collection) - link_to collection, class: "header__title btn borderless txt-large", - style: "--btn-padding: 0.25ch 1ch 0.25ch 0.75ch; view-transistion-name: card-collection-title;", + link_to collection, class: "btn borderless txt-medium", data: { controller: "hotkey", action: "keydown.esc@document->hotkey#click click->turbo-navigation#backIfSamePath" } do - tag.span ("←" + tag.strong(collection.name, class: "font-black")).html_safe + tag.span ("←" + tag.strong(collection.name, class: "overflow-ellipsis")).html_safe end end @@ -12,4 +11,4 @@ module CollectionsHelper icon_tag("settings") + tag.span("Settings for #{collection.name}", class: "for-screen-reader") end end -end +end \ No newline at end of file diff --git a/app/views/cards/show.html.erb b/app/views/cards/show.html.erb index 0d4be32cb..5c5549fa4 100644 --- a/app/views/cards/show.html.erb +++ b/app/views/cards/show.html.erb @@ -6,7 +6,9 @@ <% end %> <% content_for :header do %> - <%= link_back_to_collection(@card.collection) %> +
+ <%= link_back_to_collection(@card.collection) %> +
<% end %> <%= turbo_stream_from @card %> From 54c4f09f0fc253ca9982359bd2304ef58f7240fd Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Fri, 31 Oct 2025 16:24:32 -0500 Subject: [PATCH 2/2] + Newline EOF --- app/helpers/collections_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/collections_helper.rb b/app/helpers/collections_helper.rb index c6da036a5..d10b00a4c 100644 --- a/app/helpers/collections_helper.rb +++ b/app/helpers/collections_helper.rb @@ -11,4 +11,4 @@ module CollectionsHelper icon_tag("settings") + tag.span("Settings for #{collection.name}", class: "for-screen-reader") end end -end \ No newline at end of file +end