From 7d095c87b18d37f3b8a6aa84e30081f643cde6f2 Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Tue, 11 Nov 2025 17:54:56 -0600 Subject: [PATCH] Simplify label, try showing the hotkey outside the button when we have room --- app/views/cards/comments/_new.html.erb | 13 ++++++++----- test/system/smoke_test.rb | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/app/views/cards/comments/_new.html.erb b/app/views/cards/comments/_new.html.erb index 46e6333b0..cd46d7cb4 100644 --- a/app/views/cards/comments/_new.html.erb +++ b/app/views/cards/comments/_new.html.erb @@ -13,13 +13,16 @@ data: { local_save_target: "input", action: "lexxy:change->form#disableSubmitWhenInvalid lexxy:change->local-save#save turbo:morph-element->local-save#restoreContent" } do %> <%= general_prompts(@card.board) %> <% end %> - <%= form.button class: "comment__submit btn btn--reversed flex-item-justify-start", - data: { form_target: "submit" }, disabled: true do %> - Post this comment - + + + <%= form.button class: "comment__submit btn btn--reversed", + data: { form_target: "submit" }, disabled: true do %> + Post + <% end %> + <%= hotkey_label([ "ctrl", "enter" ]) %> - <% end %> + <% end %> diff --git a/test/system/smoke_test.rb b/test/system/smoke_test.rb index 76c601024..d899aa450 100644 --- a/test/system/smoke_test.rb +++ b/test/system/smoke_test.rb @@ -27,7 +27,7 @@ class SmokeTest < ApplicationSystemTestCase assert_selector "figcaption input[placeholder='moon.jpg']" end - click_on "Post this comment" + click_on "Post" within("action-text-attachment") do assert_selector "a img[src*='/rails/active_storage']"