From 74dc92fd39df538f3fce058547ca1d5743507ac6 Mon Sep 17 00:00:00 2001 From: Alexander Zaytsev Date: Thu, 5 Mar 2026 17:30:44 +0100 Subject: [PATCH 01/14] Update wording --- app/views/account/settings/_cancellation.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/account/settings/_cancellation.html.erb b/app/views/account/settings/_cancellation.html.erb index 49f87512fd..2b8172966e 100644 --- a/app/views/account/settings/_cancellation.html.erb +++ b/app/views/account/settings/_cancellation.html.erb @@ -1,8 +1,8 @@ <% if Current.account.cancellable? && Current.user.owner? %>
-

Cancel account

-
Delete your Fizzy account.
+

Danger zone

+
Permanently delete your account and all its data, including users, boards, and cards.
From 615ac948c8d1e5cfecfc75bfa5edeed486174c38 Mon Sep 17 00:00:00 2001 From: Alexander Zaytsev Date: Thu, 5 Mar 2026 17:31:48 +0100 Subject: [PATCH 02/14] Add styles for danger zone section --- app/assets/stylesheets/settings.css | 10 ++++++++++ app/views/account/settings/_cancellation.html.erb | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/settings.css b/app/assets/stylesheets/settings.css index bd12916fc4..07644922eb 100644 --- a/app/assets/stylesheets/settings.css +++ b/app/assets/stylesheets/settings.css @@ -62,6 +62,16 @@ } } + .settings__section--negative { + h2 { + color: var(--color-negative); + } + + .divider { + --divider-color: oklch(var(--lch-red-light)); + } + } + .settings__section:has(.settings__scrollable-list) { @media (min-width: 640px) { display: flex; diff --git a/app/views/account/settings/_cancellation.html.erb b/app/views/account/settings/_cancellation.html.erb index 2b8172966e..9b80ed0641 100644 --- a/app/views/account/settings/_cancellation.html.erb +++ b/app/views/account/settings/_cancellation.html.erb @@ -1,7 +1,7 @@ <% if Current.account.cancellable? && Current.user.owner? %> -
+
-

Danger zone

+

Danger zone

Permanently delete your account and all its data, including users, boards, and cards.
From 932d40878f0a652d112a3a93d62fa483a315b70d Mon Sep 17 00:00:00 2001 From: Alexander Zaytsev Date: Thu, 5 Mar 2026 18:06:10 +0100 Subject: [PATCH 03/14] Extract generic `.checkbox` from `.step__checkbox` --- app/assets/stylesheets/inputs.css | 37 +++++++++++++++++++ app/assets/stylesheets/steps.css | 34 ----------------- app/views/cards/display/perma/_steps.html.erb | 2 +- app/views/cards/steps/_step.html.erb | 2 +- app/views/cards/steps/edit.html.erb | 2 +- app/views/public/cards/show/_steps.html.erb | 2 +- 6 files changed, 41 insertions(+), 38 deletions(-) diff --git a/app/assets/stylesheets/inputs.css b/app/assets/stylesheets/inputs.css index 95bd3d00f3..827312842b 100644 --- a/app/assets/stylesheets/inputs.css +++ b/app/assets/stylesheets/inputs.css @@ -314,4 +314,41 @@ margin: 0; } } + + /* Checkboxes */ + .checkbox { + appearance: none; + background-color: var(--color-canvas); + block-size: 1.1em; + border: 1px solid currentColor; + border-radius: 0.15em; + color: currentColor; + display: grid; + font: inherit; + inline-size: 1.1em; + margin: 0; + place-content: center; + transform: translateY(0.1em); + + &::before { + background-color: CanvasText; + block-size: 0.65em; + box-shadow: inset 1em 1em currentColor; + clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%); + content: ""; + inline-size: 0.65em; + transform: scale(0); + transform-origin: center; + transition: 150ms transform ease-in-out; + } + + &:checked::before { + transform: scale(1) rotate(10deg); + } + + &:where([disabled]):not(:hover):not(:active) { + filter: none; + opacity: 0.5; + } + } } diff --git a/app/assets/stylesheets/steps.css b/app/assets/stylesheets/steps.css index b9b40c8fa5..7a608b4127 100644 --- a/app/assets/stylesheets/steps.css +++ b/app/assets/stylesheets/steps.css @@ -8,40 +8,6 @@ .step__checkbox { --hover-color: var(--card-color); - - appearance: none; - background-color: var(--color-canvas); - block-size: 1.1em; - border: 1px solid currentColor; - border-radius: 0.15em; - color: currentColor; - display: grid; - font: inherit; - inline-size: 1.1em; - margin: 0; - place-content: center; - transform: translateY(0.1em); - - &::before { - background-color: CanvasText; - block-size: 0.65em; - box-shadow: inset 1em 1em currentColor; - clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%); - content: ""; - inline-size: 0.65em; - transform: scale(0); - transform-origin: center; - transition: 150ms transform ease-in-out; - } - - &:checked::before { - transform: scale(1) rotate(10deg); - } - - &:where([disabled]):not(:hover):not(:active) { - filter: none; - opacity: 0.5; - } } .step__content { diff --git a/app/views/cards/display/perma/_steps.html.erb b/app/views/cards/display/perma/_steps.html.erb index 9f65dec2a8..8a243bf9b7 100644 --- a/app/views/cards/display/perma/_steps.html.erb +++ b/app/views/cards/display/perma/_steps.html.erb @@ -3,7 +3,7 @@ <% unless card.closed? %>
  • - + <%= form_with model: [card, Step.new], url: card_steps_path(card), class: "min-width", data: { controller: "form", action: "submit->form#preventEmptySubmit submit->form#preventComposingSubmit turbo:submit-end->form#reset" } do |form| %> <%= form.text_field :content, class: "input step__content hide-focus-ring", placeholder: "Add a step…", autocomplete: "off", data: { form_target: "input", "1p-ignore": "true", action: "compositionstart->form#compositionStart compositionend->form#compositionEnd" }, aria: { label: "Add a step" } %> <% end %> diff --git a/app/views/cards/steps/_step.html.erb b/app/views/cards/steps/_step.html.erb index 052419d390..ea049852a7 100644 --- a/app/views/cards/steps/_step.html.erb +++ b/app/views/cards/steps/_step.html.erb @@ -1,7 +1,7 @@ <%= turbo_frame_tag step do %>
  • <%= form_with model: [step.card, step], data: { controller: "form" } do |form| %> - <%= form.check_box :completed, { class: "step__checkbox", data: { action: "change->form#submit" } } %> + <%= form.check_box :completed, { class: "checkbox step__checkbox", data: { action: "change->form#submit" } } %> <% end %> <%= link_to step.content, edit_card_step_path(step.card, step), class: "step__content" %>
  • diff --git a/app/views/cards/steps/edit.html.erb b/app/views/cards/steps/edit.html.erb index 9784fe6ac2..d112f03417 100644 --- a/app/views/cards/steps/edit.html.erb +++ b/app/views/cards/steps/edit.html.erb @@ -1,7 +1,7 @@ <%= turbo_frame_tag @step do %>
    <%= form_with model: [@card, @step], class: "step", data: { controller: "form" } do |form| %> - <%= form.check_box :completed, { class: "step__checkbox", checked: @step.completed?, disabled: true } %> + <%= form.check_box :completed, { class: "checkbox step__checkbox", checked: @step.completed?, disabled: true } %> <%= form.text_field :content, class: "input step__content step__content--edit hide-focus-ring", placeholder: "Name this step…", required: true, autofocus: true, autocomplete: "off", data: { action: "keydown.esc->form#cancel focus->form#select", "1p-ignore": "true" } %> <%= form.button type: "submit", class: "btn btn--positive txt-xx-small" do %> diff --git a/app/views/public/cards/show/_steps.html.erb b/app/views/public/cards/show/_steps.html.erb index e6f8e1f3a3..8e6b69fc9c 100644 --- a/app/views/public/cards/show/_steps.html.erb +++ b/app/views/public/cards/show/_steps.html.erb @@ -1,7 +1,7 @@
      <% card.steps.each do |step| %>
    1. - <%= check_box_tag :completed, { class: "step__checkbox", disabled: true, checked: step.completed? } %> + <%= check_box_tag :completed, { class: "checkbox step__checkbox", disabled: true, checked: step.completed? } %> <%= tag.span step.content, class: "step__content" %>
    2. <% end %> From 04bf063e3c8adf735b7644eca47914bde0af548a Mon Sep 17 00:00:00 2001 From: Alexander Zaytsev Date: Fri, 6 Mar 2026 18:01:23 +0100 Subject: [PATCH 04/14] Make the Delete account dialog more careful --- app/assets/stylesheets/utilities.css | 4 ++ .../controllers/dispatch_event_controller.js | 9 +++++ .../account/settings/_cancellation.html.erb | 40 ++++++++++++++----- app/views/account/settings/_export.html.erb | 2 +- 4 files changed, 43 insertions(+), 12 deletions(-) create mode 100644 app/javascript/controllers/dispatch_event_controller.js diff --git a/app/assets/stylesheets/utilities.css b/app/assets/stylesheets/utilities.css index 53837034c2..40e29011a0 100644 --- a/app/assets/stylesheets/utilities.css +++ b/app/assets/stylesheets/utilities.css @@ -222,6 +222,10 @@ padding: 0; } + :where(.list-unindented) { + padding-inline-start: 1.25em; + } + /* Accessibility */ .visually-hidden, .for-screen-reader { diff --git a/app/javascript/controllers/dispatch_event_controller.js b/app/javascript/controllers/dispatch_event_controller.js new file mode 100644 index 0000000000..781b3c9ab1 --- /dev/null +++ b/app/javascript/controllers/dispatch_event_controller.js @@ -0,0 +1,9 @@ +import { Controller } from "@hotwired/stimulus" + +export default class extends Controller { + static values = { name: String } + + dispatch() { + document.dispatchEvent(new CustomEvent(this.nameValue, { bubbles: true })) + } +} diff --git a/app/views/account/settings/_cancellation.html.erb b/app/views/account/settings/_cancellation.html.erb index 9b80ed0641..a457bd00b8 100644 --- a/app/views/account/settings/_cancellation.html.erb +++ b/app/views/account/settings/_cancellation.html.erb @@ -9,18 +9,36 @@ -

      Delete your account?

      -
        -
      • All users, including you, will lose access
      • - <% if Current.account.try(:active_subscription) %> -
      • Your subscription will be canceled
      • - <% end %> -
      • After 30 days, your data will be permanently deleted
      • -
      +

      Delete account

      +
      +

      What happens next:

      -
      - - <%= button_to "Delete my account", account_cancellation_path, method: :post, class: "btn btn--negative", form: { data: { action: "submit->dialog#close", turbo: false } } %> +
        +
      • Your <%= Current.account.name %> account will be closed immediately.
      • +
      • All users, including you, will lose access.
      • + <% if Current.account.try(:active_subscription) %> +
      • Your subscription will be canceled.
      • + <% end %> +
      • All your data will be permanently deleted within 30 days.
      • +
      + +

      Remember to export your data

      + +

      + before you go. You won’t be able to do it after you delete your account. +

      +
      + +
      + + +
      + + <%= button_to "Delete my account", account_cancellation_path, method: :post, class: "btn btn--negative", disabled: true, form: { data: { action: "submit->dialog#close", turbo: false } }, data: { toggle_enable_target: "element" } %> +
    diff --git a/app/views/account/settings/_export.html.erb b/app/views/account/settings/_export.html.erb index 3608e764fb..932b6a490f 100644 --- a/app/views/account/settings/_export.html.erb +++ b/app/views/account/settings/_export.html.erb @@ -4,7 +4,7 @@
    Download a complete archive of all account data.
    -
    +
    From 7ddd85372c522163383d0d4ba6a95282eb018efa Mon Sep 17 00:00:00 2001 From: Alexander Zaytsev Date: Fri, 6 Mar 2026 18:01:41 +0100 Subject: [PATCH 05/14] Adjust wording --- app/views/account/settings/_cancellation.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/account/settings/_cancellation.html.erb b/app/views/account/settings/_cancellation.html.erb index a457bd00b8..475feaa4eb 100644 --- a/app/views/account/settings/_cancellation.html.erb +++ b/app/views/account/settings/_cancellation.html.erb @@ -2,11 +2,11 @@

    Danger zone

    -
    Permanently delete your account and all its data, including users, boards, and cards.
    +
    Permanently delete this account and all its data, including users, boards, and cards.
    - +

    Delete account

    From d0bdc163903a9c7749c1ccd758bf41df0e02480c Mon Sep 17 00:00:00 2001 From: Alexander Zaytsev Date: Fri, 6 Mar 2026 18:07:42 +0100 Subject: [PATCH 06/14] Adjust spacing --- app/views/account/settings/_cancellation.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/account/settings/_cancellation.html.erb b/app/views/account/settings/_cancellation.html.erb index 475feaa4eb..193316cedb 100644 --- a/app/views/account/settings/_cancellation.html.erb +++ b/app/views/account/settings/_cancellation.html.erb @@ -24,7 +24,7 @@

    Remember to export your data

    -

    +

    before you go. You won’t be able to do it after you delete your account.

    From ae96509bda917702b18ed112617bf2f99432587b Mon Sep 17 00:00:00 2001 From: Alexander Zaytsev Date: Fri, 6 Mar 2026 18:23:56 +0100 Subject: [PATCH 07/14] `.step__checkbox` is now unused --- app/assets/stylesheets/steps.css | 4 ---- app/views/cards/display/perma/_steps.html.erb | 2 +- app/views/cards/steps/_step.html.erb | 4 ++-- app/views/cards/steps/edit.html.erb | 2 +- app/views/public/cards/show/_steps.html.erb | 6 +++--- 5 files changed, 7 insertions(+), 11 deletions(-) diff --git a/app/assets/stylesheets/steps.css b/app/assets/stylesheets/steps.css index 7a608b4127..300db79d92 100644 --- a/app/assets/stylesheets/steps.css +++ b/app/assets/stylesheets/steps.css @@ -6,10 +6,6 @@ inline-size: auto; } - .step__checkbox { - --hover-color: var(--card-color); - } - .step__content { --input-border-radius: 0; --input-border-size: 0; diff --git a/app/views/cards/display/perma/_steps.html.erb b/app/views/cards/display/perma/_steps.html.erb index 8a243bf9b7..286d06bbfe 100644 --- a/app/views/cards/display/perma/_steps.html.erb +++ b/app/views/cards/display/perma/_steps.html.erb @@ -3,7 +3,7 @@ <% unless card.closed? %>
  • - + <%= form_with model: [card, Step.new], url: card_steps_path(card), class: "min-width", data: { controller: "form", action: "submit->form#preventEmptySubmit submit->form#preventComposingSubmit turbo:submit-end->form#reset" } do |form| %> <%= form.text_field :content, class: "input step__content hide-focus-ring", placeholder: "Add a step…", autocomplete: "off", data: { form_target: "input", "1p-ignore": "true", action: "compositionstart->form#compositionStart compositionend->form#compositionEnd" }, aria: { label: "Add a step" } %> <% end %> diff --git a/app/views/cards/steps/_step.html.erb b/app/views/cards/steps/_step.html.erb index ea049852a7..3a122106d1 100644 --- a/app/views/cards/steps/_step.html.erb +++ b/app/views/cards/steps/_step.html.erb @@ -1,8 +1,8 @@ <%= turbo_frame_tag step do %>
  • <%= form_with model: [step.card, step], data: { controller: "form" } do |form| %> - <%= form.check_box :completed, { class: "checkbox step__checkbox", data: { action: "change->form#submit" } } %> + <%= form.check_box :completed, { class: "checkbox", data: { action: "change->form#submit" } } %> <% end %> <%= link_to step.content, edit_card_step_path(step.card, step), class: "step__content" %> -
  • + <% end %> diff --git a/app/views/cards/steps/edit.html.erb b/app/views/cards/steps/edit.html.erb index d112f03417..46a8972265 100644 --- a/app/views/cards/steps/edit.html.erb +++ b/app/views/cards/steps/edit.html.erb @@ -1,7 +1,7 @@ <%= turbo_frame_tag @step do %>
    <%= form_with model: [@card, @step], class: "step", data: { controller: "form" } do |form| %> - <%= form.check_box :completed, { class: "checkbox step__checkbox", checked: @step.completed?, disabled: true } %> + <%= form.check_box :completed, { class: "checkbox", checked: @step.completed?, disabled: true } %> <%= form.text_field :content, class: "input step__content step__content--edit hide-focus-ring", placeholder: "Name this step…", required: true, autofocus: true, autocomplete: "off", data: { action: "keydown.esc->form#cancel focus->form#select", "1p-ignore": "true" } %> <%= form.button type: "submit", class: "btn btn--positive txt-xx-small" do %> diff --git a/app/views/public/cards/show/_steps.html.erb b/app/views/public/cards/show/_steps.html.erb index 8e6b69fc9c..99b4a28791 100644 --- a/app/views/public/cards/show/_steps.html.erb +++ b/app/views/public/cards/show/_steps.html.erb @@ -1,8 +1,8 @@
      <% card.steps.each do |step| %>
    1. - <%= check_box_tag :completed, { class: "checkbox step__checkbox", disabled: true, checked: step.completed? } %> + <%= check_box_tag :completed, { class: "checkbox", disabled: true, checked: step.completed? } %> <%= tag.span step.content, class: "step__content" %> -
    2. + <% end %> -
    \ No newline at end of file + From eac750912f80b7d18589f85ab9e4a4c49ffb65d6 Mon Sep 17 00:00:00 2001 From: Alexander Zaytsev Date: Mon, 9 Mar 2026 09:55:23 +0100 Subject: [PATCH 08/14] Reset checkbox when cancellation dialog closes --- .../controllers/toggle_enable_controller.js | 11 ++++++++++- app/views/account/settings/_cancellation.html.erb | 8 ++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/app/javascript/controllers/toggle_enable_controller.js b/app/javascript/controllers/toggle_enable_controller.js index b65ea57d4a..78496cd7d7 100644 --- a/app/javascript/controllers/toggle_enable_controller.js +++ b/app/javascript/controllers/toggle_enable_controller.js @@ -1,11 +1,20 @@ import { Controller } from "@hotwired/stimulus" export default class extends Controller { - static targets = [ "element" ] + static targets = [ "element", "checkbox" ] toggle() { this.elementTargets.forEach((element) => { element.toggleAttribute("disabled") }) } + + reset() { + this.checkboxTargets.forEach((checkbox) => { + checkbox.checked = false + }) + this.elementTargets.forEach((element) => { + element.toggleAttribute("disabled", true) + }) + } } diff --git a/app/views/account/settings/_cancellation.html.erb b/app/views/account/settings/_cancellation.html.erb index 193316cedb..6411c6833a 100644 --- a/app/views/account/settings/_cancellation.html.erb +++ b/app/views/account/settings/_cancellation.html.erb @@ -5,10 +5,10 @@
    Permanently delete this account and all its data, including users, boards, and cards.
    -
    +
    - +

    Delete account

    What happens next:

    @@ -29,9 +29,9 @@

    -
    +
    From f60346814b1090ad3092b2bd22168860c313fff9 Mon Sep 17 00:00:00 2001 From: Alexander Zaytsev Date: Mon, 9 Mar 2026 15:45:50 +0100 Subject: [PATCH 09/14] Cleanup --- .../account/settings/_cancellation.html.erb | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/app/views/account/settings/_cancellation.html.erb b/app/views/account/settings/_cancellation.html.erb index 6411c6833a..10eb56546a 100644 --- a/app/views/account/settings/_cancellation.html.erb +++ b/app/views/account/settings/_cancellation.html.erb @@ -29,16 +29,14 @@

    -
    - + -
    - - <%= button_to "Delete my account", account_cancellation_path, method: :post, class: "btn btn--negative", disabled: true, form: { data: { action: "submit->dialog#close", turbo: false } }, data: { toggle_enable_target: "element" } %> -
    +
    + + <%= button_to "Delete my account", account_cancellation_path, method: :post, class: "btn btn--negative", disabled: true, form: { data: { action: "submit->dialog#close", turbo: false } }, data: { toggle_enable_target: "element" } %>
    From 33c5e0dfecc9297505462d3dd92fbc1c6d48c3fd Mon Sep 17 00:00:00 2001 From: Alexander Zaytsev Date: Mon, 9 Mar 2026 15:47:46 +0100 Subject: [PATCH 10/14] Cleanup --- app/views/account/settings/_cancellation.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/account/settings/_cancellation.html.erb b/app/views/account/settings/_cancellation.html.erb index 10eb56546a..cb3c11c983 100644 --- a/app/views/account/settings/_cancellation.html.erb +++ b/app/views/account/settings/_cancellation.html.erb @@ -34,7 +34,7 @@ I’ve read the above and want to continue -
    +
    <%= button_to "Delete my account", account_cancellation_path, method: :post, class: "btn btn--negative", disabled: true, form: { data: { action: "submit->dialog#close", turbo: false } }, data: { toggle_enable_target: "element" } %>
    From 1315e736ba7abc8ae7856094a2a626d7b3538f12 Mon Sep 17 00:00:00 2001 From: Alexander Zaytsev Date: Mon, 9 Mar 2026 21:41:42 +0100 Subject: [PATCH 11/14] Format --- app/views/account/settings/_cancellation.html.erb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/views/account/settings/_cancellation.html.erb b/app/views/account/settings/_cancellation.html.erb index cb3c11c983..dc5d7b7342 100644 --- a/app/views/account/settings/_cancellation.html.erb +++ b/app/views/account/settings/_cancellation.html.erb @@ -12,7 +12,6 @@

    Delete account

    What happens next:

    -
    • Your <%= Current.account.name %> account will be closed immediately.
    • All users, including you, will lose access.
    • @@ -23,7 +22,6 @@

    Remember to export your data

    -

    before you go. You won’t be able to do it after you delete your account.

    @@ -36,7 +34,12 @@
    - <%= button_to "Delete my account", account_cancellation_path, method: :post, class: "btn btn--negative", disabled: true, form: { data: { action: "submit->dialog#close", turbo: false } }, data: { toggle_enable_target: "element" } %> + <%= button_to "Delete my account", account_cancellation_path, + method: :post, + class: "btn btn--negative", + disabled: true, + form: { data: { action: "submit->dialog#close", turbo: false } }, + data: { toggle_enable_target: "element" } %>
    From 46943dc8c0c92120af6aad6a4f7b58cf3232f080 Mon Sep 17 00:00:00 2001 From: Alexander Zaytsev Date: Tue, 10 Mar 2026 10:19:10 +0100 Subject: [PATCH 12/14] Use Cancel instead of Delete --- app/views/account/settings/_cancellation.html.erb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/views/account/settings/_cancellation.html.erb b/app/views/account/settings/_cancellation.html.erb index dc5d7b7342..2733425e89 100644 --- a/app/views/account/settings/_cancellation.html.erb +++ b/app/views/account/settings/_cancellation.html.erb @@ -2,14 +2,14 @@

    Danger zone

    -
    Permanently delete this account and all its data, including users, boards, and cards.
    +
    Cancel your account and delete everything in it, including all boards and cards.
    - + -

    Delete account

    +

    Cancel account

    What happens next:

      @@ -23,7 +23,7 @@

      Remember to export your data

      - before you go. You won’t be able to do it after you delete your account. + before you go. You won’t be able to do it after you cancel your account.

    @@ -34,7 +34,7 @@
    - <%= button_to "Delete my account", account_cancellation_path, + <%= button_to "Cancel my account", account_cancellation_path, method: :post, class: "btn btn--negative", disabled: true, From c977d03692ac5a6d89d1e10677f5a5bc372cfd71 Mon Sep 17 00:00:00 2001 From: Alexander Zaytsev Date: Tue, 10 Mar 2026 11:45:37 +0100 Subject: [PATCH 13/14] Use `fire()` instead of `dispatch()` Addresses Copilot's feedback --- app/javascript/controllers/dispatch_event_controller.js | 4 ++-- app/views/account/settings/_cancellation.html.erb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/javascript/controllers/dispatch_event_controller.js b/app/javascript/controllers/dispatch_event_controller.js index 781b3c9ab1..cf91923394 100644 --- a/app/javascript/controllers/dispatch_event_controller.js +++ b/app/javascript/controllers/dispatch_event_controller.js @@ -3,7 +3,7 @@ import { Controller } from "@hotwired/stimulus" export default class extends Controller { static values = { name: String } - dispatch() { - document.dispatchEvent(new CustomEvent(this.nameValue, { bubbles: true })) + fire() { + this.dispatch(this.nameValue, { target: document, prefix: false }) } } diff --git a/app/views/account/settings/_cancellation.html.erb b/app/views/account/settings/_cancellation.html.erb index 2733425e89..2e03da9bea 100644 --- a/app/views/account/settings/_cancellation.html.erb +++ b/app/views/account/settings/_cancellation.html.erb @@ -23,7 +23,7 @@

    Remember to export your data

    - before you go. You won’t be able to do it after you cancel your account. + before you go. You won’t be able to do it after you cancel your account.

    From 754e2e36733e31f216c59e484dfa3950d17cf518 Mon Sep 17 00:00:00 2001 From: Alexander Zaytsev Date: Thu, 19 Mar 2026 15:06:37 +0100 Subject: [PATCH 14/14] =?UTF-8?q?Cancel=20=E2=86=92=20Delete?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/account/settings/_cancellation.html.erb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/views/account/settings/_cancellation.html.erb b/app/views/account/settings/_cancellation.html.erb index 2e03da9bea..03a88833c5 100644 --- a/app/views/account/settings/_cancellation.html.erb +++ b/app/views/account/settings/_cancellation.html.erb @@ -2,14 +2,14 @@

    Danger zone

    -
    Cancel your account and delete everything in it, including all boards and cards.
    +
    Delete your account and everything in it, including all boards and cards.
    - + -

    Cancel account

    +

    Delete account

    What happens next:

      @@ -23,7 +23,7 @@

      Remember to export your data

      - before you go. You won’t be able to do it after you cancel your account. + before you go. You won’t be able to do it after you delete your account.

    @@ -34,7 +34,7 @@
    - <%= button_to "Cancel my account", account_cancellation_path, + <%= button_to "Delete my account", account_cancellation_path, method: :post, class: "btn btn--negative", disabled: true,