From 49a3743fb4321dddd7f62672d4ff63dd391e4a8d Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Sun, 2 Aug 2026 20:22:27 +0000 Subject: [PATCH 1/2] Clarify entry deletion on edit page Co-authored-by: Paul Arterburn --- app/assets/stylesheets/entries.scss | 5 +++++ app/views/entries/edit.html.haml | 6 +++--- spec/features/entries_spec.rb | 12 ++++++++++++ 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/app/assets/stylesheets/entries.scss b/app/assets/stylesheets/entries.scss index f26f25b4..66af6351 100644 --- a/app/assets/stylesheets/entries.scss +++ b/app/assets/stylesheets/entries.scss @@ -102,6 +102,11 @@ a.s-delete { } } +.delete-entry-action { + margin-top: 15px; + text-align: center; +} + .s-unsubscribe { -webkit-appearance: none; background: none; diff --git a/app/views/entries/edit.html.haml b/app/views/entries/edit.html.haml index 58ada6bd..6b879f15 100644 --- a/app/views/entries/edit.html.haml +++ b/app/views/entries/edit.html.haml @@ -15,9 +15,6 @@ -if @entry.inspiration.present? .float-left.s-edit-entry{rel: "popover", title: "#{@entry.inspiration.inspired_by}", data: { content: "#{@entry.inspiration.body.html_safe}" }} %i.fa.fa-lightbulb-o - .float-right.s-edit-entry{rel: "tooltip", title: "Delete this entry"} - = link_to entry_path(@entry), class: "s-delete", method: :delete, data: { confirm: 'Are you sure you want to delete this entry? There is no undo.' } do - %i.fa.fa-trash %h2= @entry.date_format_short %h3 %span @@ -61,6 +58,9 @@ %div = f.submit "Update Entry", class: "form-control btn btn-primary" + .delete-entry-action + = link_to "delete this entry", entry_path(@entry), class: "s-delete", method: :delete, data: { confirm: 'Are you sure you want to delete this entry? There is no undo.' } + :javascript var summer_note = $('#entry_entry'); summer_note.summernote({ diff --git a/spec/features/entries_spec.rb b/spec/features/entries_spec.rb index 5696897f..999e7320 100644 --- a/spec/features/entries_spec.rb +++ b/spec/features/entries_spec.rb @@ -141,4 +141,16 @@ end end + describe 'edit' do + it 'shows a clear delete link below the update button' do + sign_in paid_user + visit edit_entry_url(paid_entry) + + delete_link = page.find('form + .delete-entry-action a.s-delete', text: 'delete this entry') + expect(delete_link['data-method']).to eq('delete') + expect(delete_link['data-confirm']).to eq('Are you sure you want to delete this entry? There is no undo.') + expect(page).not_to have_css('.s-entry-date .fa-trash') + end + end + end From 9ba2caeda39acde136237c75a11c62ac95d75a1b Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Sun, 2 Aug 2026 20:55:06 +0000 Subject: [PATCH 2/2] Capitalize delete entry link Co-authored-by: Paul Arterburn --- app/views/entries/edit.html.haml | 2 +- spec/features/entries_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/entries/edit.html.haml b/app/views/entries/edit.html.haml index 6b879f15..f062a66f 100644 --- a/app/views/entries/edit.html.haml +++ b/app/views/entries/edit.html.haml @@ -59,7 +59,7 @@ = f.submit "Update Entry", class: "form-control btn btn-primary" .delete-entry-action - = link_to "delete this entry", entry_path(@entry), class: "s-delete", method: :delete, data: { confirm: 'Are you sure you want to delete this entry? There is no undo.' } + = link_to "Delete Entry", entry_path(@entry), class: "s-delete", method: :delete, data: { confirm: 'Are you sure you want to delete this entry? There is no undo.' } :javascript var summer_note = $('#entry_entry'); diff --git a/spec/features/entries_spec.rb b/spec/features/entries_spec.rb index 999e7320..b6ef9941 100644 --- a/spec/features/entries_spec.rb +++ b/spec/features/entries_spec.rb @@ -146,7 +146,7 @@ sign_in paid_user visit edit_entry_url(paid_entry) - delete_link = page.find('form + .delete-entry-action a.s-delete', text: 'delete this entry') + delete_link = page.find('form + .delete-entry-action a.s-delete', text: 'Delete Entry') expect(delete_link['data-method']).to eq('delete') expect(delete_link['data-confirm']).to eq('Are you sure you want to delete this entry? There is no undo.') expect(page).not_to have_css('.s-entry-date .fa-trash')