From 424b33979c56be69f6625cacd2eb9d151c0dd90b Mon Sep 17 00:00:00 2001 From: Andy Smith Date: Tue, 22 Jul 2025 14:29:05 -0500 Subject: [PATCH 1/3] Removed redundant div --- app/views/cards/container/_title.html.erb | 13 ++++++------- app/views/cards/edit.html.erb | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/app/views/cards/container/_title.html.erb b/app/views/cards/container/_title.html.erb index 3f2ff79c7..451914953 100644 --- a/app/views/cards/container/_title.html.erb +++ b/app/views/cards/container/_title.html.erb @@ -17,13 +17,12 @@ autofocus: card.title.blank? || params[:focus_on_title], rows: 1, data: { autoresize_target: "textarea", action: "input->autoresize#resize auto-save#change blur->auto-save#submit keydown.enter->auto-save#submit:prevent keydown.ctrl+enter->auto-save#submit:prevent" } %> -
- <%= form.rich_textarea :description, class: "card-field__description", - placeholder: "Add some notes, context, pictures, or video about this…", - data: { action: "actiontext:change->auto-save#change focusout->auto-save#submit keydown.ctrl+enter->form#submit:prevent keydown.meta+enter->form#submit:prevent keydown.esc->form#cancel:stop" } do %> - <%= mentions_prompt(card.collection) %> - <%= cards_prompt %> + + <%= form.rich_textarea :description, class: "card-field__description", + placeholder: "Add some notes, context, pictures, or video about this…", + data: { action: "actiontext:change->auto-save#change focusout->auto-save#submit keydown.ctrl+enter->form#submit:prevent keydown.meta+enter->form#submit:prevent keydown.esc->form#cancel:stop" } do %> + <%= mentions_prompt(card.collection) %> + <%= cards_prompt %> <% end %> -
<% end %> <% end %> diff --git a/app/views/cards/edit.html.erb b/app/views/cards/edit.html.erb index 8cf623422..5813d2e32 100644 --- a/app/views/cards/edit.html.erb +++ b/app/views/cards/edit.html.erb @@ -14,7 +14,7 @@ <%= mentions_prompt(@card.collection) %> <%= cards_prompt %> <% end %> - + <%= form.button "Save changes", type: :submit, class: "btn btn--reversed", style: "--btn-background: #{@card.color}" %> <%= link_to "Close editor and discard changes", collection_card_path(@card.collection, @card), data: { form_target: "cancel" }, hidden: true %> <% end %> From 9489e23fc49f2f7be836e24cf6204ce35d47295c Mon Sep 17 00:00:00 2001 From: Andy Smith Date: Tue, 22 Jul 2025 14:32:43 -0500 Subject: [PATCH 2/3] Add margins to the input instead of a wrapper. --- app/views/cards/container/_title.html.erb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/views/cards/container/_title.html.erb b/app/views/cards/container/_title.html.erb index 451914953..6ad7d5829 100644 --- a/app/views/cards/container/_title.html.erb +++ b/app/views/cards/container/_title.html.erb @@ -17,8 +17,7 @@ autofocus: card.title.blank? || params[:focus_on_title], rows: 1, data: { autoresize_target: "textarea", action: "input->autoresize#resize auto-save#change blur->auto-save#submit keydown.enter->auto-save#submit:prevent keydown.ctrl+enter->auto-save#submit:prevent" } %> - - <%= form.rich_textarea :description, class: "card-field__description", + <%= form.rich_textarea :description, class: "card-field__description margin-block-start-half margin-block-end", placeholder: "Add some notes, context, pictures, or video about this…", data: { action: "actiontext:change->auto-save#change focusout->auto-save#submit keydown.ctrl+enter->form#submit:prevent keydown.meta+enter->form#submit:prevent keydown.esc->form#cancel:stop" } do %> <%= mentions_prompt(card.collection) %> From 9e3b51c48f57d826f72dfcbab9999724fbdd76dc Mon Sep 17 00:00:00 2001 From: Andy Smith Date: Tue, 22 Jul 2025 14:35:07 -0500 Subject: [PATCH 3/3] Make CSS less broad in scope --- app/assets/stylesheets/cards.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/stylesheets/cards.css b/app/assets/stylesheets/cards.css index aaf6056b1..4866e83b0 100644 --- a/app/assets/stylesheets/cards.css +++ b/app/assets/stylesheets/cards.css @@ -107,7 +107,7 @@ .card__description { /* Hide the empty element that Lexical saves when nothing is added to the description


*/ - p:only-child:has(br:only-child) { + action-text-content p:only-child:has(br:only-child) { display: none; }