Simplify label, try showing the hotkey outside the button when we have room

This commit is contained in:
Jason Zimdars
2025-11-11 17:54:56 -06:00
parent 7274661313
commit 7d095c87b1
2 changed files with 9 additions and 6 deletions
+8 -5
View File
@@ -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 %>
<span>Post this comment</span>
<span class="hide-on-touch">
<span class="flex-inline align-center gap">
<%= form.button class: "comment__submit btn btn--reversed",
data: { form_target: "submit" }, disabled: true do %>
<span>Post</span>
<% end %>
<span class="hide-on-touch txt-subtle">
<kbd class="txt-x-small"><%= hotkey_label([ "ctrl", "enter" ]) %></kbd>
</span>
<% end %>
</span>
<span data-form-target="cancel" hidden></span>
<% end %>
</div>
+1 -1
View File
@@ -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']"