From 4cf25ada63fad2afe08b39320afef985e0a9f5ad Mon Sep 17 00:00:00 2001 From: StalkerSea <35916410+StalkerSea@users.noreply.github.com> Date: Tue, 10 Feb 2026 17:02:15 -0600 Subject: [PATCH] fix: restore drawer positioning for transaction modals on desktop (#857) (#896) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Add responsive dialog behavior for transaction modals Add responsive option to DS::Dialog component that switches between: - Mobile (< 1024px): Modal style (centered) with inline close button - Desktop (≥ 1024px): Drawer style (right side panel) with header close button Update transaction, transfer, holding, trade, and valuation views to use responsive behavior, maintaining mobile experience while reverting desktop to drawer style like budget categories. Changes: - app/components/DS/dialog.rb: Add responsive parameter and helper methods - app/components/DS/dialog.html.erb: Apply responsive styling - app/views/*/show.html.erb: Add responsive: true and hide close icons on mobile * fix: Enhance close button accessibility in dialog components * fix: Refactor dialog component to improve close button handling and accessibility --- app/components/DS/dialog.html.erb | 6 +- app/components/DS/dialog.rb | 33 +++++++++-- app/views/holdings/show.html.erb | 55 +++++++------------ .../pages/dashboard/_cashflow_sankey.html.erb | 5 +- app/views/trades/show.html.erb | 20 ++----- app/views/transactions/_header.html.erb | 8 --- app/views/transactions/show.html.erb | 42 ++------------ app/views/transfers/show.html.erb | 21 +------ app/views/valuations/show.html.erb | 17 ++---- 9 files changed, 71 insertions(+), 136 deletions(-) diff --git a/app/components/DS/dialog.html.erb b/app/components/DS/dialog.html.erb index 72b8c0740..a26b0ae7c 100644 --- a/app/components/DS/dialog.html.erb +++ b/app/components/DS/dialog.html.erb @@ -1,16 +1,14 @@ <%= wrapper_element do %> - <%= tag.dialog class: "w-full h-full bg-transparent theme-dark:backdrop:bg-alpha-black-900 backdrop:bg-overlay pt-[env(safe-area-inset-top)] pb-[env(safe-area-inset-bottom)] #{drawer? ? "lg:p-3" : "lg:p-1"}", **merged_opts do %> + <%= tag.dialog class: "w-full h-full bg-transparent theme-dark:backdrop:bg-alpha-black-900 backdrop:bg-overlay pt-[env(safe-area-inset-top)] pb-[env(safe-area-inset-bottom)] #{(drawer? || responsive?) ? "lg:p-3" : "lg:p-1"}", **merged_opts do %> <%= tag.div class: dialog_outer_classes do %> <%= tag.div class: dialog_inner_classes, data: { DS__dialog_target: "content" } do %>
= <%= currency.symbol %><%= number_with_precision(current_per_share, precision: 2) || "0.00" %> <%= t("holdings.cost_basis_cell.per_share") %>
-<%= l(trade_entry.date, format: :long) %>
-<%= t( ".trade_history_entry", qty: trade_entry.trade.qty, @@ -214,14 +208,12 @@ <% end %> - <% else %>
<%= t(".no_trade_history") %>
<% end %><%= t(".provider_sent", ticker: @holding.provider_security.ticker) %>
<%= t(".cost_basis_locked_description") %>
<%= t(".delete_subtitle") %>
<%= t("pages.dashboard.cashflow_sankey.no_data_title") %>
<%= t("pages.dashboard.cashflow_sankey.no_data_description") %>
<%= render DS::Link.new( diff --git a/app/views/trades/show.html.erb b/app/views/trades/show.html.erb index d5eea69f6..75c36f527 100644 --- a/app/views/trades/show.html.erb +++ b/app/views/trades/show.html.erb @@ -1,13 +1,13 @@ -<%= render DS::Dialog.new(frame: "drawer") do |dialog| %> - <% dialog.with_header(hide_close_icon: true) do %> - <%= render "trades/header", entry: @entry %> +<%= render DS::Dialog.new(frame: "drawer", responsive: true) do |dialog| %> + <% dialog.with_header(custom_header: true) do %> +<%= t(".exclude_subtitle") %>
<%= t(".delete_subtitle") %>
<%= t("transactions.show.potential_duplicate_description") %>
-<%= t(".exclude_description") %>
<%= t(".activity_type_description") %>
<%= t(".one_time_description") %>
Transfers and payments are special types of transactions that indicate money movement between 2 accounts.
Convert this transaction into a security trade (buy/sell) by providing ticker, shares, and price.
<%= t(".mark_recurring_subtitle") %>
<%= t(".delete_subtitle") %>
<%= t(".delete_subtitle") %>
<%= t(".delete_subtitle") %>