From 408bdd6788562cbce3cc487b9fd312ddb946f538 Mon Sep 17 00:00:00 2001 From: Number Eight <55629655+CylonN8@users.noreply.github.com> Date: Sun, 1 Feb 2026 23:50:39 +0100 Subject: [PATCH] fix: transaction UI padding and mobile selection bar position (#847) * style: adjust the bottom position of the transaction selection bar and remove unnecessary padding from transaction forms * fix: prevent overlap with the navbar in PWA mode * fix: prevent selection bar overlap with navbar in PWA mode * Update _selection_bar.html.erb Signed-off-by: Number Eight <55629655+CylonN8@users.noreply.github.com> * Update _selection_bar.html.erb Signed-off-by: Number Eight <55629655+CylonN8@users.noreply.github.com> --------- Signed-off-by: Number Eight <55629655+CylonN8@users.noreply.github.com> --- app/views/entries/_selection_bar.html.erb | 2 +- .../transactions/_selection_bar.html.erb | 2 +- .../transactions/bulk_updates/new.html.erb | 4 +- app/views/transactions/show.html.erb | 76 +++++++++---------- 4 files changed, 40 insertions(+), 44 deletions(-) diff --git a/app/views/entries/_selection_bar.html.erb b/app/views/entries/_selection_bar.html.erb index 4db508efb..45c51d0e4 100644 --- a/app/views/entries/_selection_bar.html.erb +++ b/app/views/entries/_selection_bar.html.erb @@ -1,4 +1,4 @@ -
+
<%= check_box_tag "entry_selection", 1, true, class: "checkbox checkbox--light", data: { action: "bulk-select#deselectAll" } %> diff --git a/app/views/transactions/_selection_bar.html.erb b/app/views/transactions/_selection_bar.html.erb index 1e29c9d65..062b442ad 100644 --- a/app/views/transactions/_selection_bar.html.erb +++ b/app/views/transactions/_selection_bar.html.erb @@ -1,4 +1,4 @@ -
+
<%= check_box_tag "entry_selection", 1, true, class: "checkbox checkbox--light", data: { action: "bulk-select#deselectAll" } %> diff --git a/app/views/transactions/bulk_updates/new.html.erb b/app/views/transactions/bulk_updates/new.html.erb index 11e3bf3ff..7b6c1e080 100644 --- a/app/views/transactions/bulk_updates/new.html.erb +++ b/app/views/transactions/bulk_updates/new.html.erb @@ -5,9 +5,7 @@ <%= styled_form_with url: transactions_bulk_update_path, scope: "bulk_update", class: "h-full flex flex-col justify-between gap-4", data: { turbo_frame: "_top" } do |form| %>
<%= render DS::Disclosure.new(title: "Overview", open: true) do %> -
- <%= form.date_field :date, label: "Date", max: Date.current %> -
+ <%= form.date_field :date, label: "Date", max: Date.current %> <% end %> <%= render DS::Disclosure.new(title: "Transactions", open: true) do %> diff --git a/app/views/transactions/show.html.erb b/app/views/transactions/show.html.erb index 0b875ebc8..f2914d9b8 100644 --- a/app/views/transactions/show.html.erb +++ b/app/views/transactions/show.html.erb @@ -48,7 +48,7 @@ <%= render "entries/protection_indicator", entry: @entry, unlock_path: unlock_transaction_path(@entry.transaction) %> <% dialog.with_section(title: t(".overview"), open: true) do %> -
+
<%= styled_form_with model: @entry, url: transaction_path(@entry), class: "space-y-2", @@ -95,49 +95,47 @@ <% end %> <% dialog.with_section(title: t(".details")) do %> -
- <%= styled_form_with model: @entry, - url: transaction_path(@entry), - class: "space-y-2", - data: { controller: "auto-submit-form" } do |f| %> - <% unless @entry.transaction.transfer? %> - <%= f.select :account, - options_for_select( - Current.family.accounts.alphabetically.pluck(:name, :id), - @entry.account_id - ), - { label: t(".account_label") }, - { disabled: true } %> + <%= styled_form_with model: @entry, + url: transaction_path(@entry), + class: "space-y-2", + data: { controller: "auto-submit-form" } do |f| %> + <% unless @entry.transaction.transfer? %> + <%= f.select :account, + options_for_select( + Current.family.accounts.alphabetically.pluck(:name, :id), + @entry.account_id + ), + { label: t(".account_label") }, + { disabled: true } %> - <%= f.fields_for :entryable do |ef| %> + <%= f.fields_for :entryable do |ef| %> - <%= ef.collection_select :merchant_id, - Current.family.available_merchants.alphabetically, - :id, :name, - { include_blank: t(".none"), - label: t(".merchant_label"), - class: "text-subdued" }, - "data-auto-submit-form-target": "auto" %> - - <%= ef.select :tag_ids, - Current.family.tags.alphabetically.pluck(:name, :id), - { - include_blank: t(".none"), - multiple: true, - label: t(".tags_label") - }, - { "data-controller": "multi-select", "data-auto-submit-form-target": "auto" } %> - <% end %> - <% end %> - - <%= f.text_area :notes, - label: t(".note_label"), - placeholder: t(".note_placeholder"), - rows: 5, + <%= ef.collection_select :merchant_id, + Current.family.available_merchants.alphabetically, + :id, :name, + { include_blank: t(".none"), + label: t(".merchant_label"), + class: "text-subdued" }, "data-auto-submit-form-target": "auto" %> + <%= ef.select :tag_ids, + Current.family.tags.alphabetically.pluck(:name, :id), + { + include_blank: t(".none"), + multiple: true, + label: t(".tags_label") + }, + { "data-controller": "multi-select", "data-auto-submit-form-target": "auto" } %> + <% end %> <% end %> -
+ + <%= f.text_area :notes, + label: t(".note_label"), + placeholder: t(".note_placeholder"), + rows: 5, + "data-auto-submit-form-target": "auto" %> + + <% end %> <% end %> <% if (details = build_transaction_extra_details(@entry)) %>