From 22423a7322b23e5d0873630dab24f5b2e1edfd85 Mon Sep 17 00:00:00 2001 From: Zach Gollwitzer Date: Fri, 18 Jul 2025 07:23:58 -0400 Subject: [PATCH 1/4] [claudesquad] update from 'component-namespacing' on 18 Jul 25 07:23 EDT --- .../alert.html.erb} | 0 .../{alert_component.rb => DS/alert.rb} | 2 +- .../button.html.erb} | 0 .../{button_component.rb => DS/button.rb} | 2 +- .../buttonish.rb} | 4 +- .../dialog.html.erb} | 0 .../{dialog_component.rb => DS/dialog.rb} | 8 +- app/components/{ => DS}/dialog_controller.js | 0 .../disclosure.html.erb} | 0 .../disclosure.rb} | 2 +- .../filled_icon.html.erb} | 0 .../filled_icon.rb} | 2 +- .../link.html.erb} | 0 .../{link_component.rb => DS/link.rb} | 2 +- .../menu.html.erb} | 2 +- .../{menu_component.rb => DS/menu.rb} | 6 +- app/components/{ => DS}/menu_controller.js | 0 .../menu_item.html.erb} | 0 .../menu_item.rb} | 2 +- .../{tab_component.rb => DS/tab.rb} | 2 +- .../tabs.html.erb} | 0 .../{tabs_component.rb => DS/tabs.rb} | 4 +- .../{tabs/nav_component.rb => DS/tabs/nav.rb} | 2 +- .../panel_component.rb => DS/tabs/panel.rb} | 2 +- app/components/{ => DS}/tabs_controller.js | 0 .../toggle.html.erb} | 0 .../{toggle_component.rb => DS/toggle.rb} | 2 +- app/components/UI/account_page.html.erb | 2 +- app/components/design_system_component.rb | 2 + app/helpers/application_helper.rb | 2 +- app/helpers/styled_form_builder.rb | 4 +- app/views/accounts/_account.html.erb | 4 +- .../accounts/_account_sidebar_tabs.html.erb | 8 +- app/views/accounts/_account_type.html.erb | 2 +- .../accounts/_accountable_group.html.erb | 4 +- app/views/accounts/_empty.html.erb | 2 +- app/views/accounts/_form.html.erb | 2 +- app/views/accounts/_logo.html.erb | 2 +- app/views/accounts/index.html.erb | 2 +- app/views/accounts/new.html.erb | 2 +- app/views/accounts/new/_container.html.erb | 4 +- app/views/accounts/show/_activity.html.erb | 2 +- app/views/accounts/show/_header.html.erb | 2 +- app/views/accounts/show/_menu.html.erb | 2 +- .../_budget_category.html.erb | 2 +- .../_confirm_button.html.erb | 2 +- .../budget_categories/_no_categories.html.erb | 4 +- app/views/budget_categories/show.html.erb | 4 +- app/views/budgets/_budget_donut.html.erb | 6 +- app/views/budgets/_budget_header.html.erb | 8 +- .../budgets/_over_allocation_warning.html.erb | 2 +- app/views/budgets/_picker.html.erb | 2 +- app/views/budgets/edit.html.erb | 2 +- app/views/budgets/show.html.erb | 4 +- app/views/categories/_category.html.erb | 2 +- app/views/categories/_menu.html.erb | 2 +- app/views/categories/edit.html.erb | 2 +- app/views/categories/index.html.erb | 8 +- app/views/categories/new.html.erb | 2 +- app/views/category/deletions/new.html.erb | 6 +- app/views/category/dropdowns/_row.html.erb | 2 +- app/views/category/dropdowns/show.html.erb | 2 +- app/views/chats/_chat.html.erb | 2 +- app/views/chats/_chat_nav.html.erb | 4 +- app/views/chats/_error.html.erb | 2 +- app/views/chats/index.html.erb | 2 +- app/views/credit_cards/_overview.html.erb | 2 +- app/views/credit_cards/edit.html.erb | 2 +- app/views/credit_cards/new.html.erb | 2 +- app/views/cryptos/edit.html.erb | 2 +- app/views/cryptos/new.html.erb | 2 +- app/views/depositories/edit.html.erb | 2 +- app/views/depositories/new.html.erb | 2 +- .../doorkeeper/authorizations/error.html.erb | 2 +- .../doorkeeper/authorizations/new.html.erb | 4 +- .../_family_merchant.html.erb | 2 +- app/views/family_merchants/edit.html.erb | 2 +- app/views/family_merchants/index.html.erb | 4 +- app/views/family_merchants/new.html.erb | 2 +- app/views/holdings/_cash.html.erb | 2 +- app/views/holdings/show.html.erb | 2 +- app/views/import/cleans/show.html.erb | 2 +- app/views/import/configurations/show.html.erb | 4 +- app/views/import/confirms/_mappings.html.erb | 6 +- app/views/import/uploads/show.html.erb | 2 +- app/views/imports/_empty.html.erb | 2 +- app/views/imports/_failure.html.erb | 2 +- app/views/imports/_import.html.erb | 2 +- app/views/imports/_importing.html.erb | 4 +- app/views/imports/_ready.html.erb | 2 +- app/views/imports/_revert_failure.html.erb | 2 +- app/views/imports/_success.html.erb | 2 +- app/views/imports/index.html.erb | 2 +- app/views/imports/new.html.erb | 2 +- app/views/investments/edit.html.erb | 2 +- app/views/investments/new.html.erb | 2 +- app/views/invitations/new.html.erb | 2 +- app/views/layouts/application.html.erb | 4 +- app/views/layouts/imports.html.erb | 4 +- .../layouts/shared/_confirm_dialog.html.erb | 4 +- app/views/layouts/wizard.html.erb | 4 +- app/views/loans/edit.html.erb | 2 +- app/views/loans/new.html.erb | 2 +- app/views/loans/tabs/_overview.html.erb | 2 +- app/views/mfa/backup_codes.html.erb | 2 +- app/views/onboardings/_logout.html.erb | 2 +- app/views/onboardings/goals.html.erb | 2 +- app/views/onboardings/trial.html.erb | 28 +-- app/views/other_assets/edit.html.erb | 2 +- app/views/other_assets/new.html.erb | 2 +- app/views/other_liabilities/edit.html.erb | 2 +- app/views/other_liabilities/new.html.erb | 2 +- app/views/pages/dashboard.html.erb | 4 +- .../pages/dashboard/_balance_sheet.html.erb | 2 +- .../pages/dashboard/_cashflow_sankey.html.erb | 4 +- .../_no_accounts_graph_placeholder.html.erb | 4 +- .../pages/redis_configuration_error.html.erb | 4 +- app/views/plaid_items/_plaid_item.html.erb | 4 +- app/views/properties/_form_alert.html.erb | 4 +- app/views/properties/address.html.erb | 4 +- app/views/properties/balances.html.erb | 4 +- app/views/properties/edit.html.erb | 4 +- app/views/properties/new.html.erb | 4 +- app/views/properties/tabs/_overview.html.erb | 2 +- .../rule/conditions/_condition_group.html.erb | 2 +- app/views/rules/_category_rule_cta.html.erb | 4 +- app/views/rules/_form.html.erb | 6 +- app/views/rules/_rule.html.erb | 2 +- app/views/rules/confirm.html.erb | 4 +- app/views/rules/edit.html.erb | 2 +- app/views/rules/index.html.erb | 8 +- app/views/rules/new.html.erb | 2 +- app/views/settings/_settings_nav.html.erb | 4 +- app/views/settings/api_keys/created.html.erb | 6 +- .../api_keys/created.turbo_stream.erb | 6 +- app/views/settings/api_keys/new.html.erb | 4 +- app/views/settings/api_keys/show.html.erb | 18 +- app/views/settings/billings/show.html.erb | 6 +- app/views/settings/profiles/show.html.erb | 10 +- app/views/settings/securities/show.html.erb | 4 +- app/views/subscriptions/upgrade.html.erb | 6 +- app/views/tag/deletions/new.html.erb | 6 +- app/views/tags/_tag.html.erb | 2 +- app/views/tags/edit.html.erb | 2 +- app/views/tags/index.html.erb | 6 +- app/views/tags/new.html.erb | 2 +- app/views/trades/_header.html.erb | 2 +- app/views/trades/_trade.html.erb | 2 +- app/views/trades/new.html.erb | 2 +- app/views/trades/show.html.erb | 2 +- app/views/transactions/_form.html.erb | 2 +- app/views/transactions/_transaction.html.erb | 2 +- .../transactions/bulk_updates/new.html.erb | 10 +- app/views/transactions/index.html.erb | 8 +- app/views/transactions/new.html.erb | 2 +- .../transactions/searches/_form.html.erb | 2 +- .../transactions/searches/_menu.html.erb | 8 +- .../filters/_merchant_filter.html.erb | 2 +- .../searches/filters/_tag_filter.html.erb | 2 +- app/views/transactions/show.html.erb | 6 +- app/views/transfer_matches/new.html.erb | 2 +- app/views/transfers/new.html.erb | 2 +- app/views/transfers/show.html.erb | 2 +- app/views/users/_user_menu.html.erb | 2 +- app/views/valuations/_valuation.html.erb | 2 +- app/views/valuations/confirm_create.html.erb | 2 +- app/views/valuations/confirm_update.html.erb | 2 +- app/views/valuations/new.html.erb | 4 +- app/views/valuations/show.html.erb | 6 +- app/views/vehicles/edit.html.erb | 2 +- app/views/vehicles/new.html.erb | 2 +- app/views/vehicles/tabs/_overview.html.erb | 2 +- db/schema.rb | 206 +++++++++--------- .../previews/alert_component_preview.rb | 2 +- .../previews/button_component_preview.rb | 6 +- .../previews/dialog_component_preview.rb | 4 +- .../previews/disclosure_component_preview.rb | 2 +- .../previews/filled_icon_component_preview.rb | 4 +- .../previews/link_component_preview.rb | 10 +- .../previews/menu_component_preview.rb | 6 +- .../previews/toggle_component_preview.rb | 2 +- 181 files changed, 392 insertions(+), 390 deletions(-) rename app/components/{alert_component.html.erb => DS/alert.html.erb} (100%) rename app/components/{alert_component.rb => DS/alert.rb} (97%) rename app/components/{button_component.html.erb => DS/button.html.erb} (100%) rename app/components/{button_component.rb => DS/button.rb} (95%) rename app/components/{buttonish_component.rb => DS/buttonish.rb} (96%) rename app/components/{dialog_component.html.erb => DS/dialog.html.erb} (100%) rename app/components/{dialog_component.rb => DS/dialog.rb} (89%) rename app/components/{ => DS}/dialog_controller.js (100%) rename app/components/{disclosure_component.html.erb => DS/disclosure.html.erb} (100%) rename app/components/{disclosure_component.rb => DS/disclosure.rb} (82%) rename app/components/{filled_icon_component.html.erb => DS/filled_icon.html.erb} (100%) rename app/components/{filled_icon_component.rb => DS/filled_icon.rb} (97%) rename app/components/{link_component.html.erb => DS/link.html.erb} (100%) rename app/components/{link_component.rb => DS/link.rb} (94%) rename app/components/{menu_component.html.erb => DS/menu.html.erb} (85%) rename app/components/{menu_component.rb => DS/menu.rb} (88%) rename app/components/{ => DS}/menu_controller.js (100%) rename app/components/{menu_item_component.html.erb => DS/menu_item.html.erb} (100%) rename app/components/{menu_item_component.rb => DS/menu_item.rb} (97%) rename app/components/{tab_component.rb => DS/tab.rb} (75%) rename app/components/{tabs_component.html.erb => DS/tabs.html.erb} (100%) rename app/components/{tabs_component.rb => DS/tabs.rb} (96%) rename app/components/{tabs/nav_component.rb => DS/tabs/nav.rb} (94%) rename app/components/{tabs/panel_component.rb => DS/tabs/panel.rb} (69%) rename app/components/{ => DS}/tabs_controller.js (100%) rename app/components/{toggle_component.html.erb => DS/toggle.html.erb} (100%) rename app/components/{toggle_component.rb => DS/toggle.rb} (95%) create mode 100644 app/components/design_system_component.rb diff --git a/app/components/alert_component.html.erb b/app/components/DS/alert.html.erb similarity index 100% rename from app/components/alert_component.html.erb rename to app/components/DS/alert.html.erb diff --git a/app/components/alert_component.rb b/app/components/DS/alert.rb similarity index 97% rename from app/components/alert_component.rb rename to app/components/DS/alert.rb index 47c348f8..22241133 100644 --- a/app/components/alert_component.rb +++ b/app/components/DS/alert.rb @@ -1,4 +1,4 @@ -class AlertComponent < ViewComponent::Base +class DS::Alert < DesignSystemComponent def initialize(message:, variant: :info) @message = message @variant = variant diff --git a/app/components/button_component.html.erb b/app/components/DS/button.html.erb similarity index 100% rename from app/components/button_component.html.erb rename to app/components/DS/button.html.erb diff --git a/app/components/button_component.rb b/app/components/DS/button.rb similarity index 95% rename from app/components/button_component.rb rename to app/components/DS/button.rb index 36600a3c..a253c04c 100644 --- a/app/components/button_component.rb +++ b/app/components/DS/button.rb @@ -2,7 +2,7 @@ # An extension to `button_to` helper. All options are passed through to the `button_to` helper with some additional # options available. -class ButtonComponent < ButtonishComponent +class DS::Button < DS::Buttonish attr_reader :confirm def initialize(confirm: nil, **opts) diff --git a/app/components/buttonish_component.rb b/app/components/DS/buttonish.rb similarity index 96% rename from app/components/buttonish_component.rb rename to app/components/DS/buttonish.rb index 4bbb2882..b83557b1 100644 --- a/app/components/buttonish_component.rb +++ b/app/components/DS/buttonish.rb @@ -1,4 +1,4 @@ -class ButtonishComponent < ViewComponent::Base +class DS::Buttonish < DesignSystemComponent VARIANTS = { primary: { container_classes: "text-inverse bg-inverse hover:bg-inverse-hover disabled:bg-gray-500 theme-dark:disabled:bg-gray-400", @@ -71,7 +71,7 @@ class ButtonishComponent < ViewComponent::Base end def call - raise NotImplementedError, "ButtonishComponent is an abstract class and cannot be instantiated directly." + raise NotImplementedError, "Buttonish is an abstract class and cannot be instantiated directly." end def container_classes(override_classes = nil) diff --git a/app/components/dialog_component.html.erb b/app/components/DS/dialog.html.erb similarity index 100% rename from app/components/dialog_component.html.erb rename to app/components/DS/dialog.html.erb diff --git a/app/components/dialog_component.rb b/app/components/DS/dialog.rb similarity index 89% rename from app/components/dialog_component.rb rename to app/components/DS/dialog.rb index 94246872..c2da56c6 100644 --- a/app/components/dialog_component.rb +++ b/app/components/DS/dialog.rb @@ -1,9 +1,9 @@ -class DialogComponent < ViewComponent::Base +class DS::Dialog < DesignSystemComponent renders_one :header, ->(title: nil, subtitle: nil, hide_close_icon: false, **opts, &block) do content_tag(:header, class: "px-4 flex flex-col gap-2", **opts) do title_div = content_tag(:div, class: "flex items-center justify-between gap-2") do title = content_tag(:h2, title, class: class_names("font-medium text-primary", drawer? ? "text-lg" : "")) if title - close_icon = render ButtonComponent.new(variant: "icon", class: "ml-auto", icon: "x", tabindex: "-1", data: { action: "dialog#close" }) unless hide_close_icon + close_icon = render DS::Button.new(variant: "icon", class: "ml-auto", icon: "x", tabindex: "-1", data: { action: "dialog#close" }) unless hide_close_icon safe_join([ title, close_icon ].compact) end @@ -24,11 +24,11 @@ class DialogComponent < ViewComponent::Base button_opts end - render ButtonComponent.new(**merged_opts) + render DS::Button.new(**merged_opts) end renders_many :sections, ->(title:, **disclosure_opts, &block) do - render DisclosureComponent.new(title: title, align: :right, **disclosure_opts) do + render DS::Disclosure.new(title: title, align: :right, **disclosure_opts) do block.call end end diff --git a/app/components/dialog_controller.js b/app/components/DS/dialog_controller.js similarity index 100% rename from app/components/dialog_controller.js rename to app/components/DS/dialog_controller.js diff --git a/app/components/disclosure_component.html.erb b/app/components/DS/disclosure.html.erb similarity index 100% rename from app/components/disclosure_component.html.erb rename to app/components/DS/disclosure.html.erb diff --git a/app/components/disclosure_component.rb b/app/components/DS/disclosure.rb similarity index 82% rename from app/components/disclosure_component.rb rename to app/components/DS/disclosure.rb index 5aba01b2..d301d671 100644 --- a/app/components/disclosure_component.rb +++ b/app/components/DS/disclosure.rb @@ -1,4 +1,4 @@ -class DisclosureComponent < ViewComponent::Base +class DS::Disclosure < DesignSystemComponent renders_one :summary_content attr_reader :title, :align, :open, :opts diff --git a/app/components/filled_icon_component.html.erb b/app/components/DS/filled_icon.html.erb similarity index 100% rename from app/components/filled_icon_component.html.erb rename to app/components/DS/filled_icon.html.erb diff --git a/app/components/filled_icon_component.rb b/app/components/DS/filled_icon.rb similarity index 97% rename from app/components/filled_icon_component.rb rename to app/components/DS/filled_icon.rb index 1f903243..73113a0b 100644 --- a/app/components/filled_icon_component.rb +++ b/app/components/DS/filled_icon.rb @@ -1,4 +1,4 @@ -class FilledIconComponent < ViewComponent::Base +class DS::FilledIcon < DesignSystemComponent attr_reader :icon, :text, :hex_color, :size, :rounded, :variant VARIANTS = %i[default text surface container inverse].freeze diff --git a/app/components/link_component.html.erb b/app/components/DS/link.html.erb similarity index 100% rename from app/components/link_component.html.erb rename to app/components/DS/link.html.erb diff --git a/app/components/link_component.rb b/app/components/DS/link.rb similarity index 94% rename from app/components/link_component.rb rename to app/components/DS/link.rb index 4bbe10e5..209f86b0 100644 --- a/app/components/link_component.rb +++ b/app/components/DS/link.rb @@ -1,6 +1,6 @@ # An extension to `link_to` helper. All options are passed through to the `link_to` helper with some additional # options available. -class LinkComponent < ButtonishComponent +class DS::Link < DS::Buttonish attr_reader :frame VARIANTS = VARIANTS.reverse_merge( diff --git a/app/components/menu_component.html.erb b/app/components/DS/menu.html.erb similarity index 85% rename from app/components/menu_component.html.erb rename to app/components/DS/menu.html.erb index 00f19b2a..47efe226 100644 --- a/app/components/menu_component.html.erb +++ b/app/components/DS/menu.html.erb @@ -1,6 +1,6 @@ <%= tag.div data: { controller: "menu", menu_placement_value: placement, menu_offset_value: offset, testid: testid } do %> <% if variant == :icon %> - <%= render ButtonComponent.new(variant: "icon", icon: icon_vertical ? "more-vertical" : "more-horizontal", data: { menu_target: "button" }) %> + <%= render DS::Button.new(variant: "icon", icon: icon_vertical ? "more-vertical" : "more-horizontal", data: { menu_target: "button" }) %> <% elsif variant == :button %> <%= button %> <% elsif variant == :avatar %> diff --git a/app/components/menu_component.rb b/app/components/DS/menu.rb similarity index 88% rename from app/components/menu_component.rb rename to app/components/DS/menu.rb index 850031fa..afc9049f 100644 --- a/app/components/menu_component.rb +++ b/app/components/DS/menu.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -class MenuComponent < ViewComponent::Base +class DS::Menu < DesignSystemComponent attr_reader :variant, :avatar_url, :initials, :placement, :offset, :icon_vertical, :no_padding, :testid renders_one :button, ->(**button_options, &block) do @@ -9,7 +9,7 @@ class MenuComponent < ViewComponent::Base if block content_tag(:button, **options_with_target, &block) else - ButtonComponent.new(**options_with_target) + DS::Button.new(**options_with_target) end end @@ -19,7 +19,7 @@ class MenuComponent < ViewComponent::Base renders_one :custom_content - renders_many :items, MenuItemComponent + renders_many :items, DS::MenuItem VARIANTS = %i[icon button avatar].freeze diff --git a/app/components/menu_controller.js b/app/components/DS/menu_controller.js similarity index 100% rename from app/components/menu_controller.js rename to app/components/DS/menu_controller.js diff --git a/app/components/menu_item_component.html.erb b/app/components/DS/menu_item.html.erb similarity index 100% rename from app/components/menu_item_component.html.erb rename to app/components/DS/menu_item.html.erb diff --git a/app/components/menu_item_component.rb b/app/components/DS/menu_item.rb similarity index 97% rename from app/components/menu_item_component.rb rename to app/components/DS/menu_item.rb index 9270de11..5b099e7a 100644 --- a/app/components/menu_item_component.rb +++ b/app/components/DS/menu_item.rb @@ -1,4 +1,4 @@ -class MenuItemComponent < ViewComponent::Base +class DS::MenuItem < DesignSystemComponent VARIANTS = %i[link button divider].freeze attr_reader :variant, :text, :icon, :href, :method, :destructive, :confirm, :frame, :opts diff --git a/app/components/tab_component.rb b/app/components/DS/tab.rb similarity index 75% rename from app/components/tab_component.rb rename to app/components/DS/tab.rb index fc084a1a..d1e7e7a9 100644 --- a/app/components/tab_component.rb +++ b/app/components/DS/tab.rb @@ -1,4 +1,4 @@ -class TabComponent < ViewComponent::Base +class DS::Tab < DesignSystemComponent attr_reader :id, :label def initialize(id:, label:) diff --git a/app/components/tabs_component.html.erb b/app/components/DS/tabs.html.erb similarity index 100% rename from app/components/tabs_component.html.erb rename to app/components/DS/tabs.html.erb diff --git a/app/components/tabs_component.rb b/app/components/DS/tabs.rb similarity index 96% rename from app/components/tabs_component.rb rename to app/components/DS/tabs.rb index 747a9420..bcae1ea7 100644 --- a/app/components/tabs_component.rb +++ b/app/components/DS/tabs.rb @@ -1,6 +1,6 @@ -class TabsComponent < ViewComponent::Base +class DS::Tabs < DesignSystemComponent renders_one :nav, ->(classes: nil) do - Tabs::NavComponent.new( + DS::Tabs::Nav.new( active_tab: active_tab, active_btn_classes: active_btn_classes, inactive_btn_classes: inactive_btn_classes, diff --git a/app/components/tabs/nav_component.rb b/app/components/DS/tabs/nav.rb similarity index 94% rename from app/components/tabs/nav_component.rb rename to app/components/DS/tabs/nav.rb index 2c4e81ca..5aa43c1b 100644 --- a/app/components/tabs/nav_component.rb +++ b/app/components/DS/tabs/nav.rb @@ -1,4 +1,4 @@ -class Tabs::NavComponent < ViewComponent::Base +class DS::Tabs::Nav < DesignSystemComponent erb_template <<~ERB <%= tag.nav class: classes do %> <% btns.each do |btn| %> diff --git a/app/components/tabs/panel_component.rb b/app/components/DS/tabs/panel.rb similarity index 69% rename from app/components/tabs/panel_component.rb rename to app/components/DS/tabs/panel.rb index 3c34932a..f354e312 100644 --- a/app/components/tabs/panel_component.rb +++ b/app/components/DS/tabs/panel.rb @@ -1,4 +1,4 @@ -class Tabs::PanelComponent < ViewComponent::Base +class DS::Tabs::Panel < DesignSystemComponent attr_reader :tab_id def initialize(tab_id:) diff --git a/app/components/tabs_controller.js b/app/components/DS/tabs_controller.js similarity index 100% rename from app/components/tabs_controller.js rename to app/components/DS/tabs_controller.js diff --git a/app/components/toggle_component.html.erb b/app/components/DS/toggle.html.erb similarity index 100% rename from app/components/toggle_component.html.erb rename to app/components/DS/toggle.html.erb diff --git a/app/components/toggle_component.rb b/app/components/DS/toggle.rb similarity index 95% rename from app/components/toggle_component.rb rename to app/components/DS/toggle.rb index e3af85a8..c384a296 100644 --- a/app/components/toggle_component.rb +++ b/app/components/DS/toggle.rb @@ -1,4 +1,4 @@ -class ToggleComponent < ViewComponent::Base +class DS::Toggle < DesignSystemComponent attr_reader :id, :name, :checked, :disabled, :checked_value, :unchecked_value, :opts def initialize(id:, name: nil, checked: false, disabled: false, checked_value: "1", unchecked_value: "0", **opts) diff --git a/app/components/UI/account_page.html.erb b/app/components/UI/account_page.html.erb index 7b02d30f..9b7c01ab 100644 --- a/app/components/UI/account_page.html.erb +++ b/app/components/UI/account_page.html.erb @@ -8,7 +8,7 @@
<% if tabs.count > 1 %> - <%= render TabsComponent.new(active_tab: active_tab, url_param_key: "tab") do |tabs_container| %> + <%= render DS::Tabs.new(active_tab: active_tab, url_param_key: "tab") do |tabs_container| %> <% tabs_container.with_nav(classes: "max-w-fit") do |nav| %> <% tabs.each do |tab| %> <% nav.with_btn(id: tab, label: tab.to_s.humanize, classes: "px-6") %> diff --git a/app/components/design_system_component.rb b/app/components/design_system_component.rb new file mode 100644 index 00000000..35d21681 --- /dev/null +++ b/app/components/design_system_component.rb @@ -0,0 +1,2 @@ +class DesignSystemComponent < ViewComponent::Base +end diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 094cd840..3ec81e82 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -21,7 +21,7 @@ module ApplicationHelper if custom inline_svg_tag("#{key}.svg", class: icon_classes, **opts) elsif as_button - render ButtonComponent.new(variant: "icon", class: extra_classes, icon: key, size: size, type: "button", **opts) + render DS::Button.new(variant: "icon", class: extra_classes, icon: key, size: size, type: "button", **opts) else lucide_icon(key, class: icon_classes, **opts) end diff --git a/app/helpers/styled_form_builder.rb b/app/helpers/styled_form_builder.rb index b614255d..f90888d7 100644 --- a/app/helpers/styled_form_builder.rb +++ b/app/helpers/styled_form_builder.rb @@ -50,7 +50,7 @@ class StyledFormBuilder < ActionView::Helpers::FormBuilder checked = object ? object.send(method) : options[:checked] @template.render( - ToggleComponent.new( + DS::Toggle.new( id: field_id, name: field_name, checked: checked, @@ -67,7 +67,7 @@ class StyledFormBuilder < ActionView::Helpers::FormBuilder value ||= submit_default_value @template.render( - ButtonComponent.new( + DS::Button.new( text: value, data: (options[:data] || {}).merge({ turbo_submits_with: "Submitting..." }), full_width: true diff --git a/app/views/accounts/_account.html.erb b/app/views/accounts/_account.html.erb index 9430d605..b1e1be99 100644 --- a/app/views/accounts/_account.html.erb +++ b/app/views/accounts/_account.html.erb @@ -41,7 +41,7 @@ <% end %> <% if account.draft? %> - <%= render LinkComponent.new( + <%= render DS::Link.new( text: "Complete setup", href: edit_account_path(account, return_to: return_to), variant: :outline, @@ -49,7 +49,7 @@ ) %> <% elsif account.active? || account.disabled? %> <%= form_with model: account, url: toggle_active_account_path(account), method: :patch, data: { turbo_frame: "_top", controller: "auto-submit-form" } do |f| %> - <%= render ToggleComponent.new( + <%= render DS::Toggle.new( id: "account_#{account.id}_active", name: "active", checked: account.active?, diff --git a/app/views/accounts/_account_sidebar_tabs.html.erb b/app/views/accounts/_account_sidebar_tabs.html.erb index 182bdd6e..8951cc3c 100644 --- a/app/views/accounts/_account_sidebar_tabs.html.erb +++ b/app/views/accounts/_account_sidebar_tabs.html.erb @@ -21,7 +21,7 @@ <% end %> - <%= render TabsComponent.new(active_tab: active_tab, session_key: "account_sidebar_tab", testid: "account-sidebar-tabs") do |tabs| %> + <%= render DS::Tabs.new(active_tab: active_tab, session_key: "account_sidebar_tab", testid: "account-sidebar-tabs") do |tabs| %> <% tabs.with_nav do |nav| %> <% nav.with_btn(id: "asset", label: "Assets") %> <% nav.with_btn(id: "liability", label: "Debts") %> @@ -30,7 +30,7 @@ <% tabs.with_panel(tab_id: "asset") do %>
- <%= render LinkComponent.new( + <%= render DS::Link.new( text: "New asset", variant: "ghost", href: new_account_path(step: "method_select", classification: "asset"), @@ -50,7 +50,7 @@ <% tabs.with_panel(tab_id: "liability") do %>
- <%= render LinkComponent.new( + <%= render DS::Link.new( text: "New debt", variant: "ghost", href: new_account_path(step: "method_select", classification: "liability"), @@ -70,7 +70,7 @@ <% tabs.with_panel(tab_id: "all") do %>
- <%= render LinkComponent.new( + <%= render DS::Link.new( text: "New account", variant: "ghost", full_width: true, diff --git a/app/views/accounts/_account_type.html.erb b/app/views/accounts/_account_type.html.erb index 9eb98d6e..741ace78 100644 --- a/app/views/accounts/_account_type.html.erb +++ b/app/views/accounts/_account_type.html.erb @@ -2,7 +2,7 @@ <%= link_to new_polymorphic_path(accountable, step: "method_select", return_to: params[:return_to]), class: "flex items-center gap-4 w-full text-center focus:outline-hidden hover:bg-surface-hover focus:bg-surface-hover fg-primary border border-transparent block px-2 rounded-lg p-2" do %> - <%= render FilledIconComponent.new( + <%= render DS::FilledIcon.new( icon: accountable.icon, hex_color: accountable.color, ) %> diff --git a/app/views/accounts/_accountable_group.html.erb b/app/views/accounts/_accountable_group.html.erb index ccca2088..e3ae8d5a 100644 --- a/app/views/accounts/_accountable_group.html.erb +++ b/app/views/accounts/_accountable_group.html.erb @@ -2,7 +2,7 @@
<% is_open = open.nil? ? account_group.accounts.any? { |account| page_active?(account_path(account)) } : open %> - <%= render DisclosureComponent.new(align: :left, open: is_open) do |disclosure| %> + <%= render DS::Disclosure.new(align: :left, open: is_open) do |disclosure| %> <% disclosure.with_summary_content do %>
<%= icon "chevron-right", class: "group-open:transform group-open:rotate-90" %> @@ -51,7 +51,7 @@
- <%= render LinkComponent.new( + <%= render DS::Link.new( href: new_polymorphic_path(account_group.key, step: "method_select"), text: "New #{account_group.name.downcase.singularize}", icon: "plus", diff --git a/app/views/accounts/_empty.html.erb b/app/views/accounts/_empty.html.erb index a1eef715..4583616f 100644 --- a/app/views/accounts/_empty.html.erb +++ b/app/views/accounts/_empty.html.erb @@ -3,7 +3,7 @@ <%= tag.p t(".no_accounts"), class: "text-primary mb-1 font-medium" %> <%= tag.p t(".empty_message"), class: "text-secondary mb-4" %> - <%= render LinkComponent.new( + <%= render DS::Link.new( text: t(".new_account"), href: new_account_path, frame: :modal diff --git a/app/views/accounts/_form.html.erb b/app/views/accounts/_form.html.erb index ef2e0af5..d2139b56 100644 --- a/app/views/accounts/_form.html.erb +++ b/app/views/accounts/_form.html.erb @@ -1,7 +1,7 @@ <%# locals: (account:, url:) %> <% if @error_message.present? %> - <%= render AlertComponent.new(message: @error_message, variant: :error) %> + <%= render DS::Alert.new(message: @error_message, variant: :error) %> <% end %> <%= styled_form_with model: account, url: url, scope: :account, data: { turbo: false }, class: "flex flex-col gap-4 justify-between grow text-primary" do |form| %> diff --git a/app/views/accounts/_logo.html.erb b/app/views/accounts/_logo.html.erb index 8eec2153..1da8e0bc 100644 --- a/app/views/accounts/_logo.html.erb +++ b/app/views/accounts/_logo.html.erb @@ -12,5 +12,5 @@ <% elsif account.logo.attached? %> <%= image_tag account.logo, class: "shrink-0 rounded-full #{size_classes[size]}" %> <% else %> - <%= render FilledIconComponent.new(variant: :text, hex_color: color || account.accountable.color, text: account.name, size: size, rounded: true) %> + <%= render DS::FilledIcon.new(variant: :text, hex_color: color || account.accountable.color, text: account.name, size: size, rounded: true) %> <% end %> diff --git a/app/views/accounts/index.html.erb b/app/views/accounts/index.html.erb index 35e647ea..ff45d33f 100644 --- a/app/views/accounts/index.html.erb +++ b/app/views/accounts/index.html.erb @@ -2,7 +2,7 @@

<%= t(".accounts") %>

- <%= render LinkComponent.new( + <%= render DS::Link.new( text: "New account", href: new_account_path(return_to: accounts_path), variant: "primary", diff --git a/app/views/accounts/new.html.erb b/app/views/accounts/new.html.erb index 1ca5229e..35407561 100644 --- a/app/views/accounts/new.html.erb +++ b/app/views/accounts/new.html.erb @@ -25,7 +25,7 @@ <%= button_to imports_path(import: { type: "AccountImport" }), data: { turbo_frame: :_top }, class: "flex items-center gap-4 w-full text-center focus:outline-hidden hover:bg-surface-hover focus:bg-surface-hover fg-primary border border-transparent block px-2 rounded-lg p-2" do %> - <%= render FilledIconComponent.new( + <%= render DS::FilledIcon.new( icon: "download", hex_color: "#F79009", ) %> diff --git a/app/views/accounts/new/_container.html.erb b/app/views/accounts/new/_container.html.erb index 2d3582f7..47a75ca9 100644 --- a/app/views/accounts/new/_container.html.erb +++ b/app/views/accounts/new/_container.html.erb @@ -1,11 +1,11 @@ <%# locals: (title:, back_path: nil) %> -<%= render DialogComponent.new do |dialog| %> +<%= render DS::Dialog.new do |dialog| %>
<% if back_path %> - <%= render LinkComponent.new( + <%= render DS::Link.new( variant: "icon", icon: "arrow-left", href: back_path, diff --git a/app/views/accounts/show/_activity.html.erb b/app/views/accounts/show/_activity.html.erb index 3c454f2d..63e77110 100644 --- a/app/views/accounts/show/_activity.html.erb +++ b/app/views/accounts/show/_activity.html.erb @@ -5,7 +5,7 @@
<%= tag.h2 t(".title"), class: "font-medium text-lg" %> <% unless @account.plaid_account_id.present? %> - <%= render MenuComponent.new(variant: "button") do |menu| %> + <%= render DS::Menu.new(variant: "button") do |menu| %> <% menu.with_button(text: "New", variant: "secondary", icon: "plus") %> <% menu.with_item( diff --git a/app/views/accounts/show/_header.html.erb b/app/views/accounts/show/_header.html.erb index 06bcc3e2..421f188d 100644 --- a/app/views/accounts/show/_header.html.erb +++ b/app/views/accounts/show/_header.html.erb @@ -10,7 +10,7 @@

"><%= title %>

<% if account.draft? %> - <%= render LinkComponent.new( + <%= render DS::Link.new( text: "Complete setup", href: edit_account_path(account), variant: :outline, diff --git a/app/views/accounts/show/_menu.html.erb b/app/views/accounts/show/_menu.html.erb index 0691f34e..ef98ae9e 100644 --- a/app/views/accounts/show/_menu.html.erb +++ b/app/views/accounts/show/_menu.html.erb @@ -1,6 +1,6 @@ <%# locals: (account:) %> -<%= render MenuComponent.new(testid: "account-menu") do |menu| %> +<%= render DS::Menu.new(testid: "account-menu") do |menu| %> <% menu.with_item(variant: "link", text: "Edit", href: edit_account_path(account), icon: "pencil-line", data: { turbo_frame: :modal }) %> <% unless account.crypto? %> diff --git a/app/views/budget_categories/_budget_category.html.erb b/app/views/budget_categories/_budget_category.html.erb index 6ae6ff38..81e857a2 100644 --- a/app/views/budget_categories/_budget_category.html.erb +++ b/app/views/budget_categories/_budget_category.html.erb @@ -12,7 +12,7 @@ <% if budget_category.category.lucide_icon %> <%= icon(budget_category.category.lucide_icon, color: "current") %> <% else %> - <%= render FilledIconComponent.new( + <%= render DS::FilledIcon.new( variant: :text, hex_color: budget_category.category.color, text: budget_category.category.name, diff --git a/app/views/budget_categories/_confirm_button.html.erb b/app/views/budget_categories/_confirm_button.html.erb index f7e00a22..a9d98331 100644 --- a/app/views/budget_categories/_confirm_button.html.erb +++ b/app/views/budget_categories/_confirm_button.html.erb @@ -1,5 +1,5 @@
- <%= render ButtonComponent.new( + <%= render DS::Button.new( text: "Confirm", variant: "primary", full_width: true, diff --git a/app/views/budget_categories/_no_categories.html.erb b/app/views/budget_categories/_no_categories.html.erb index 927a0b2b..44d8915b 100644 --- a/app/views/budget_categories/_no_categories.html.erb +++ b/app/views/budget_categories/_no_categories.html.erb @@ -6,12 +6,12 @@

- <%= render ButtonComponent.new( + <%= render DS::Button.new( text: "Use defaults (recommended)", href: bootstrap_categories_path, ) %> - <%= render LinkComponent.new( + <%= render DS::Link.new( text: "New category", variant: "outline", icon: "plus", diff --git a/app/views/budget_categories/show.html.erb b/app/views/budget_categories/show.html.erb index d6e3ea1b..affb01af 100644 --- a/app/views/budget_categories/show.html.erb +++ b/app/views/budget_categories/show.html.erb @@ -1,4 +1,4 @@ -<%= render DialogComponent.new(variant: :drawer) do |dialog| %> +<%= render DS::Dialog.new(variant: :drawer) do |dialog| %> <% dialog.with_header do %>

Category

@@ -119,7 +119,7 @@ <% end %> - <%= render LinkComponent.new( + <%= render DS::Link.new( text: "View all category transactions", variant: "outline", full_width: true, diff --git a/app/views/budgets/_budget_donut.html.erb b/app/views/budgets/_budget_donut.html.erb index 384830e5..8726f4e4 100644 --- a/app/views/budgets/_budget_donut.html.erb +++ b/app/views/budgets/_budget_donut.html.erb @@ -12,7 +12,7 @@ <%= format_money(budget.actual_spending_money) %>
- <%= render LinkComponent.new( + <%= render DS::Link.new( text: "of #{budget.budgeted_spending_money.format}", variant: "secondary", icon: "pencil", @@ -25,7 +25,7 @@ <%= format_money Money.new(0, budget.currency || budget.family.currency) %>
- <%= render LinkComponent.new( + <%= render DS::Link.new( text: "New budget", size: "sm", icon: "plus", @@ -46,7 +46,7 @@ <%= format_money(bc.actual_spending_money) %>

- <%= render LinkComponent.new( + <%= render DS::Link.new( text: "of #{bc.budgeted_spending_money.format(precision: 0)}", variant: "secondary", icon: "pencil", diff --git a/app/views/budgets/_budget_header.html.erb b/app/views/budgets/_budget_header.html.erb index c6c8ce21..6f7d59fc 100644 --- a/app/views/budgets/_budget_header.html.erb +++ b/app/views/budgets/_budget_header.html.erb @@ -3,7 +3,7 @@
<% if budget.previous_budget_param %> - <%= render LinkComponent.new( + <%= render DS::Link.new( variant: "icon", icon: "chevron-left", href: budget_path(budget.previous_budget_param), @@ -15,7 +15,7 @@ <% end %> <% if budget.next_budget_param %> - <%= render LinkComponent.new( + <%= render DS::Link.new( variant: "icon", icon: "chevron-right", href: budget_path(budget.next_budget_param), @@ -27,7 +27,7 @@ <% end %>
- <%= render MenuComponent.new(variant: "button") do |menu| %> + <%= render DS::Menu.new(variant: "button") do |menu| %> <% menu.with_button class: "flex items-center gap-1 hover:bg-alpha-black-25 cursor-pointer rounded-md p-2" do %> <%= @budget.name %> <%= icon("chevron-down") %> @@ -39,7 +39,7 @@ <% end %>
- <%= render LinkComponent.new( + <%= render DS::Link.new( text: "Today", variant: "outline", href: budget_path(Budget.date_to_param(Date.current)), diff --git a/app/views/budgets/_over_allocation_warning.html.erb b/app/views/budgets/_over_allocation_warning.html.erb index 8d9f5913..bd75fba2 100644 --- a/app/views/budgets/_over_allocation_warning.html.erb +++ b/app/views/budgets/_over_allocation_warning.html.erb @@ -4,7 +4,7 @@ <%= icon "alert-triangle", size: "lg", color: "destructive" %>

You have over-allocated your budget. Please fix your allocations.

- <%= render LinkComponent.new( + <%= render DS::Link.new( text: "Fix allocations", variant: "secondary", size: "sm", diff --git a/app/views/budgets/_picker.html.erb b/app/views/budgets/_picker.html.erb index 4b112f30..a1deaea0 100644 --- a/app/views/budgets/_picker.html.erb +++ b/app/views/budgets/_picker.html.erb @@ -38,7 +38,7 @@ <% param_key = Budget.date_to_param(date) %> <% if Budget.budget_date_valid?(date, family: family) %> - <%= render LinkComponent.new( + <%= render DS::Link.new( variant: "ghost", text: month_name, href: budget_path(param_key), diff --git a/app/views/budgets/edit.html.erb b/app/views/budgets/edit.html.erb index 546aa54b..3ec00b22 100644 --- a/app/views/budgets/edit.html.erb +++ b/app/views/budgets/edit.html.erb @@ -29,7 +29,7 @@

- <%= render ToggleComponent.new( + <%= render DS::Toggle.new( id: "auto_fill", data: { action: "change->budget-form#toggleAutoFill", diff --git a/app/views/budgets/show.html.erb b/app/views/budgets/show.html.erb index ff19bab1..de47b27c 100644 --- a/app/views/budgets/show.html.erb +++ b/app/views/budgets/show.html.erb @@ -18,7 +18,7 @@
<% if @budget.initialized? && @budget.available_to_allocate.positive? %> - <%= render TabsComponent.new(active_tab: params[:tab].presence || "budgeted") do |tabs| %> + <%= render DS::Tabs.new(active_tab: params[:tab].presence || "budgeted") do |tabs| %> <% tabs.with_nav do |nav| %> <% nav.with_btn(id: "budgeted", label: "Budgeted") %> <% nav.with_btn(id: "actuals", label: "Actual") %> @@ -49,7 +49,7 @@

Categories

<% if @budget.initialized? %> - <%= render LinkComponent.new( + <%= render DS::Link.new( text: "Edit", variant: "secondary", icon: "settings-2", diff --git a/app/views/categories/_category.html.erb b/app/views/categories/_category.html.erb index 1b49a045..dbc9b80f 100644 --- a/app/views/categories/_category.html.erb +++ b/app/views/categories/_category.html.erb @@ -12,7 +12,7 @@
- <%= render MenuComponent.new do |menu| %> + <%= render DS::Menu.new do |menu| %> <% menu.with_item(variant: "link", text: t(".edit"), icon: "pencil", href: edit_category_path(category), data: { turbo_frame: :modal }) %> <% if category.transactions.any? %> diff --git a/app/views/categories/_menu.html.erb b/app/views/categories/_menu.html.erb index d6ec5d0b..f7c74eac 100644 --- a/app/views/categories/_menu.html.erb +++ b/app/views/categories/_menu.html.erb @@ -1,6 +1,6 @@ <%# locals: (transaction:) %> -<%= render MenuComponent.new(variant: "button") do |menu| %> +<%= render DS::Menu.new(variant: "button") do |menu| %> <% menu.with_button do %> <% render partial: "categories/badge", locals: { category: transaction.category } %> <% end %> diff --git a/app/views/categories/edit.html.erb b/app/views/categories/edit.html.erb index dd8eb41c..b71dac59 100644 --- a/app/views/categories/edit.html.erb +++ b/app/views/categories/edit.html.erb @@ -1,4 +1,4 @@ -<%= render DialogComponent.new do |dialog| %> +<%= render DS::Dialog.new do |dialog| %> <% dialog.with_header(title: t(".edit")) %> <% dialog.with_body do %> <%= render "form", category: @category, categories: @categories %> diff --git a/app/views/categories/index.html.erb b/app/views/categories/index.html.erb index e15c0976..0c873915 100644 --- a/app/views/categories/index.html.erb +++ b/app/views/categories/index.html.erb @@ -2,7 +2,7 @@

<%= t(".categories") %>

- <%= render MenuComponent.new do |menu| %> + <%= render DS::Menu.new do |menu| %> <% menu.with_item( variant: "button", text: "Delete all", @@ -12,7 +12,7 @@ confirm: CustomConfirm.for_resource_deletion("all categories", high_severity: true)) %> <% end %> - <%= render LinkComponent.new( + <%= render DS::Link.new( text: t(".new"), variant: "primary", icon: "plus", @@ -38,12 +38,12 @@

<%= t(".empty") %>

- <%= render ButtonComponent.new( + <%= render DS::Button.new( text: t(".bootstrap"), href: bootstrap_categories_path, ) %> - <%= render LinkComponent.new( + <%= render DS::Link.new( text: t(".new"), variant: "outline", icon: "plus", diff --git a/app/views/categories/new.html.erb b/app/views/categories/new.html.erb index 09ac5cd7..73f69f64 100644 --- a/app/views/categories/new.html.erb +++ b/app/views/categories/new.html.erb @@ -1,4 +1,4 @@ -<%= render DialogComponent.new do |dialog| %> +<%= render DS::Dialog.new do |dialog| %> <% dialog.with_header(title: t(".new_category")) %> <% dialog.with_body do %> <%= render "form", category: @category, categories: @categories %> diff --git a/app/views/category/deletions/new.html.erb b/app/views/category/deletions/new.html.erb index b199b880..2de9c6c9 100644 --- a/app/views/category/deletions/new.html.erb +++ b/app/views/category/deletions/new.html.erb @@ -1,4 +1,4 @@ -<%= render DialogComponent.new do |dialog| %> +<%= render DS::Dialog.new do |dialog| %> <% dialog.with_header(title: t(".delete_category"), subtitle: t(".explanation", category_name: @category.name)) %> <% dialog.with_body do %> @@ -14,14 +14,14 @@ { prompt: t(".replacement_category_prompt"), label: t(".category"), container_class: "mb-4" }, data: { deletion_target: "replacementField", action: "deletion#chooseSubmitButton" } %> - <%= render ButtonComponent.new( + <%= render DS::Button.new( variant: "destructive", text: t(".delete_and_leave_uncategorized", category_name: @category.name), full_width: true, data: { deletion_target: "destructiveSubmitButton" } ) %> - <%= render ButtonComponent.new( + <%= render DS::Button.new( text: "Delete and reassign", data: { deletion_target: "safeSubmitButton" }, hidden: true, diff --git a/app/views/category/dropdowns/_row.html.erb b/app/views/category/dropdowns/_row.html.erb index de1adff2..6e25d478 100644 --- a/app/views/category/dropdowns/_row.html.erb +++ b/app/views/category/dropdowns/_row.html.erb @@ -24,7 +24,7 @@ <%= render partial: "categories/badge", locals: { category: category } %> <% end %> - <%= render MenuComponent.new do |menu| %> + <%= render DS::Menu.new do |menu| %> <% menu.with_item(variant: "link", text: t(".edit"), icon: "pencil-line", href: edit_category_path(category), data: { turbo_frame: :modal }) %> <% menu.with_item(variant: "link", text: t(".delete"), icon: "trash-2", href: new_category_deletion_path(category), data: { turbo_frame: :modal }, destructive: true) %> <% end %> diff --git a/app/views/category/dropdowns/show.html.erb b/app/views/category/dropdowns/show.html.erb index 6cc34e29..02ec05a7 100644 --- a/app/views/category/dropdowns/show.html.erb +++ b/app/views/category/dropdowns/show.html.erb @@ -29,7 +29,7 @@

<%= t(".empty") %>

- <%= render ButtonComponent.new( + <%= render DS::Button.new( text: t(".bootstrap"), variant: "outline", href: bootstrap_categories_path, diff --git a/app/views/chats/_chat.html.erb b/app/views/chats/_chat.html.erb index 129cdbe7..9eb35a0f 100644 --- a/app/views/chats/_chat.html.erb +++ b/app/views/chats/_chat.html.erb @@ -11,7 +11,7 @@

- <%= render MenuComponent.new(icon_vertical: true) do |menu| %> + <%= render DS::Menu.new(icon_vertical: true) do |menu| %> <% menu.with_item( variant: "link", text: "Edit chat title", diff --git a/app/views/chats/_chat_nav.html.erb b/app/views/chats/_chat_nav.html.erb index 5f4d44b5..6cf7d28f 100644 --- a/app/views/chats/_chat_nav.html.erb +++ b/app/views/chats/_chat_nav.html.erb @@ -4,7 +4,7 @@ <% path = chat.new_record? ? chats_path : chats_path(previous_chat_id: chat.id) %>
- <%= render LinkComponent.new( + <%= render DS::Link.new( id: "chat-nav-back", variant: "icon", icon: "menu", @@ -18,7 +18,7 @@
- <%= render MenuComponent.new(icon_vertical: true) do |menu| %> + <%= render DS::Menu.new(icon_vertical: true) do |menu| %> <% menu.with_item(variant: "link", text: "Start new chat", href: new_chat_path, icon: "plus") %> <% unless chat.new_record? %> diff --git a/app/views/chats/_error.html.erb b/app/views/chats/_error.html.erb index d72dd13d..bbcb7581 100644 --- a/app/views/chats/_error.html.erb +++ b/app/views/chats/_error.html.erb @@ -10,7 +10,7 @@

Failed to generate response. Please try again.

- <%= render ButtonComponent.new( + <%= render DS::Button.new( text: "Retry", href: retry_chat_path(chat), ) %> diff --git a/app/views/chats/index.html.erb b/app/views/chats/index.html.erb index 1b8f6d1d..0f450748 100644 --- a/app/views/chats/index.html.erb +++ b/app/views/chats/index.html.erb @@ -5,7 +5,7 @@

Chats

- <%= render LinkComponent.new( + <%= render DS::Link.new( id: "new-chat", icon: "plus", variant: "icon", diff --git a/app/views/credit_cards/_overview.html.erb b/app/views/credit_cards/_overview.html.erb index fec910e0..1dfcbb0b 100644 --- a/app/views/credit_cards/_overview.html.erb +++ b/app/views/credit_cards/_overview.html.erb @@ -27,7 +27,7 @@
- <%= render LinkComponent.new( + <%= render DS::Link.new( text: "Edit account details", variant: "ghost", href: edit_credit_card_path(account), diff --git a/app/views/credit_cards/edit.html.erb b/app/views/credit_cards/edit.html.erb index f30f68a0..5e95ffa5 100644 --- a/app/views/credit_cards/edit.html.erb +++ b/app/views/credit_cards/edit.html.erb @@ -1,4 +1,4 @@ -<%= render DialogComponent.new do |dialog| %> +<%= render DS::Dialog.new do |dialog| %> <% dialog.with_header(title: t(".edit", account: @account.name)) %> <% dialog.with_body do %> diff --git a/app/views/credit_cards/new.html.erb b/app/views/credit_cards/new.html.erb index 95bca964..a81805f2 100644 --- a/app/views/credit_cards/new.html.erb +++ b/app/views/credit_cards/new.html.erb @@ -5,7 +5,7 @@ show_eu_link: @show_eu_link, accountable_type: "CreditCard" %> <% else %> - <%= render DialogComponent.new do |dialog| %> + <%= render DS::Dialog.new do |dialog| %> <% dialog.with_header(title: t(".title")) %> <% dialog.with_body do %> <%= render "credit_cards/form", account: @account, url: credit_cards_path %> diff --git a/app/views/cryptos/edit.html.erb b/app/views/cryptos/edit.html.erb index 6b7812c2..0f08498d 100644 --- a/app/views/cryptos/edit.html.erb +++ b/app/views/cryptos/edit.html.erb @@ -1,4 +1,4 @@ -<%= render DialogComponent.new do |dialog| %> +<%= render DS::Dialog.new do |dialog| %> <% dialog.with_header(title: t(".edit", account: @account.name)) %> <% dialog.with_body do %> <%= render "form", account: @account, url: crypto_path(@account) %> diff --git a/app/views/cryptos/new.html.erb b/app/views/cryptos/new.html.erb index 8e93242f..97fcccdc 100644 --- a/app/views/cryptos/new.html.erb +++ b/app/views/cryptos/new.html.erb @@ -5,7 +5,7 @@ show_eu_link: @show_eu_link, accountable_type: "Crypto" %> <% else %> - <%= render DialogComponent.new do |dialog| %> + <%= render DS::Dialog.new do |dialog| %> <% dialog.with_header(title: t(".title")) %> <% dialog.with_body do %> <%= render "form", account: @account, url: cryptos_path %> diff --git a/app/views/depositories/edit.html.erb b/app/views/depositories/edit.html.erb index 03d3e668..5b265f41 100644 --- a/app/views/depositories/edit.html.erb +++ b/app/views/depositories/edit.html.erb @@ -1,4 +1,4 @@ -<%= render DialogComponent.new do |dialog| %> +<%= render DS::Dialog.new do |dialog| %> <% dialog.with_header(title: t(".edit", account: @account.name)) %> <% dialog.with_body do %> <%= render "form", account: @account, url: depository_path(@account) %> diff --git a/app/views/depositories/new.html.erb b/app/views/depositories/new.html.erb index 23bbd79b..f75ed00b 100644 --- a/app/views/depositories/new.html.erb +++ b/app/views/depositories/new.html.erb @@ -5,7 +5,7 @@ show_eu_link: @show_eu_link, accountable_type: "Depository" %> <% else %> - <%= render DialogComponent.new do |dialog| %> + <%= render DS::Dialog.new do |dialog| %> <% dialog.with_header(title: t(".title")) %> <% dialog.with_body do %> <%= render "depositories/form", account: @account, url: depositories_path %> diff --git a/app/views/doorkeeper/authorizations/error.html.erb b/app/views/doorkeeper/authorizations/error.html.erb index 8df12c18..401e191f 100644 --- a/app/views/doorkeeper/authorizations/error.html.erb +++ b/app/views/doorkeeper/authorizations/error.html.erb @@ -13,7 +13,7 @@
- <%= render LinkComponent.new( + <%= render DS::Link.new( text: "Go back", href: "javascript:history.back()", variant: :secondary diff --git a/app/views/doorkeeper/authorizations/new.html.erb b/app/views/doorkeeper/authorizations/new.html.erb index 4c3a727a..30c3ebfa 100644 --- a/app/views/doorkeeper/authorizations/new.html.erb +++ b/app/views/doorkeeper/authorizations/new.html.erb @@ -37,7 +37,7 @@ <% if params[:display].present? %> <%= hidden_field_tag :display, params[:display], id: nil %> <% end %> - <%= render ButtonComponent.new( + <%= render DS::Button.new( text: t("doorkeeper.authorizations.buttons.authorize"), variant: :primary, size: :lg, @@ -59,7 +59,7 @@ <% if params[:display].present? %> <%= hidden_field_tag :display, params[:display], id: nil %> <% end %> - <%= render ButtonComponent.new( + <%= render DS::Button.new( text: t("doorkeeper.authorizations.buttons.deny"), variant: :outline, size: :lg, diff --git a/app/views/family_merchants/_family_merchant.html.erb b/app/views/family_merchants/_family_merchant.html.erb index 7614699c..bc69a25f 100644 --- a/app/views/family_merchants/_family_merchant.html.erb +++ b/app/views/family_merchants/_family_merchant.html.erb @@ -15,7 +15,7 @@

- <%= render MenuComponent.new do |menu| %> + <%= render DS::Menu.new do |menu| %> <% menu.with_item(variant: "link", text: "Edit", href: edit_family_merchant_path(family_merchant), icon: "pencil", data: { turbo_frame: "modal" }) %> <% menu.with_item( variant: "button", diff --git a/app/views/family_merchants/edit.html.erb b/app/views/family_merchants/edit.html.erb index 044ae422..f1dfd133 100644 --- a/app/views/family_merchants/edit.html.erb +++ b/app/views/family_merchants/edit.html.erb @@ -1,4 +1,4 @@ -<%= render DialogComponent.new do |dialog| %> +<%= render DS::Dialog.new do |dialog| %> <% dialog.with_header(title: t(".title")) %> <% dialog.with_body do %> <%= render "form", family_merchant: @family_merchant %> diff --git a/app/views/family_merchants/index.html.erb b/app/views/family_merchants/index.html.erb index a65efeb0..1ca1e940 100644 --- a/app/views/family_merchants/index.html.erb +++ b/app/views/family_merchants/index.html.erb @@ -1,7 +1,7 @@

Merchants

- <%= render LinkComponent.new( + <%= render DS::Link.new( text: "New merchant", variant: "primary", href: new_family_merchant_path, @@ -29,7 +29,7 @@

<%= t(".empty") %>

- <%= render LinkComponent.new( + <%= render DS::Link.new( text: t(".new"), icon: "plus", href: new_family_merchant_path, diff --git a/app/views/family_merchants/new.html.erb b/app/views/family_merchants/new.html.erb index 044ae422..f1dfd133 100644 --- a/app/views/family_merchants/new.html.erb +++ b/app/views/family_merchants/new.html.erb @@ -1,4 +1,4 @@ -<%= render DialogComponent.new do |dialog| %> +<%= render DS::Dialog.new do |dialog| %> <% dialog.with_header(title: t(".title")) %> <% dialog.with_body do %> <%= render "form", family_merchant: @family_merchant %> diff --git a/app/views/holdings/_cash.html.erb b/app/views/holdings/_cash.html.erb index 98ce1d3a..6fde392d 100644 --- a/app/views/holdings/_cash.html.erb +++ b/app/views/holdings/_cash.html.erb @@ -4,7 +4,7 @@
- <%= render FilledIconComponent.new( + <%= render DS::FilledIcon.new( variant: :text, text: currency.symbol, rounded: true, diff --git a/app/views/holdings/show.html.erb b/app/views/holdings/show.html.erb index 19e4b504..5088ef10 100644 --- a/app/views/holdings/show.html.erb +++ b/app/views/holdings/show.html.erb @@ -1,4 +1,4 @@ -<%= render DialogComponent.new(variant: "drawer") do |dialog| %> +<%= render DS::Dialog.new(variant: "drawer") do |dialog| %> <% dialog.with_header do %>
diff --git a/app/views/import/cleans/show.html.erb b/app/views/import/cleans/show.html.erb index 4a743d01..c0bce7d7 100644 --- a/app/views/import/cleans/show.html.erb +++ b/app/views/import/cleans/show.html.erb @@ -17,7 +17,7 @@

Your data has been cleaned

- <%= render LinkComponent.new( + <%= render DS::Link.new( text: "Next step", variant: "primary", href: import_confirm_path(@import), diff --git a/app/views/import/configurations/show.html.erb b/app/views/import/configurations/show.html.erb index 89e53e07..5eb408b1 100644 --- a/app/views/import/configurations/show.html.erb +++ b/app/views/import/configurations/show.html.erb @@ -18,8 +18,8 @@

We found a configuration from a previous import for this account. Would you like to apply it to this import?

- <%= render LinkComponent.new(text: "Manually configure", href: import_configuration_path(@import), variant: "outline") %> - <%= render ButtonComponent.new(text: "Apply template", href: apply_template_import_path(@import), method: :put, data: { turbo_frame: :_top }) %> + <%= render DS::Link.new(text: "Manually configure", href: import_configuration_path(@import), variant: "outline") %> + <%= render DS::Button.new(text: "Apply template", href: apply_template_import_path(@import), method: :put, data: { turbo_frame: :_top }) %>
diff --git a/app/views/import/confirms/_mappings.html.erb b/app/views/import/confirms/_mappings.html.erb index 2fcb14ac..bd27ff32 100644 --- a/app/views/import/confirms/_mappings.html.erb +++ b/app/views/import/confirms/_mappings.html.erb @@ -11,7 +11,7 @@
<%= tag.p t(".no_accounts"), class: "text-sm" %> - <%= render LinkComponent.new( + <%= render DS::Link.new( text: "Create account", variant: "primary", href: new_account_path(return_to: import_confirm_path(import)), @@ -25,7 +25,7 @@
<%= tag.p t(".unassigned_account"), class: "text-sm" %> - <%= render LinkComponent.new( + <%= render DS::Link.new( text: t(".create_account"), variant: "primary", href: new_account_path(return_to: import_confirm_path(import)), @@ -59,7 +59,7 @@
- <%= render LinkComponent.new( + <%= render DS::Link.new( text: "Next", variant: "primary", href: is_last_step ? import_path(import) : url_for(step: step_idx + 2), diff --git a/app/views/import/uploads/show.html.erb b/app/views/import/uploads/show.html.erb index 1f390617..1115382e 100644 --- a/app/views/import/uploads/show.html.erb +++ b/app/views/import/uploads/show.html.erb @@ -11,7 +11,7 @@

<%= t(".description") %>

- <%= render TabsComponent.new(active_tab: params[:tab] || "csv-upload", url_param_key: "tab", testid: "import-tabs") do |tabs| %> + <%= render DS::Tabs.new(active_tab: params[:tab] || "csv-upload", url_param_key: "tab", testid: "import-tabs") do |tabs| %> <% tabs.with_nav do |nav| %> <% nav.with_btn(id: "csv-upload", label: "Upload CSV") %> <% nav.with_btn(id: "csv-paste", label: "Copy & Paste") %> diff --git a/app/views/imports/_empty.html.erb b/app/views/imports/_empty.html.erb index 8f147797..dc864ea0 100644 --- a/app/views/imports/_empty.html.erb +++ b/app/views/imports/_empty.html.erb @@ -2,7 +2,7 @@

<%= t(".message") %>

- <%= render LinkComponent.new( + <%= render DS::Link.new( text: t(".new"), variant: "primary", href: new_import_path, diff --git a/app/views/imports/_failure.html.erb b/app/views/imports/_failure.html.erb index 533d4e52..ee9e8b9f 100644 --- a/app/views/imports/_failure.html.erb +++ b/app/views/imports/_failure.html.erb @@ -11,6 +11,6 @@

Please check that your file format, for any errors and that all required fields are filled, then come back and try again.

- <%= render ButtonComponent.new(text: "Try again", href: publish_import_path(import), full_width: true) %> + <%= render DS::Button.new(text: "Try again", href: publish_import_path(import), full_width: true) %>
diff --git a/app/views/imports/_import.html.erb b/app/views/imports/_import.html.erb index 88a75dce..106b4d24 100644 --- a/app/views/imports/_import.html.erb +++ b/app/views/imports/_import.html.erb @@ -36,7 +36,7 @@ <% end %>
- <%= render MenuComponent.new do |menu| %> + <%= render DS::Menu.new do |menu| %> <% menu.with_item(variant: "link", text: t(".view"), href: import_path(import), icon: "eye") %> <% if import.complete? || import.revert_failed? %> diff --git a/app/views/imports/_importing.html.erb b/app/views/imports/_importing.html.erb index 490132a8..43d61f54 100644 --- a/app/views/imports/_importing.html.erb +++ b/app/views/imports/_importing.html.erb @@ -12,8 +12,8 @@
- <%= render LinkComponent.new(text: "Check status", href: import_path(import), variant: "primary", full_width: true) %> - <%= render LinkComponent.new(text: "Back to dashboard", href: root_path, variant: "secondary", full_width: true) %> + <%= render DS::Link.new(text: "Check status", href: import_path(import), variant: "primary", full_width: true) %> + <%= render DS::Link.new(text: "Back to dashboard", href: root_path, variant: "secondary", full_width: true) %>
diff --git a/app/views/imports/_ready.html.erb b/app/views/imports/_ready.html.erb index d093694f..9ab7c0eb 100644 --- a/app/views/imports/_ready.html.erb +++ b/app/views/imports/_ready.html.erb @@ -35,5 +35,5 @@
- <%= render ButtonComponent.new(text: "Publish import", href: publish_import_path(import), full_width: true) %> + <%= render DS::Button.new(text: "Publish import", href: publish_import_path(import), full_width: true) %>
diff --git a/app/views/imports/_revert_failure.html.erb b/app/views/imports/_revert_failure.html.erb index 6eacd786..ae072b74 100644 --- a/app/views/imports/_revert_failure.html.erb +++ b/app/views/imports/_revert_failure.html.erb @@ -11,7 +11,7 @@

Please try again or contact support.

- <%= render ButtonComponent.new( + <%= render DS::Button.new( text: "Try again", full_width: true, href: revert_import_path(import) diff --git a/app/views/imports/_success.html.erb b/app/views/imports/_success.html.erb index a1130c0d..c0849e94 100644 --- a/app/views/imports/_success.html.erb +++ b/app/views/imports/_success.html.erb @@ -11,7 +11,7 @@

Your imported data has been successfully added to the app and is now ready for use.

- <%= render LinkComponent.new( + <%= render DS::Link.new( text: "Back to dashboard", variant: "primary", full_width: true, diff --git a/app/views/imports/index.html.erb b/app/views/imports/index.html.erb index 1a81ecdb..c2f2660f 100644 --- a/app/views/imports/index.html.erb +++ b/app/views/imports/index.html.erb @@ -1,7 +1,7 @@

<%= t(".title") %>

- <%= render LinkComponent.new( + <%= render DS::Link.new( text: "New import", href: new_import_path, icon: "plus", diff --git a/app/views/imports/new.html.erb b/app/views/imports/new.html.erb index a1fcbe0c..c436cb25 100644 --- a/app/views/imports/new.html.erb +++ b/app/views/imports/new.html.erb @@ -1,4 +1,4 @@ -<%= render DialogComponent.new do |dialog| %> +<%= render DS::Dialog.new do |dialog| %> <% dialog.with_header(title: t(".title"), subtitle: t(".description")) %> <% dialog.with_body do %> diff --git a/app/views/investments/edit.html.erb b/app/views/investments/edit.html.erb index 433f118f..b9c83af4 100644 --- a/app/views/investments/edit.html.erb +++ b/app/views/investments/edit.html.erb @@ -1,4 +1,4 @@ -<%= render DialogComponent.new do |dialog| %> +<%= render DS::Dialog.new do |dialog| %> <% dialog.with_header(title: t(".edit", account: @account.name)) %> <% dialog.with_body do %> <%= render "investments/form", account: @account, url: investment_path(@account) %> diff --git a/app/views/investments/new.html.erb b/app/views/investments/new.html.erb index 1c2fb8e4..acfaa6ed 100644 --- a/app/views/investments/new.html.erb +++ b/app/views/investments/new.html.erb @@ -5,7 +5,7 @@ show_eu_link: @show_eu_link, accountable_type: "Investment" %> <% else %> - <%= render DialogComponent.new do |dialog| %> + <%= render DS::Dialog.new do |dialog| %> <% dialog.with_header(title: t(".title")) %> <% dialog.with_body do %> <%= render "investments/form", account: @account, url: investments_path %> diff --git a/app/views/invitations/new.html.erb b/app/views/invitations/new.html.erb index 71e4d624..6968f72d 100644 --- a/app/views/invitations/new.html.erb +++ b/app/views/invitations/new.html.erb @@ -1,4 +1,4 @@ -<%= render DialogComponent.new do |dialog| %> +<%= render DS::Dialog.new do |dialog| %> <% dialog.with_header(title: t(".title"), subtitle: t(".subtitle")) %> <% dialog.with_body do %> diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index e8fc202e..c053e04d 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -60,7 +60,7 @@
- <%= render ButtonComponent.new( + <%= render DS::Button.new( variant: "icon", icon: "message-circle-question", data: { action: "intercom#show" } @@ -93,7 +93,7 @@

<%= Current.family.days_left_in_trial %> days remaining

- <%= render LinkComponent.new( + <%= render DS::Link.new( text: "Upgrade", href: upgrade_subscription_path, ) %> diff --git a/app/views/layouts/imports.html.erb b/app/views/layouts/imports.html.erb index 258cc0a4..09f15cf0 100644 --- a/app/views/layouts/imports.html.erb +++ b/app/views/layouts/imports.html.erb @@ -1,7 +1,7 @@ <%= render "layouts/shared/htmldoc" do %>
- <%= render LinkComponent.new( + <%= render DS::Link.new( variant: "icon", icon: "arrow-left", href: content_for(:previous_path) || imports_path @@ -11,7 +11,7 @@ <%= yield :header_nav %> - <%= render LinkComponent.new( + <%= render DS::Link.new( variant: "icon", icon: "x", href: imports_path diff --git a/app/views/layouts/shared/_confirm_dialog.html.erb b/app/views/layouts/shared/_confirm_dialog.html.erb index 8e513755..03e92381 100644 --- a/app/views/layouts/shared/_confirm_dialog.html.erb +++ b/app/views/layouts/shared/_confirm_dialog.html.erb @@ -1,6 +1,6 @@ <%# This dialog is used as an override to the browser's confirm API when submitting forms with data-turbo-confirm %> <%# See confirm_dialog_controller.js and _htmldoc.html.erb %> -<%= render DialogComponent.new(id: "confirm-dialog", auto_open: false, data: { controller: "confirm-dialog" }, width: "sm", disable_frame: true) do |dialog| %> +<%= render DS::Dialog.new(id: "confirm-dialog", auto_open: false, data: { controller: "confirm-dialog" }, width: "sm", disable_frame: true) do |dialog| %> <% dialog.with_body do %>
@@ -14,7 +14,7 @@
<% ["primary", "outline-destructive", "destructive"].each do |variant| %> - <%= render ButtonComponent.new( + <%= render DS::Button.new( text: "Confirm", variant: variant, autofocus: true, diff --git a/app/views/layouts/wizard.html.erb b/app/views/layouts/wizard.html.erb index cd775c34..3e82583e 100644 --- a/app/views/layouts/wizard.html.erb +++ b/app/views/layouts/wizard.html.erb @@ -4,7 +4,7 @@ <% if content_for?(:prev_nav) %> <%= yield :prev_nav %> <% else %> - <%= render LinkComponent.new( + <%= render DS::Link.new( variant: "icon", icon: "arrow-left", href: content_for(:previous_path) || root_path @@ -18,7 +18,7 @@ <% if content_for?(:cancel_action) %> <%= yield :cancel_action %> <% else %> - <%= render LinkComponent.new( + <%= render DS::Link.new( variant: "icon", icon: "x", href: content_for(:cancel_path) || root_path diff --git a/app/views/loans/edit.html.erb b/app/views/loans/edit.html.erb index f9a56f12..19ca2f82 100644 --- a/app/views/loans/edit.html.erb +++ b/app/views/loans/edit.html.erb @@ -1,4 +1,4 @@ -<%= render DialogComponent.new do |dialog| %> +<%= render DS::Dialog.new do |dialog| %> <% dialog.with_header(title: t(".edit", account: @account.name)) %> <% dialog.with_body do %> <%= render "form", account: @account, url: loan_path(@account) %> diff --git a/app/views/loans/new.html.erb b/app/views/loans/new.html.erb index c3784ffd..74d66496 100644 --- a/app/views/loans/new.html.erb +++ b/app/views/loans/new.html.erb @@ -5,7 +5,7 @@ show_eu_link: @show_eu_link, accountable_type: "Loan" %> <% else %> - <%= render DialogComponent.new do |dialog| %> + <%= render DS::Dialog.new do |dialog| %> <% dialog.with_header(title: t(".title")) %> <% dialog.with_body do %> <%= render "loans/form", account: @account, url: loans_path %> diff --git a/app/views/loans/tabs/_overview.html.erb b/app/views/loans/tabs/_overview.html.erb index e1649583..41167e6f 100644 --- a/app/views/loans/tabs/_overview.html.erb +++ b/app/views/loans/tabs/_overview.html.erb @@ -45,7 +45,7 @@
- <%= render LinkComponent.new( + <%= render DS::Link.new( text: "Edit loan details", variant: "ghost", href: edit_loan_path(account), diff --git a/app/views/mfa/backup_codes.html.erb b/app/views/mfa/backup_codes.html.erb index 6292d9be..4c095979 100644 --- a/app/views/mfa/backup_codes.html.erb +++ b/app/views/mfa/backup_codes.html.erb @@ -19,7 +19,7 @@ <% end %>
- <%= render LinkComponent.new( + <%= render DS::Link.new( text: t(".continue"), href: settings_security_path, variant: "primary", diff --git a/app/views/onboardings/_logout.html.erb b/app/views/onboardings/_logout.html.erb index 20f43408..09d631c0 100644 --- a/app/views/onboardings/_logout.html.erb +++ b/app/views/onboardings/_logout.html.erb @@ -1,4 +1,4 @@ - <%= render ButtonComponent.new( + <%= render DS::Button.new( text: "Sign out", icon: "log-out", icon_position: :right, diff --git a/app/views/onboardings/goals.html.erb b/app/views/onboardings/goals.html.erb index 9ea04b07..93c34818 100644 --- a/app/views/onboardings/goals.html.erb +++ b/app/views/onboardings/goals.html.erb @@ -44,7 +44,7 @@
- <%= render ButtonComponent.new( + <%= render DS::Button.new( text: "Next", full_width: true ) %> diff --git a/app/views/onboardings/trial.html.erb b/app/views/onboardings/trial.html.erb index 9aa9e6a7..a3566c26 100644 --- a/app/views/onboardings/trial.html.erb +++ b/app/views/onboardings/trial.html.erb @@ -30,20 +30,20 @@
<% if Current.family.can_start_trial? %> - <%= render ButtonComponent.new( + <%= render DS::Button.new( text: "Try Maybe for 14 days", href: subscription_path, full_width: true, data: { turbo: false } ) %> <% elsif Current.family.trialing? %> - <%= render LinkComponent.new( + <%= render DS::Link.new( text: "Continue trial", href: root_path, full_width: true, ) %> <% else %> - <%= render LinkComponent.new( + <%= render DS::Link.new( text: "Upgrade", href: upgrade_subscription_path, full_width: true, @@ -57,9 +57,9 @@
- <%= render FilledIconComponent.new(icon: "unlock-keyhole", variant: :inverse) %> - <%= render FilledIconComponent.new(icon: "bell", variant: :inverse) %> - <%= render FilledIconComponent.new(icon: "credit-card", variant: :inverse) %> + <%= render DS::FilledIcon.new(icon: "unlock-keyhole", variant: :inverse) %> + <%= render DS::FilledIcon.new(icon: "bell", variant: :inverse) %> + <%= render DS::FilledIcon.new(icon: "credit-card", variant: :inverse) %>
@@ -86,22 +86,22 @@
- <%= render FilledIconComponent.new(icon: "landmark", variant: :surface) %> + <%= render DS::FilledIcon.new(icon: "landmark", variant: :surface) %>

More than 10,000 institutions to connect to

- <%= render FilledIconComponent.new(icon: "layers", variant: :surface) %> + <%= render DS::FilledIcon.new(icon: "layers", variant: :surface) %>

Connect unlimited accounts and account types

- <%= render FilledIconComponent.new(icon: "line-chart", variant: :surface) %> + <%= render DS::FilledIcon.new(icon: "line-chart", variant: :surface) %>

Performance and investment returns across portfolio

- <%= render FilledIconComponent.new(icon: "credit-card", variant: :surface) %> + <%= render DS::FilledIcon.new(icon: "credit-card", variant: :surface) %>

Comprehensive transaction tracking experience

@@ -111,22 +111,22 @@
- <%= render FilledIconComponent.new(icon: "keyboard", variant: :surface) %> + <%= render DS::FilledIcon.new(icon: "keyboard", variant: :surface) %>

Manual account tracking that works well

- <%= render FilledIconComponent.new(icon: "globe-2", variant: :surface) %> + <%= render DS::FilledIcon.new(icon: "globe-2", variant: :surface) %>

Multiple currencies and near global coverage

- <%= render FilledIconComponent.new(icon: "ship", variant: :surface) %> + <%= render DS::FilledIcon.new(icon: "ship", variant: :surface) %>

Early access to newly released features

- <%= render FilledIconComponent.new(icon: "messages-square", variant: :surface) %> + <%= render DS::FilledIcon.new(icon: "messages-square", variant: :surface) %>

Priority human support from team

diff --git a/app/views/other_assets/edit.html.erb b/app/views/other_assets/edit.html.erb index 271982fc..930ce27a 100644 --- a/app/views/other_assets/edit.html.erb +++ b/app/views/other_assets/edit.html.erb @@ -1,4 +1,4 @@ -<%= render DialogComponent.new do |dialog| %> +<%= render DS::Dialog.new do |dialog| %> <% dialog.with_header(title: t(".edit", account: @account.name)) %> <% dialog.with_body do %> <%= render "form", account: @account, url: other_asset_path(@account) %> diff --git a/app/views/other_assets/new.html.erb b/app/views/other_assets/new.html.erb index 106b2994..75737ada 100644 --- a/app/views/other_assets/new.html.erb +++ b/app/views/other_assets/new.html.erb @@ -1,4 +1,4 @@ -<%= render DialogComponent.new do |dialog| %> +<%= render DS::Dialog.new do |dialog| %> <% dialog.with_header(title: t(".title")) %> <% dialog.with_body do %> <%= render "form", account: @account, url: other_assets_path %> diff --git a/app/views/other_liabilities/edit.html.erb b/app/views/other_liabilities/edit.html.erb index 8cc6c1be..57d8b2b4 100644 --- a/app/views/other_liabilities/edit.html.erb +++ b/app/views/other_liabilities/edit.html.erb @@ -1,4 +1,4 @@ -<%= render DialogComponent.new do |dialog| %> +<%= render DS::Dialog.new do |dialog| %> <% dialog.with_header(title: t(".edit", account: @account.name)) %> <% dialog.with_body do %> <%= render "form", account: @account, url: other_liability_path(@account) %> diff --git a/app/views/other_liabilities/new.html.erb b/app/views/other_liabilities/new.html.erb index f8a1ab46..b32439b2 100644 --- a/app/views/other_liabilities/new.html.erb +++ b/app/views/other_liabilities/new.html.erb @@ -1,4 +1,4 @@ -<%= render DialogComponent.new do |dialog| %> +<%= render DS::Dialog.new do |dialog| %> <% dialog.with_header(title: t(".title")) %> <% dialog.with_body do %> <%= render "form", account: @account, url: other_liabilities_path %> diff --git a/app/views/pages/dashboard.html.erb b/app/views/pages/dashboard.html.erb index 82de3bd1..2444f6cf 100644 --- a/app/views/pages/dashboard.html.erb +++ b/app/views/pages/dashboard.html.erb @@ -5,7 +5,7 @@

Here's what's happening with your finances

- <%= render LinkComponent.new( + <%= render DS::Link.new( icon: "plus", text: "New", href: new_account_path, @@ -13,7 +13,7 @@ class: "hidden lg:inline-flex" ) %> - <%= render LinkComponent.new( + <%= render DS::Link.new( variant: "icon-inverse", icon: "plus", href: new_account_path, diff --git a/app/views/pages/dashboard/_balance_sheet.html.erb b/app/views/pages/dashboard/_balance_sheet.html.erb index 8ad17567..30573324 100644 --- a/app/views/pages/dashboard/_balance_sheet.html.erb +++ b/app/views/pages/dashboard/_balance_sheet.html.erb @@ -112,7 +112,7 @@ <% else %>
- <%= render FilledIconComponent.new( + <%= render DS::FilledIcon.new( variant: :container, icon: classification_group.icon, ) %> diff --git a/app/views/pages/dashboard/_cashflow_sankey.html.erb b/app/views/pages/dashboard/_cashflow_sankey.html.erb index 96a40636..ec03f841 100644 --- a/app/views/pages/dashboard/_cashflow_sankey.html.erb +++ b/app/views/pages/dashboard/_cashflow_sankey.html.erb @@ -25,14 +25,14 @@ <% else %>
- <%= render FilledIconComponent.new( + <%= render DS::FilledIcon.new( variant: :container, icon: "activity" # cashflow placeholder icon ) %>

No cash flow data for this time period

Add transactions to display cash flow data or expand the time period

- <%= render LinkComponent.new( + <%= render DS::Link.new( text: "Add transaction", icon: "plus", href: new_transaction_path, diff --git a/app/views/pages/dashboard/_no_accounts_graph_placeholder.html.erb b/app/views/pages/dashboard/_no_accounts_graph_placeholder.html.erb index 836a5d69..5b0909c1 100644 --- a/app/views/pages/dashboard/_no_accounts_graph_placeholder.html.erb +++ b/app/views/pages/dashboard/_no_accounts_graph_placeholder.html.erb @@ -1,13 +1,13 @@
- <%= render FilledIconComponent.new( + <%= render DS::FilledIcon.new( variant: :container, icon: "layers", ) %>

No accounts yet

Add accounts to display net worth data

- <%= render LinkComponent.new( + <%= render DS::Link.new( text: "Add account", icon: "plus", href: new_account_path, diff --git a/app/views/pages/redis_configuration_error.html.erb b/app/views/pages/redis_configuration_error.html.erb index 303ce4a7..bf165ccb 100644 --- a/app/views/pages/redis_configuration_error.html.erb +++ b/app/views/pages/redis_configuration_error.html.erb @@ -26,7 +26,7 @@
- <%= render LinkComponent.new( + <%= render DS::Link.new( text: "View Setup Guide", href: "https://github.com/maybe-finance/maybe/blob/main/docs/hosting/docker.md", variant: "primary", @@ -44,7 +44,7 @@

Once you've configured Redis, refresh this page to continue.

- <%= render ButtonComponent.new( + <%= render DS::Button.new( text: "Refresh Page", variant: "secondary", icon: "refresh-cw", diff --git a/app/views/plaid_items/_plaid_item.html.erb b/app/views/plaid_items/_plaid_item.html.erb index 6ddb550c..9a7397a7 100644 --- a/app/views/plaid_items/_plaid_item.html.erb +++ b/app/views/plaid_items/_plaid_item.html.erb @@ -48,7 +48,7 @@
<% if plaid_item.requires_update? %> - <%= render LinkComponent.new( + <%= render DS::Link.new( text: t(".update"), icon: "refresh-cw", variant: "secondary", @@ -63,7 +63,7 @@ ) %> <% end %> - <%= render MenuComponent.new do |menu| %> + <%= render DS::Menu.new do |menu| %> <% menu.with_item( variant: "button", text: t(".delete"), diff --git a/app/views/properties/_form_alert.html.erb b/app/views/properties/_form_alert.html.erb index 934fa374..948e0c88 100644 --- a/app/views/properties/_form_alert.html.erb +++ b/app/views/properties/_form_alert.html.erb @@ -1,7 +1,7 @@ <%# locals: (notice: nil, error: nil) %> <% if notice.present? %> - <%= render AlertComponent.new(message: notice, variant: :success) %> + <%= render DS::Alert.new(message: notice, variant: :success) %> <% elsif error.present? %> - <%= render AlertComponent.new(message: error, variant: :error) %> + <%= render DS::Alert.new(message: error, variant: :error) %> <% end %> diff --git a/app/views/properties/address.html.erb b/app/views/properties/address.html.erb index 765fc48a..834f7c95 100644 --- a/app/views/properties/address.html.erb +++ b/app/views/properties/address.html.erb @@ -1,4 +1,4 @@ -<%= render DialogComponent.new do |dialog| %> +<%= render DS::Dialog.new do |dialog| %> <% dialog.with_header(title: "Enter property manually") %> <% dialog.with_body do %>
@@ -38,7 +38,7 @@
- <%= render ButtonComponent.new( + <%= render DS::Button.new( text: "Save", variant: "primary", ) %> diff --git a/app/views/properties/balances.html.erb b/app/views/properties/balances.html.erb index c9141771..a25f7793 100644 --- a/app/views/properties/balances.html.erb +++ b/app/views/properties/balances.html.erb @@ -1,4 +1,4 @@ -<%= render DialogComponent.new do |dialog| %> +<%= render DS::Dialog.new do |dialog| %> <% dialog.with_header(title: "Enter property manually") %> <% dialog.with_body do %>
@@ -18,7 +18,7 @@
- <%= render ButtonComponent.new( + <%= render DS::Button.new( text: @account.active? ? "Save" : "Next", variant: "primary", ) %> diff --git a/app/views/properties/edit.html.erb b/app/views/properties/edit.html.erb index fd75d929..51d674f9 100644 --- a/app/views/properties/edit.html.erb +++ b/app/views/properties/edit.html.erb @@ -1,4 +1,4 @@ -<%= render DialogComponent.new do |dialog| %> +<%= render DS::Dialog.new do |dialog| %> <% dialog.with_header(title: "Enter property manually") %> <% dialog.with_body do %>
@@ -15,7 +15,7 @@
- <%= render ButtonComponent.new( + <%= render DS::Button.new( text: @account.active? ? "Save" : "Next", variant: "primary", ) %> diff --git a/app/views/properties/new.html.erb b/app/views/properties/new.html.erb index 73dae294..03feb04a 100644 --- a/app/views/properties/new.html.erb +++ b/app/views/properties/new.html.erb @@ -1,4 +1,4 @@ -<%= render DialogComponent.new do |dialog| %> +<%= render DS::Dialog.new do |dialog| %> <% dialog.with_header(title: "Enter property manually") %> <% dialog.with_body do %>
@@ -15,7 +15,7 @@
- <%= render ButtonComponent.new( + <%= render DS::Button.new( text: "Next", variant: "primary", ) %> diff --git a/app/views/properties/tabs/_overview.html.erb b/app/views/properties/tabs/_overview.html.erb index 3916fb05..3a33e092 100644 --- a/app/views/properties/tabs/_overview.html.erb +++ b/app/views/properties/tabs/_overview.html.erb @@ -29,7 +29,7 @@
- <%= render LinkComponent.new( + <%= render DS::Link.new( text: "Edit account details", href: edit_property_path(account), variant: "ghost", diff --git a/app/views/rule/conditions/_condition_group.html.erb b/app/views/rule/conditions/_condition_group.html.erb index 77383833..54f056ba 100644 --- a/app/views/rule/conditions/_condition_group.html.erb +++ b/app/views/rule/conditions/_condition_group.html.erb @@ -39,7 +39,7 @@ <% end %> - <%= render ButtonComponent.new( + <%= render DS::Button.new( text: "Add condition", leading_icon: "plus", variant: "ghost", diff --git a/app/views/rules/_category_rule_cta.html.erb b/app/views/rules/_category_rule_cta.html.erb index 66996044..fb601b2d 100644 --- a/app/views/rules/_category_rule_cta.html.erb +++ b/app/views/rules/_category_rule_cta.html.erb @@ -13,9 +13,9 @@ <%= f.hidden_field :rule_prompt_dismissed_at, value: Time.current %> <%= tag.div class:"flex gap-2 justify-end" do %> - <%= render ButtonComponent.new(text: "Dismiss", variant: "secondary") %> + <%= render DS::Button.new(text: "Dismiss", variant: "secondary") %> <% rule_href = new_rule_path(resource_type: "transaction", action_type: "set_transaction_category", action_value: cta[:category_id]) %> - <%= render LinkComponent.new(text: "Create rule", variant: "primary", href: rule_href, frame: :modal) %> + <%= render DS::Link.new(text: "Create rule", variant: "primary", href: rule_href, frame: :modal) %> <% end %> <% end %> <% end %> diff --git a/app/views/rules/_form.html.erb b/app/views/rules/_form.html.erb index 387423f2..d15ad471 100644 --- a/app/views/rules/_form.html.erb +++ b/app/views/rules/_form.html.erb @@ -50,8 +50,8 @@
- <%= render ButtonComponent.new(text: "Add condition", icon: "plus", variant: "ghost", type: "button", data: { action: "rules#addCondition" }) %> - <%= render ButtonComponent.new(text: "Add condition group", icon: "copy-plus", variant: "ghost", type: "button", data: { action: "rules#addConditionGroup" }) %> + <%= render DS::Button.new(text: "Add condition", icon: "plus", variant: "ghost", type: "button", data: { action: "rules#addCondition" }) %> + <%= render DS::Button.new(text: "Add condition group", icon: "copy-plus", variant: "ghost", type: "button", data: { action: "rules#addConditionGroup" }) %>
@@ -74,7 +74,7 @@ <% end %> - <%= render ButtonComponent.new(text: "Add action", icon: "plus", variant: "ghost", type: "button", data: { action: "rules#addAction" }) %> + <%= render DS::Button.new(text: "Add action", icon: "plus", variant: "ghost", type: "button", data: { action: "rules#addAction" }) %>
diff --git a/app/views/rules/_rule.html.erb b/app/views/rules/_rule.html.erb index 3157a904..e562cb95 100644 --- a/app/views/rules/_rule.html.erb +++ b/app/views/rules/_rule.html.erb @@ -60,7 +60,7 @@ <%= styled_form_with model: rule, data: { controller: "auto-submit-form" } do |f| %> <%= f.toggle :active, { data: { auto_submit_form_target: "auto" } } %> <% end %> - <%= render MenuComponent.new do |menu| %> + <%= render DS::Menu.new do |menu| %> <% menu.with_item(variant: "link", text: "Edit", href: edit_rule_path(rule), icon: "pencil", data: { turbo_frame: "modal" }) %> <% menu.with_item(variant: "link", text: "Re-apply rule", href: confirm_rule_path(rule), icon: "refresh-cw", data: { turbo_frame: "modal" }) %> <% menu.with_item( diff --git a/app/views/rules/confirm.html.erb b/app/views/rules/confirm.html.erb index 03311791..5307eaaf 100644 --- a/app/views/rules/confirm.html.erb +++ b/app/views/rules/confirm.html.erb @@ -1,4 +1,4 @@ -<%= render DialogComponent.new(reload_on_close: true) do |dialog| %> +<%= render DS::Dialog.new(reload_on_close: true) do |dialog| %> <% title = if @rule.name.present? "Confirm changes to \"#{@rule.name}\"" @@ -15,7 +15,7 @@ that meet the specified rule criteria. Please confirm if you wish to proceed with this change.

- <%= render ButtonComponent.new( + <%= render DS::Button.new( text: "Confirm changes", href: apply_rule_path(@rule), method: :post, diff --git a/app/views/rules/edit.html.erb b/app/views/rules/edit.html.erb index 91dea816..b3c4bffa 100644 --- a/app/views/rules/edit.html.erb +++ b/app/views/rules/edit.html.erb @@ -1,6 +1,6 @@ <%= link_to "Back to rules", rules_path %> -<%= render DialogComponent.new do |dialog| %> +<%= render DS::Dialog.new do |dialog| %> <% title = if @rule.name.present? "Edit #{@rule.resource_type} rule \"#{@rule.name}\"" diff --git a/app/views/rules/index.html.erb b/app/views/rules/index.html.erb index dc6e97aa..49062f69 100644 --- a/app/views/rules/index.html.erb +++ b/app/views/rules/index.html.erb @@ -2,7 +2,7 @@

Rules

<% if @rules.any? %> - <%= render MenuComponent.new do |menu| %> + <%= render DS::Menu.new do |menu| %> <% menu.with_item( variant: "button", text: "Delete all rules", @@ -12,7 +12,7 @@ confirm: CustomConfirm.for_resource_deletion("all rules", high_severity: true)) %> <% end %> <% end %> - <%= render LinkComponent.new( + <%= render DS::Link.new( text: "New rule", variant: "primary", href: new_rule_path(resource_type: "transaction"), @@ -48,7 +48,7 @@ data: { auto_submit_form_target: "auto", autosubmit_trigger_event: "change" } %> <%= form.hidden_field :direction, value: @direction %> <% end %> - <%= render LinkComponent.new( + <%= render DS::Link.new( href: rules_path(direction: @direction == "asc" ? "desc" : "asc", sort_by: @sort_by), variant: "icon", icon: "arrow-up-down", @@ -69,7 +69,7 @@

No rules yet

Set up rules to perform actions to your transactions and other data on every account sync.

- <%= render LinkComponent.new( + <%= render DS::Link.new( text: "New rule", variant: "primary", href: new_rule_path(resource_type: "transaction"), diff --git a/app/views/rules/new.html.erb b/app/views/rules/new.html.erb index a39a299b..859a9b27 100644 --- a/app/views/rules/new.html.erb +++ b/app/views/rules/new.html.erb @@ -1,6 +1,6 @@ <%= link_to "Back to rules", rules_path %> -<%= render DialogComponent.new do |dialog| %> +<%= render DS::Dialog.new do |dialog| %> <% dialog.with_header(title: "New #{@rule.resource_type} rule") %> <% dialog.with_body do %> <%= render "rules/form", rule: @rule %> diff --git a/app/views/settings/_settings_nav.html.erb b/app/views/settings/_settings_nav.html.erb index 931b2df1..bd488774 100644 --- a/app/views/settings/_settings_nav.html.erb +++ b/app/views/settings/_settings_nav.html.erb @@ -34,7 +34,7 @@ nav_sections = [
- <%= render DisclosureComponent.new(title: t(".details")) do %> + <%= render DS::Disclosure.new(title: t(".details")) do %> <%= f.fields_for :entryable do |ef| %> <%= ef.select :tag_ids, Current.family.tags.alphabetically.pluck(:name, :id), diff --git a/app/views/transactions/_transaction.html.erb b/app/views/transactions/_transaction.html.erb index b603e305..e52c8da2 100644 --- a/app/views/transactions/_transaction.html.erb +++ b/app/views/transactions/_transaction.html.erb @@ -23,7 +23,7 @@ class: "w-6 h-6 rounded-full", loading: "lazy" %> <% else %> - <%= render FilledIconComponent.new( + <%= render DS::FilledIcon.new( variant: :text, text: entry.name, size: "sm", diff --git a/app/views/transactions/bulk_updates/new.html.erb b/app/views/transactions/bulk_updates/new.html.erb index 79cbdd38..08c112ab 100644 --- a/app/views/transactions/bulk_updates/new.html.erb +++ b/app/views/transactions/bulk_updates/new.html.erb @@ -1,16 +1,16 @@ -<%= render DialogComponent.new(variant: "drawer", frame: "bulk_transaction_edit_drawer") do |dialog| %> +<%= render DS::Dialog.new(variant: "drawer", frame: "bulk_transaction_edit_drawer") do |dialog| %> <% dialog.with_header(title: "Edit transactions", data: { bulk_select_target: "bulkEditDrawerHeader" }) %> <% dialog.with_body do %> <%= 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 DisclosureComponent.new(title: "Overview", open: true) do %> + <%= render DS::Disclosure.new(title: "Overview", open: true) do %>
<%= form.date_field :date, label: "Date", max: Date.current %>
<% end %> - <%= render DisclosureComponent.new(title: "Transactions", open: true) do %> + <%= render DS::Disclosure.new(title: "Transactions", open: true) do %>
<%= form.collection_select :category_id, Current.family.categories.alphabetically, :id, :name, { prompt: "Select a category", label: "Category", class: "text-subdued" } %> <%= form.collection_select :merchant_id, Current.family.merchants.alphabetically, :id, :name, { prompt: "Select a merchant", label: "Merchant", class: "text-subdued" } %> @@ -21,8 +21,8 @@
- <%= render ButtonComponent.new(text: "Cancel", variant: "ghost", data: { action: "click->dialog#close" }) %> - <%= render ButtonComponent.new(text: "Save", data: { bulk_select_scope_param: "bulk_update", action: "bulk-select#submitBulkRequest" }) %> + <%= render DS::Button.new(text: "Cancel", variant: "ghost", data: { action: "click->dialog#close" }) %> + <%= render DS::Button.new(text: "Save", data: { bulk_select_scope_param: "bulk_update", action: "bulk-select#submitBulkRequest" }) %>
<% end %> <% end %> diff --git a/app/views/transactions/index.html.erb b/app/views/transactions/index.html.erb index 4e9bcf82..8fa5860c 100644 --- a/app/views/transactions/index.html.erb +++ b/app/views/transactions/index.html.erb @@ -3,7 +3,7 @@

Transactions

- <%= render MenuComponent.new do |menu| %> + <%= render DS::Menu.new do |menu| %> <% menu.with_item(variant: "link", text: "New rule", href: new_rule_path(resource_type: "transaction"), icon: "plus", data: { turbo_frame: :modal }) %> <% menu.with_item(variant: "link", text: "Edit rules", href: rules_path, icon: "git-branch", data: { turbo_frame: :_top }) %> <% menu.with_item(variant: "link", text: "Edit categories", href: categories_path, icon: "shapes", data: { turbo_frame: :_top }) %> @@ -14,7 +14,7 @@ <% end %> - <%= render LinkComponent.new( + <%= render DS::Link.new( text: "New transaction", icon: "plus", variant: "primary", @@ -32,7 +32,7 @@ class: "hidden md:inline-flex" ) %> - <%= render LinkComponent.new( + <%= render DS::Link.new( icon: "plus", variant: "icon-inverse", href: new_transaction_path, diff --git a/app/views/transactions/new.html.erb b/app/views/transactions/new.html.erb index c9183822..ea9d2730 100644 --- a/app/views/transactions/new.html.erb +++ b/app/views/transactions/new.html.erb @@ -1,4 +1,4 @@ -<%= render DialogComponent.new do |dialog| %> +<%= render DS::Dialog.new do |dialog| %> <% dialog.with_header(title: "New transaction") %> <% dialog.with_body do %> <%= render "form", entry: @entry, income_categories: @income_categories, expense_categories: @expense_categories %> diff --git a/app/views/transactions/searches/_form.html.erb b/app/views/transactions/searches/_form.html.erb index eba44cb5..1826c123 100644 --- a/app/views/transactions/searches/_form.html.erb +++ b/app/views/transactions/searches/_form.html.erb @@ -17,7 +17,7 @@
- <%= render MenuComponent.new(variant: "button", no_padding: true) do |menu| %> + <%= render DS::Menu.new(variant: "button", no_padding: true) do |menu| %> <% menu.with_button( id: "transaction-filters-button", type: "button", diff --git a/app/views/transactions/searches/_menu.html.erb b/app/views/transactions/searches/_menu.html.erb index 3d11a37a..00ea5a46 100644 --- a/app/views/transactions/searches/_menu.html.erb +++ b/app/views/transactions/searches/_menu.html.erb @@ -1,6 +1,6 @@ <%# locals: (form:) %> -<%= render TabsComponent.new( +<%= render DS::Tabs.new( variant: :unstyled, active_tab: get_default_transaction_search_filter[:key], active_btn_classes: "bg-surface text-primary", @@ -28,7 +28,7 @@
<% if @q.present? %> - <%= render LinkComponent.new( + <%= render DS::Link.new( text: t(".clear_filters"), variant: "ghost", href: transactions_path(clear_filters: true), @@ -37,8 +37,8 @@
- <%= render ButtonComponent.new(text: t(".cancel"), type: "button", variant: "ghost", data: { action: "menu#close" }) %> - <%= render ButtonComponent.new(text: t(".apply")) %> + <%= render DS::Button.new(text: t(".cancel"), type: "button", variant: "ghost", data: { action: "menu#close" }) %> + <%= render DS::Button.new(text: t(".apply")) %>
diff --git a/app/views/transactions/searches/filters/_merchant_filter.html.erb b/app/views/transactions/searches/filters/_merchant_filter.html.erb index 3166374c..c7df8c0b 100644 --- a/app/views/transactions/searches/filters/_merchant_filter.html.erb +++ b/app/views/transactions/searches/filters/_merchant_filter.html.erb @@ -16,7 +16,7 @@ merchant.name, nil %> <%= form.label :merchants, value: merchant.name, class: "text-sm text-primary flex items-center gap-2" do %> - <%= render FilledIconComponent.new( + <%= render DS::FilledIcon.new( variant: :text, hex_color: merchant.color, text: merchant.name, diff --git a/app/views/transactions/searches/filters/_tag_filter.html.erb b/app/views/transactions/searches/filters/_tag_filter.html.erb index 8cf20adc..76b19811 100644 --- a/app/views/transactions/searches/filters/_tag_filter.html.erb +++ b/app/views/transactions/searches/filters/_tag_filter.html.erb @@ -16,7 +16,7 @@ tag.name, nil %> <%= form.label :tags, value: tag.name, class: "text-sm text-primary flex items-center gap-2" do %> - <%= render FilledIconComponent.new( + <%= render DS::FilledIcon.new( variant: :text, hex_color: tag.color || Tag::UNCATEGORIZED_COLOR, text: tag.name, diff --git a/app/views/transactions/show.html.erb b/app/views/transactions/show.html.erb index bb504536..4111cd43 100644 --- a/app/views/transactions/show.html.erb +++ b/app/views/transactions/show.html.erb @@ -1,4 +1,4 @@ -<%= render DialogComponent.new(variant: "drawer") do |dialog| %> +<%= render DS::Dialog.new(variant: "drawer") do |dialog| %> <% dialog.with_header do %> <%= render "transactions/header", entry: @entry %> <% end %> @@ -141,7 +141,7 @@

Transfers and payments are special types of transactions that indicate money movement between 2 accounts.

- <%= render LinkComponent.new( + <%= render DS::Link.new( text: "Open matcher", icon: "arrow-left-right", variant: "outline", @@ -157,7 +157,7 @@

<%= t(".delete_subtitle") %>

- <%= render ButtonComponent.new( + <%= render DS::Button.new( text: t(".delete"), variant: "outline-destructive", href: entry_path(@entry), diff --git a/app/views/transfer_matches/new.html.erb b/app/views/transfer_matches/new.html.erb index e4709e30..8a84b982 100644 --- a/app/views/transfer_matches/new.html.erb +++ b/app/views/transfer_matches/new.html.erb @@ -1,4 +1,4 @@ -<%= render DialogComponent.new do |dialog| %> +<%= render DS::Dialog.new do |dialog| %> <% dialog.with_header(title: "Match transfer or payment") %> <% dialog.with_body do %> <%= styled_form_with( diff --git a/app/views/transfers/new.html.erb b/app/views/transfers/new.html.erb index 5456f1b3..db8b7d76 100644 --- a/app/views/transfers/new.html.erb +++ b/app/views/transfers/new.html.erb @@ -1,4 +1,4 @@ -<%= render DialogComponent.new do |dialog| %> +<%= render DS::Dialog.new do |dialog| %> <% dialog.with_header(title: t(".title")) %> <% dialog.with_body do %> <%= render "form", transfer: @transfer %> diff --git a/app/views/transfers/show.html.erb b/app/views/transfers/show.html.erb index dc587a4e..83e766b7 100644 --- a/app/views/transfers/show.html.erb +++ b/app/views/transfers/show.html.erb @@ -1,4 +1,4 @@ -<%= render DialogComponent.new(variant: "drawer") do |dialog| %> +<%= render DS::Dialog.new(variant: "drawer") do |dialog| %> <% dialog.with_header do %>
diff --git a/app/views/users/_user_menu.html.erb b/app/views/users/_user_menu.html.erb index 69d64d81..fcc2d688 100644 --- a/app/views/users/_user_menu.html.erb +++ b/app/views/users/_user_menu.html.erb @@ -1,7 +1,7 @@ <%# locals: (user:, placement: "right-start", offset: 16) %>
- <%= render MenuComponent.new(variant: "avatar", avatar_url: user.profile_image&.variant(:small)&.url, initials: user.initials, placement: placement, offset: offset) do |menu| %> + <%= render DS::Menu.new(variant: "avatar", avatar_url: user.profile_image&.variant(:small)&.url, initials: user.initials, placement: placement, offset: offset) do |menu| %> <%= menu.with_header do %>
diff --git a/app/views/valuations/_valuation.html.erb b/app/views/valuations/_valuation.html.erb index 176f21be..eeef903c 100644 --- a/app/views/valuations/_valuation.html.erb +++ b/app/views/valuations/_valuation.html.erb @@ -14,7 +14,7 @@ data: { id: entry.id, "bulk-select-target": "row", action: "bulk-select#toggleRowSelection" } %>
- <%= render FilledIconComponent.new(icon: icon, size: "sm", hex_color: color, rounded: true) %> + <%= render DS::FilledIcon.new(icon: icon, size: "sm", hex_color: color, rounded: true) %>
<%= link_to entry.name, diff --git a/app/views/valuations/confirm_create.html.erb b/app/views/valuations/confirm_create.html.erb index 3e3a4a90..906c957d 100644 --- a/app/views/valuations/confirm_create.html.erb +++ b/app/views/valuations/confirm_create.html.erb @@ -1,4 +1,4 @@ -<%= render DialogComponent.new do |dialog| %> +<%= render DS::Dialog.new do |dialog| %> <% dialog.with_header(title: "Confirm new balance") %> <% dialog.with_body do %> <%= styled_form_with model: @entry, url: valuations_path, class: "space-y-4" do |form| %> diff --git a/app/views/valuations/confirm_update.html.erb b/app/views/valuations/confirm_update.html.erb index c24e27cf..720f7bd5 100644 --- a/app/views/valuations/confirm_update.html.erb +++ b/app/views/valuations/confirm_update.html.erb @@ -1,4 +1,4 @@ -<%= render DialogComponent.new do |dialog| %> +<%= render DS::Dialog.new do |dialog| %> <% dialog.with_header(title: "Update balance") %> <% dialog.with_body do %> <%= styled_form_with model: @entry, url: valuation_path(@entry), method: :patch, class: "space-y-4", data: { turbo_frame: :_top } do |form| %> diff --git a/app/views/valuations/new.html.erb b/app/views/valuations/new.html.erb index bfa8d5e2..cf805d67 100644 --- a/app/views/valuations/new.html.erb +++ b/app/views/valuations/new.html.erb @@ -1,11 +1,11 @@ -<%= render DialogComponent.new do |dialog| %> +<%= render DS::Dialog.new do |dialog| %> <% dialog.with_header(title: t(".title")) %> <% dialog.with_body do %> <%= styled_form_with model: @entry, url: confirm_create_valuations_path, class: "space-y-4" do |form| %> <%= form.hidden_field :account_id %> <% if @error_message.present? %> - <%= render AlertComponent.new(message: @error_message, variant: :error) %> + <%= render DS::Alert.new(message: @error_message, variant: :error) %> <% end %>
diff --git a/app/views/valuations/show.html.erb b/app/views/valuations/show.html.erb index 3cd44f9f..f58be03e 100644 --- a/app/views/valuations/show.html.erb +++ b/app/views/valuations/show.html.erb @@ -1,6 +1,6 @@ <% entry, account = @entry, @entry.account %> -<%= render DialogComponent.new(variant: "drawer") do |dialog| %> +<%= render DS::Dialog.new(variant: "drawer") do |dialog| %> <% dialog.with_header do %> <%= render "valuations/header", entry: @entry %> <% end %> @@ -8,7 +8,7 @@ <% dialog.with_body do %> <% if @error_message.present? %>
- <%= render AlertComponent.new(message: @error_message, variant: :error) %> + <%= render DS::Alert.new(message: @error_message, variant: :error) %>
<% end %> @@ -28,7 +28,7 @@ disable_currency: true %>
- <%= render ButtonComponent.new( + <%= render DS::Button.new( text: "Update value", variant: :primary, type: "submit" diff --git a/app/views/vehicles/edit.html.erb b/app/views/vehicles/edit.html.erb index 00424799..87308377 100644 --- a/app/views/vehicles/edit.html.erb +++ b/app/views/vehicles/edit.html.erb @@ -1,4 +1,4 @@ -<%= render DialogComponent.new do |dialog| %> +<%= render DS::Dialog.new do |dialog| %> <% dialog.with_header(title: t(".edit", account: @account.name)) %> <% dialog.with_body do %> <%= render "form", account: @account, url: vehicle_path(@account) %> diff --git a/app/views/vehicles/new.html.erb b/app/views/vehicles/new.html.erb index 56422ce8..2f09bcf4 100644 --- a/app/views/vehicles/new.html.erb +++ b/app/views/vehicles/new.html.erb @@ -1,4 +1,4 @@ -<%= render DialogComponent.new do |dialog| %> +<%= render DS::Dialog.new do |dialog| %> <% dialog.with_header(title: t(".title")) %> <% dialog.with_body do %> <%= render "vehicles/form", account: @account, url: vehicles_path(return_to: params[:return_to]) %> diff --git a/app/views/vehicles/tabs/_overview.html.erb b/app/views/vehicles/tabs/_overview.html.erb index e8592533..b71793bb 100644 --- a/app/views/vehicles/tabs/_overview.html.erb +++ b/app/views/vehicles/tabs/_overview.html.erb @@ -33,7 +33,7 @@
- <%= render LinkComponent.new( + <%= render DS::Link.new( text: "Edit account details", variant: "ghost", href: edit_vehicle_path(account), diff --git a/db/schema.rb b/db/schema.rb index 56d7ba09..afab5688 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -17,7 +17,7 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do # Custom types defined in this database. # Note that some types may not work with other database engines. Be careful if changing database. - create_enum "account_status", ["ok", "syncing", "error"] + create_enum "account_status", [ "ok", "syncing", "error" ] create_table "accounts", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.string "subtype" @@ -35,13 +35,13 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.decimal "cash_balance", precision: 19, scale: 4, default: "0.0" t.jsonb "locked_attributes", default: {} t.string "status", default: "active" - t.index ["accountable_id", "accountable_type"], name: "index_accounts_on_accountable_id_and_accountable_type" - t.index ["accountable_type"], name: "index_accounts_on_accountable_type" - t.index ["family_id", "accountable_type"], name: "index_accounts_on_family_id_and_accountable_type" - t.index ["family_id", "id"], name: "index_accounts_on_family_id_and_id" - t.index ["family_id"], name: "index_accounts_on_family_id" - t.index ["import_id"], name: "index_accounts_on_import_id" - t.index ["plaid_account_id"], name: "index_accounts_on_plaid_account_id" + t.index [ "accountable_id", "accountable_type" ], name: "index_accounts_on_accountable_id_and_accountable_type" + t.index [ "accountable_type" ], name: "index_accounts_on_accountable_type" + t.index [ "family_id", "accountable_type" ], name: "index_accounts_on_family_id_and_accountable_type" + t.index [ "family_id", "id" ], name: "index_accounts_on_family_id_and_id" + t.index [ "family_id" ], name: "index_accounts_on_family_id" + t.index [ "import_id" ], name: "index_accounts_on_import_id" + t.index [ "plaid_account_id" ], name: "index_accounts_on_plaid_account_id" end create_table "active_storage_attachments", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -50,8 +50,8 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.uuid "record_id", null: false t.uuid "blob_id", null: false t.datetime "created_at", null: false - t.index ["blob_id"], name: "index_active_storage_attachments_on_blob_id" - t.index ["record_type", "record_id", "name", "blob_id"], name: "index_active_storage_attachments_uniqueness", unique: true + t.index [ "blob_id" ], name: "index_active_storage_attachments_on_blob_id" + t.index [ "record_type", "record_id", "name", "blob_id" ], name: "index_active_storage_attachments_uniqueness", unique: true end create_table "active_storage_blobs", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -63,13 +63,13 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.bigint "byte_size", null: false t.string "checksum" t.datetime "created_at", null: false - t.index ["key"], name: "index_active_storage_blobs_on_key", unique: true + t.index [ "key" ], name: "index_active_storage_blobs_on_key", unique: true end create_table "active_storage_variant_records", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.uuid "blob_id", null: false t.string "variation_digest", null: false - t.index ["blob_id", "variation_digest"], name: "index_active_storage_variant_records_uniqueness", unique: true + t.index [ "blob_id", "variation_digest" ], name: "index_active_storage_variant_records_uniqueness", unique: true end create_table "addresses", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -84,7 +84,7 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.integer "postal_code" t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.index ["addressable_type", "addressable_id"], name: "index_addresses_on_addressable" + t.index [ "addressable_type", "addressable_id" ], name: "index_addresses_on_addressable" end create_table "api_keys", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -98,10 +98,10 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.datetime "updated_at", null: false t.string "display_key", null: false t.string "source", default: "web" - t.index ["display_key"], name: "index_api_keys_on_display_key", unique: true - t.index ["revoked_at"], name: "index_api_keys_on_revoked_at" - t.index ["user_id", "source"], name: "index_api_keys_on_user_id_and_source" - t.index ["user_id"], name: "index_api_keys_on_user_id" + t.index [ "display_key" ], name: "index_api_keys_on_display_key", unique: true + t.index [ "revoked_at" ], name: "index_api_keys_on_revoked_at" + t.index [ "user_id", "source" ], name: "index_api_keys_on_user_id_and_source" + t.index [ "user_id" ], name: "index_api_keys_on_user_id" end create_table "balances", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -112,8 +112,8 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.datetime "created_at", null: false t.datetime "updated_at", null: false t.decimal "cash_balance", precision: 19, scale: 4, default: "0.0" - t.index ["account_id", "date", "currency"], name: "index_account_balances_on_account_id_date_currency_unique", unique: true - t.index ["account_id"], name: "index_balances_on_account_id" + t.index [ "account_id", "date", "currency" ], name: "index_account_balances_on_account_id_date_currency_unique", unique: true + t.index [ "account_id" ], name: "index_balances_on_account_id" end create_table "budget_categories", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -123,9 +123,9 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.string "currency", null: false t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.index ["budget_id", "category_id"], name: "index_budget_categories_on_budget_id_and_category_id", unique: true - t.index ["budget_id"], name: "index_budget_categories_on_budget_id" - t.index ["category_id"], name: "index_budget_categories_on_category_id" + t.index [ "budget_id", "category_id" ], name: "index_budget_categories_on_budget_id_and_category_id", unique: true + t.index [ "budget_id" ], name: "index_budget_categories_on_budget_id" + t.index [ "category_id" ], name: "index_budget_categories_on_category_id" end create_table "budgets", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -137,8 +137,8 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.string "currency", null: false t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.index ["family_id", "start_date", "end_date"], name: "index_budgets_on_family_id_and_start_date_and_end_date", unique: true - t.index ["family_id"], name: "index_budgets_on_family_id" + t.index [ "family_id", "start_date", "end_date" ], name: "index_budgets_on_family_id_and_start_date_and_end_date", unique: true + t.index [ "family_id" ], name: "index_budgets_on_family_id" end create_table "categories", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -150,7 +150,7 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.uuid "parent_id" t.string "classification", default: "expense", null: false t.string "lucide_icon", default: "shapes", null: false - t.index ["family_id"], name: "index_categories_on_family_id" + t.index [ "family_id" ], name: "index_categories_on_family_id" end create_table "chats", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -161,7 +161,7 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.string "latest_assistant_response_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.index ["user_id"], name: "index_chats_on_user_id" + t.index [ "user_id" ], name: "index_chats_on_user_id" end create_table "credit_cards", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -190,8 +190,8 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.jsonb "metadata" t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.index ["enrichable_id", "enrichable_type", "source", "attribute_name"], name: "idx_on_enrichable_id_enrichable_type_source_attribu_5be5f63e08", unique: true - t.index ["enrichable_type", "enrichable_id"], name: "index_data_enrichments_on_enrichable" + t.index [ "enrichable_id", "enrichable_type", "source", "attribute_name" ], name: "idx_on_enrichable_id_enrichable_type_source_attribu_5be5f63e08", unique: true + t.index [ "enrichable_type", "enrichable_id" ], name: "index_data_enrichments_on_enrichable" end create_table "depositories", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -215,8 +215,8 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.boolean "excluded", default: false t.string "plaid_id" t.jsonb "locked_attributes", default: {} - t.index ["account_id"], name: "index_entries_on_account_id" - t.index ["import_id"], name: "index_entries_on_import_id" + t.index [ "account_id" ], name: "index_entries_on_account_id" + t.index [ "import_id" ], name: "index_entries_on_import_id" end create_table "exchange_rates", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -226,9 +226,9 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.date "date", null: false t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.index ["from_currency", "to_currency", "date"], name: "index_exchange_rates_on_base_converted_date_unique", unique: true - t.index ["from_currency"], name: "index_exchange_rates_on_from_currency" - t.index ["to_currency"], name: "index_exchange_rates_on_to_currency" + t.index [ "from_currency", "to_currency", "date" ], name: "index_exchange_rates_on_base_converted_date_unique", unique: true + t.index [ "from_currency" ], name: "index_exchange_rates_on_from_currency" + t.index [ "to_currency" ], name: "index_exchange_rates_on_to_currency" end create_table "families", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -258,9 +258,9 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.string "currency", null: false t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.index ["account_id", "security_id", "date", "currency"], name: "idx_on_account_id_security_id_date_currency_5323e39f8b", unique: true - t.index ["account_id"], name: "index_holdings_on_account_id" - t.index ["security_id"], name: "index_holdings_on_security_id" + t.index [ "account_id", "security_id", "date", "currency" ], name: "idx_on_account_id_security_id_date_currency_5323e39f8b", unique: true + t.index [ "account_id" ], name: "index_holdings_on_account_id" + t.index [ "security_id" ], name: "index_holdings_on_security_id" end create_table "impersonation_session_logs", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -273,7 +273,7 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.text "user_agent" t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.index ["impersonation_session_id"], name: "index_impersonation_session_logs_on_impersonation_session_id" + t.index [ "impersonation_session_id" ], name: "index_impersonation_session_logs_on_impersonation_session_id" end create_table "impersonation_sessions", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -282,8 +282,8 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.string "status", default: "pending", null: false t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.index ["impersonated_id"], name: "index_impersonation_sessions_on_impersonated_id" - t.index ["impersonator_id"], name: "index_impersonation_sessions_on_impersonator_id" + t.index [ "impersonated_id" ], name: "index_impersonation_sessions_on_impersonated_id" + t.index [ "impersonator_id" ], name: "index_impersonation_sessions_on_impersonator_id" end create_table "import_mappings", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -296,8 +296,8 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.uuid "mappable_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.index ["import_id"], name: "index_import_mappings_on_import_id" - t.index ["mappable_type", "mappable_id"], name: "index_import_mappings_on_mappable" + t.index [ "import_id" ], name: "index_import_mappings_on_import_id" + t.index [ "mappable_type", "mappable_id" ], name: "index_import_mappings_on_mappable" end create_table "import_rows", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -317,7 +317,7 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.datetime "created_at", null: false t.datetime "updated_at", null: false t.string "exchange_operating_mic" - t.index ["import_id"], name: "index_import_rows_on_import_id" + t.index [ "import_id" ], name: "index_import_rows_on_import_id" end create_table "imports", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -350,7 +350,7 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.string "exchange_operating_mic_col_label" t.string "amount_type_strategy", default: "signed_amount" t.string "amount_type_inflow_value" - t.index ["family_id"], name: "index_imports_on_family_id" + t.index [ "family_id" ], name: "index_imports_on_family_id" end create_table "investments", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -369,18 +369,18 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.datetime "expires_at" t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.index ["email", "family_id"], name: "index_invitations_on_email_and_family_id", unique: true - t.index ["email"], name: "index_invitations_on_email" - t.index ["family_id"], name: "index_invitations_on_family_id" - t.index ["inviter_id"], name: "index_invitations_on_inviter_id" - t.index ["token"], name: "index_invitations_on_token", unique: true + t.index [ "email", "family_id" ], name: "index_invitations_on_email_and_family_id", unique: true + t.index [ "email" ], name: "index_invitations_on_email" + t.index [ "family_id" ], name: "index_invitations_on_family_id" + t.index [ "inviter_id" ], name: "index_invitations_on_inviter_id" + t.index [ "token" ], name: "index_invitations_on_token", unique: true end create_table "invite_codes", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.string "token", null: false t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.index ["token"], name: "index_invite_codes_on_token", unique: true + t.index [ "token" ], name: "index_invite_codes_on_token", unique: true end create_table "loans", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -404,10 +404,10 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.string "type", null: false t.string "source" t.string "provider_merchant_id" - t.index ["family_id", "name"], name: "index_merchants_on_family_id_and_name", unique: true, where: "((type)::text = 'FamilyMerchant'::text)" - t.index ["family_id"], name: "index_merchants_on_family_id" - t.index ["source", "name"], name: "index_merchants_on_source_and_name", unique: true, where: "((type)::text = 'ProviderMerchant'::text)" - t.index ["type"], name: "index_merchants_on_type" + t.index [ "family_id", "name" ], name: "index_merchants_on_family_id_and_name", unique: true, where: "((type)::text = 'FamilyMerchant'::text)" + t.index [ "family_id" ], name: "index_merchants_on_family_id" + t.index [ "source", "name" ], name: "index_merchants_on_source_and_name", unique: true, where: "((type)::text = 'ProviderMerchant'::text)" + t.index [ "type" ], name: "index_merchants_on_type" end create_table "messages", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -421,7 +421,7 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.boolean "debug", default: false t.string "provider_id" t.boolean "reasoning", default: false - t.index ["chat_id"], name: "index_messages_on_chat_id" + t.index [ "chat_id" ], name: "index_messages_on_chat_id" end create_table "mobile_devices", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -435,9 +435,9 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.datetime "created_at", null: false t.datetime "updated_at", null: false t.integer "oauth_application_id" - t.index ["oauth_application_id"], name: "index_mobile_devices_on_oauth_application_id" - t.index ["user_id", "device_id"], name: "index_mobile_devices_on_user_id_and_device_id", unique: true - t.index ["user_id"], name: "index_mobile_devices_on_user_id" + t.index [ "oauth_application_id" ], name: "index_mobile_devices_on_oauth_application_id" + t.index [ "user_id", "device_id" ], name: "index_mobile_devices_on_user_id_and_device_id", unique: true + t.index [ "user_id" ], name: "index_mobile_devices_on_user_id" end create_table "oauth_access_grants", force: :cascade do |t| @@ -449,9 +449,9 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.string "scopes", default: "", null: false t.datetime "created_at", null: false t.datetime "revoked_at" - t.index ["application_id"], name: "index_oauth_access_grants_on_application_id" - t.index ["resource_owner_id"], name: "index_oauth_access_grants_on_resource_owner_id" - t.index ["token"], name: "index_oauth_access_grants_on_token", unique: true + t.index [ "application_id" ], name: "index_oauth_access_grants_on_application_id" + t.index [ "resource_owner_id" ], name: "index_oauth_access_grants_on_resource_owner_id" + t.index [ "token" ], name: "index_oauth_access_grants_on_token", unique: true end create_table "oauth_access_tokens", force: :cascade do |t| @@ -464,10 +464,10 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.datetime "created_at", null: false t.datetime "revoked_at" t.string "previous_refresh_token", default: "", null: false - t.index ["application_id"], name: "index_oauth_access_tokens_on_application_id" - t.index ["refresh_token"], name: "index_oauth_access_tokens_on_refresh_token", unique: true - t.index ["resource_owner_id"], name: "index_oauth_access_tokens_on_resource_owner_id" - t.index ["token"], name: "index_oauth_access_tokens_on_token", unique: true + t.index [ "application_id" ], name: "index_oauth_access_tokens_on_application_id" + t.index [ "refresh_token" ], name: "index_oauth_access_tokens_on_refresh_token", unique: true + t.index [ "resource_owner_id" ], name: "index_oauth_access_tokens_on_resource_owner_id" + t.index [ "token" ], name: "index_oauth_access_tokens_on_token", unique: true end create_table "oauth_applications", force: :cascade do |t| @@ -481,8 +481,8 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.datetime "updated_at", null: false t.uuid "owner_id" t.string "owner_type" - t.index ["owner_id", "owner_type"], name: "index_oauth_applications_on_owner_id_and_owner_type" - t.index ["uid"], name: "index_oauth_applications_on_uid", unique: true + t.index [ "owner_id", "owner_type" ], name: "index_oauth_applications_on_owner_id_and_owner_type" + t.index [ "uid" ], name: "index_oauth_applications_on_uid", unique: true end create_table "other_assets", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -513,8 +513,8 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.jsonb "raw_transactions_payload", default: {} t.jsonb "raw_investments_payload", default: {} t.jsonb "raw_liabilities_payload", default: {} - t.index ["plaid_id"], name: "index_plaid_accounts_on_plaid_id", unique: true - t.index ["plaid_item_id"], name: "index_plaid_accounts_on_plaid_item_id" + t.index [ "plaid_id" ], name: "index_plaid_accounts_on_plaid_id", unique: true + t.index [ "plaid_item_id" ], name: "index_plaid_accounts_on_plaid_item_id" end create_table "plaid_items", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -535,8 +535,8 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.string "status", default: "good", null: false t.jsonb "raw_payload", default: {} t.jsonb "raw_institution_payload", default: {} - t.index ["family_id"], name: "index_plaid_items_on_family_id" - t.index ["plaid_id"], name: "index_plaid_items_on_plaid_id", unique: true + t.index [ "family_id" ], name: "index_plaid_items_on_family_id" + t.index [ "plaid_id" ], name: "index_plaid_items_on_plaid_id", unique: true end create_table "properties", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -553,9 +553,9 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.uuid "outflow_transaction_id", null: false t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.index ["inflow_transaction_id", "outflow_transaction_id"], name: "idx_on_inflow_transaction_id_outflow_transaction_id_412f8e7e26", unique: true - t.index ["inflow_transaction_id"], name: "index_rejected_transfers_on_inflow_transaction_id" - t.index ["outflow_transaction_id"], name: "index_rejected_transfers_on_outflow_transaction_id" + t.index [ "inflow_transaction_id", "outflow_transaction_id" ], name: "idx_on_inflow_transaction_id_outflow_transaction_id_412f8e7e26", unique: true + t.index [ "inflow_transaction_id" ], name: "index_rejected_transfers_on_inflow_transaction_id" + t.index [ "outflow_transaction_id" ], name: "index_rejected_transfers_on_outflow_transaction_id" end create_table "rule_actions", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -564,7 +564,7 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.string "value" t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.index ["rule_id"], name: "index_rule_actions_on_rule_id" + t.index [ "rule_id" ], name: "index_rule_actions_on_rule_id" end create_table "rule_conditions", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -575,8 +575,8 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.string "value" t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.index ["parent_id"], name: "index_rule_conditions_on_parent_id" - t.index ["rule_id"], name: "index_rule_conditions_on_rule_id" + t.index [ "parent_id" ], name: "index_rule_conditions_on_parent_id" + t.index [ "rule_id" ], name: "index_rule_conditions_on_rule_id" end create_table "rules", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -587,7 +587,7 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.datetime "created_at", null: false t.datetime "updated_at", null: false t.string "name" - t.index ["family_id"], name: "index_rules_on_family_id" + t.index [ "family_id" ], name: "index_rules_on_family_id" end create_table "securities", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -605,8 +605,8 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.integer "failed_fetch_count", default: 0, null: false t.datetime "last_health_check_at" t.index "upper((ticker)::text), COALESCE(upper((exchange_operating_mic)::text), ''::text)", name: "index_securities_on_ticker_and_exchange_operating_mic_unique", unique: true - t.index ["country_code"], name: "index_securities_on_country_code" - t.index ["exchange_operating_mic"], name: "index_securities_on_exchange_operating_mic" + t.index [ "country_code" ], name: "index_securities_on_country_code" + t.index [ "exchange_operating_mic" ], name: "index_securities_on_exchange_operating_mic" end create_table "security_prices", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -616,8 +616,8 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.datetime "created_at", null: false t.datetime "updated_at", null: false t.uuid "security_id" - t.index ["security_id", "date", "currency"], name: "index_security_prices_on_security_id_and_date_and_currency", unique: true - t.index ["security_id"], name: "index_security_prices_on_security_id" + t.index [ "security_id", "date", "currency" ], name: "index_security_prices_on_security_id_and_date_and_currency", unique: true + t.index [ "security_id" ], name: "index_security_prices_on_security_id" end create_table "sessions", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -630,8 +630,8 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.datetime "subscribed_at" t.jsonb "prev_transaction_page_params", default: {} t.jsonb "data", default: {} - t.index ["active_impersonator_session_id"], name: "index_sessions_on_active_impersonator_session_id" - t.index ["user_id"], name: "index_sessions_on_user_id" + t.index [ "active_impersonator_session_id" ], name: "index_sessions_on_active_impersonator_session_id" + t.index [ "user_id" ], name: "index_sessions_on_user_id" end create_table "settings", force: :cascade do |t| @@ -639,7 +639,7 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.text "value" t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.index ["var"], name: "index_settings_on_var", unique: true + t.index [ "var" ], name: "index_settings_on_var", unique: true end create_table "subscriptions", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -653,7 +653,7 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.datetime "trial_ends_at" t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.index ["family_id"], name: "index_subscriptions_on_family_id", unique: true + t.index [ "family_id" ], name: "index_subscriptions_on_family_id", unique: true end create_table "syncs", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -671,9 +671,9 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.datetime "failed_at" t.date "window_start_date" t.date "window_end_date" - t.index ["parent_id"], name: "index_syncs_on_parent_id" - t.index ["status"], name: "index_syncs_on_status" - t.index ["syncable_type", "syncable_id"], name: "index_syncs_on_syncable" + t.index [ "parent_id" ], name: "index_syncs_on_parent_id" + t.index [ "status" ], name: "index_syncs_on_status" + t.index [ "syncable_type", "syncable_id" ], name: "index_syncs_on_syncable" end create_table "taggings", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -682,8 +682,8 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.uuid "taggable_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.index ["tag_id"], name: "index_taggings_on_tag_id" - t.index ["taggable_type", "taggable_id"], name: "index_taggings_on_taggable" + t.index [ "tag_id" ], name: "index_taggings_on_tag_id" + t.index [ "taggable_type", "taggable_id" ], name: "index_taggings_on_taggable" end create_table "tags", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -692,7 +692,7 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.uuid "family_id", null: false t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.index ["family_id"], name: "index_tags_on_family_id" + t.index [ "family_id" ], name: "index_tags_on_family_id" end create_table "tool_calls", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -705,7 +705,7 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.jsonb "function_result" t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.index ["message_id"], name: "index_tool_calls_on_message_id" + t.index [ "message_id" ], name: "index_tool_calls_on_message_id" end create_table "trades", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -716,7 +716,7 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.datetime "updated_at", null: false t.string "currency" t.jsonb "locked_attributes", default: {} - t.index ["security_id"], name: "index_trades_on_security_id" + t.index [ "security_id" ], name: "index_trades_on_security_id" end create_table "transactions", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -726,9 +726,9 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.uuid "merchant_id" t.jsonb "locked_attributes", default: {} t.string "kind", default: "standard", null: false - t.index ["category_id"], name: "index_transactions_on_category_id" - t.index ["kind"], name: "index_transactions_on_kind" - t.index ["merchant_id"], name: "index_transactions_on_merchant_id" + t.index [ "category_id" ], name: "index_transactions_on_category_id" + t.index [ "kind" ], name: "index_transactions_on_kind" + t.index [ "merchant_id" ], name: "index_transactions_on_merchant_id" end create_table "transfers", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -738,9 +738,9 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.text "notes" t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.index ["inflow_transaction_id", "outflow_transaction_id"], name: "idx_on_inflow_transaction_id_outflow_transaction_id_8cd07a28bd", unique: true - t.index ["inflow_transaction_id"], name: "index_transfers_on_inflow_transaction_id" - t.index ["outflow_transaction_id"], name: "index_transfers_on_outflow_transaction_id" + t.index [ "inflow_transaction_id", "outflow_transaction_id" ], name: "idx_on_inflow_transaction_id_outflow_transaction_id_8cd07a28bd", unique: true + t.index [ "inflow_transaction_id" ], name: "index_transfers_on_inflow_transaction_id" + t.index [ "outflow_transaction_id" ], name: "index_transfers_on_outflow_transaction_id" end create_table "users", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -769,10 +769,10 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.text "goals", default: [], array: true t.datetime "set_onboarding_preferences_at" t.datetime "set_onboarding_goals_at" - t.index ["email"], name: "index_users_on_email", unique: true - t.index ["family_id"], name: "index_users_on_family_id" - t.index ["last_viewed_chat_id"], name: "index_users_on_last_viewed_chat_id" - t.index ["otp_secret"], name: "index_users_on_otp_secret", unique: true, where: "(otp_secret IS NOT NULL)" + t.index [ "email" ], name: "index_users_on_email", unique: true + t.index [ "family_id" ], name: "index_users_on_family_id" + t.index [ "last_viewed_chat_id" ], name: "index_users_on_last_viewed_chat_id" + t.index [ "otp_secret" ], name: "index_users_on_otp_secret", unique: true, where: "(otp_secret IS NOT NULL)" end create_table "valuations", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| diff --git a/test/components/previews/alert_component_preview.rb b/test/components/previews/alert_component_preview.rb index 34abcb37..ddd91183 100644 --- a/test/components/previews/alert_component_preview.rb +++ b/test/components/previews/alert_component_preview.rb @@ -2,6 +2,6 @@ class AlertComponentPreview < Lookbook::Preview # @param message text # @param variant select [info, success, warning, error] def default(message: "This is an alert message.", variant: :info) - render AlertComponent.new(message: message, variant: variant.to_sym) + render DS::Alert.new(message: message, variant: variant.to_sym) end end diff --git a/test/components/previews/button_component_preview.rb b/test/components/previews/button_component_preview.rb index 499d36b3..e6045ab2 100644 --- a/test/components/previews/button_component_preview.rb +++ b/test/components/previews/button_component_preview.rb @@ -1,10 +1,10 @@ class ButtonComponentPreview < ViewComponent::Preview - # @param variant select {{ ButtonComponent::VARIANTS.keys }} - # @param size select {{ ButtonComponent::SIZES.keys }} + # @param variant select {{ DS::Button::VARIANTS.keys }} + # @param size select {{ DS::Button::SIZES.keys }} # @param disabled toggle # @param icon select ["plus", "circle"] def default(variant: "primary", size: "md", disabled: false, icon: "plus") - render ButtonComponent.new( + render DS::Button.new( text: "Sample button", variant: variant, size: size, diff --git a/test/components/previews/dialog_component_preview.rb b/test/components/previews/dialog_component_preview.rb index a1b81340..5f5c78d9 100644 --- a/test/components/previews/dialog_component_preview.rb +++ b/test/components/previews/dialog_component_preview.rb @@ -1,7 +1,7 @@ class DialogComponentPreview < ViewComponent::Preview # @param show_overflow toggle def modal(show_overflow: false) - render DialogComponent.new(variant: "modal") do |dialog| + render DS::Dialog.new(variant: "modal") do |dialog| dialog.with_header(title: "Sample modal title") dialog.with_body do @@ -21,7 +21,7 @@ class DialogComponentPreview < ViewComponent::Preview # @param show_overflow toggle def drawer(show_overflow: false) - render DialogComponent.new(variant: "drawer") do |dialog| + render DS::Dialog.new(variant: "drawer") do |dialog| dialog.with_header(title: "Drawer title") dialog.with_body do diff --git a/test/components/previews/disclosure_component_preview.rb b/test/components/previews/disclosure_component_preview.rb index ec6e6d1d..51b9a8a0 100644 --- a/test/components/previews/disclosure_component_preview.rb +++ b/test/components/previews/disclosure_component_preview.rb @@ -2,7 +2,7 @@ class DisclosureComponentPreview < ViewComponent::Preview # @display container_classes max-w-[400px] # @param align select ["left", "right"] def default(align: "right") - render DisclosureComponent.new(title: "Title", align: align, open: true) do |disclosure| + render DS::Disclosure.new(title: "Title", align: align, open: true) do |disclosure| disclosure.with_summary_content do content_tag(:p, "$200.25", class: "text-xs font-mono font-medium") end diff --git a/test/components/previews/filled_icon_component_preview.rb b/test/components/previews/filled_icon_component_preview.rb index c2670308..3b0ee022 100644 --- a/test/components/previews/filled_icon_component_preview.rb +++ b/test/components/previews/filled_icon_component_preview.rb @@ -1,11 +1,11 @@ class FilledIconComponentPreview < ViewComponent::Preview # @param size select ["sm", "md", "lg"] def default(size: "md") - render FilledIconComponent.new(icon: "home", variant: :default, size: size) + render DS::FilledIcon.new(icon: "home", variant: :default, size: size) end # @param size select ["sm", "md", "lg"] def text(size: "md") - render FilledIconComponent.new(variant: :text, text: "Test", size: size, rounded: true) + render DS::FilledIcon.new(variant: :text, text: "Test", size: size, rounded: true) end end diff --git a/test/components/previews/link_component_preview.rb b/test/components/previews/link_component_preview.rb index 17150204..d3600bf3 100644 --- a/test/components/previews/link_component_preview.rb +++ b/test/components/previews/link_component_preview.rb @@ -2,17 +2,17 @@ class LinkComponentPreview < ViewComponent::Preview # Usage # ------------- # - # LinkComponent is a small abstraction on top of the `link_to` helper. + # DS::Link is a small abstraction on top of the `link_to` helper. # - # It can be used as a regular link or styled as a "Link button" using any of the available ButtonComponent variants. + # It can be used as a regular link or styled as a "Link button" using any of the available DS::Button variants. # - # @param variant select {{ LinkComponent::VARIANTS.keys }} - # @param size select {{ LinkComponent::SIZES.keys }} + # @param variant select {{ DS::Link::VARIANTS.keys }} + # @param size select {{ DS::Link::SIZES.keys }} # @param icon select ["", "plus", "arrow-right"] # @param icon_position select ["left", "right"] # @param full_width toggle def default(variant: "default", size: "md", icon: "plus", icon_position: "left", full_width: false) - render LinkComponent.new( + render DS::Link.new( href: "#", text: "Preview link", variant: variant, diff --git a/test/components/previews/menu_component_preview.rb b/test/components/previews/menu_component_preview.rb index 6c210437..592b276c 100644 --- a/test/components/previews/menu_component_preview.rb +++ b/test/components/previews/menu_component_preview.rb @@ -1,19 +1,19 @@ class MenuComponentPreview < ViewComponent::Preview def icon - render MenuComponent.new(variant: "icon") do |menu| + render DS::Menu.new(variant: "icon") do |menu| menu_contents(menu) end end def button - render MenuComponent.new(variant: "button") do |menu| + render DS::Menu.new(variant: "button") do |menu| menu.with_button(text: "Open menu", variant: "secondary") menu_contents(menu) end end def avatar - render MenuComponent.new(variant: "avatar") do |menu| + render DS::Menu.new(variant: "avatar") do |menu| menu_contents(menu) end end diff --git a/test/components/previews/toggle_component_preview.rb b/test/components/previews/toggle_component_preview.rb index 9ab3d014..27eeff52 100644 --- a/test/components/previews/toggle_component_preview.rb +++ b/test/components/previews/toggle_component_preview.rb @@ -2,7 +2,7 @@ class ToggleComponentPreview < ViewComponent::Preview # @param disabled toggle def default(disabled: false) render( - ToggleComponent.new( + DS::Toggle.new( id: "toggle-component-id", name: "toggle-component-name", checked: false, -- 2.53.0 From 301fc7b30ebadb7b74ab1c2c609412a608dc583e Mon Sep 17 00:00:00 2001 From: Zach Gollwitzer Date: Fri, 18 Jul 2025 07:30:59 -0400 Subject: [PATCH 2/4] [claudesquad] update from 'component-namespacing' on 18 Jul 25 07:30 EDT --- db/schema.rb | 206 +++++++++++++++++++++++++-------------------------- 1 file changed, 103 insertions(+), 103 deletions(-) diff --git a/db/schema.rb b/db/schema.rb index afab5688..56d7ba09 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -17,7 +17,7 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do # Custom types defined in this database. # Note that some types may not work with other database engines. Be careful if changing database. - create_enum "account_status", [ "ok", "syncing", "error" ] + create_enum "account_status", ["ok", "syncing", "error"] create_table "accounts", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.string "subtype" @@ -35,13 +35,13 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.decimal "cash_balance", precision: 19, scale: 4, default: "0.0" t.jsonb "locked_attributes", default: {} t.string "status", default: "active" - t.index [ "accountable_id", "accountable_type" ], name: "index_accounts_on_accountable_id_and_accountable_type" - t.index [ "accountable_type" ], name: "index_accounts_on_accountable_type" - t.index [ "family_id", "accountable_type" ], name: "index_accounts_on_family_id_and_accountable_type" - t.index [ "family_id", "id" ], name: "index_accounts_on_family_id_and_id" - t.index [ "family_id" ], name: "index_accounts_on_family_id" - t.index [ "import_id" ], name: "index_accounts_on_import_id" - t.index [ "plaid_account_id" ], name: "index_accounts_on_plaid_account_id" + t.index ["accountable_id", "accountable_type"], name: "index_accounts_on_accountable_id_and_accountable_type" + t.index ["accountable_type"], name: "index_accounts_on_accountable_type" + t.index ["family_id", "accountable_type"], name: "index_accounts_on_family_id_and_accountable_type" + t.index ["family_id", "id"], name: "index_accounts_on_family_id_and_id" + t.index ["family_id"], name: "index_accounts_on_family_id" + t.index ["import_id"], name: "index_accounts_on_import_id" + t.index ["plaid_account_id"], name: "index_accounts_on_plaid_account_id" end create_table "active_storage_attachments", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -50,8 +50,8 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.uuid "record_id", null: false t.uuid "blob_id", null: false t.datetime "created_at", null: false - t.index [ "blob_id" ], name: "index_active_storage_attachments_on_blob_id" - t.index [ "record_type", "record_id", "name", "blob_id" ], name: "index_active_storage_attachments_uniqueness", unique: true + t.index ["blob_id"], name: "index_active_storage_attachments_on_blob_id" + t.index ["record_type", "record_id", "name", "blob_id"], name: "index_active_storage_attachments_uniqueness", unique: true end create_table "active_storage_blobs", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -63,13 +63,13 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.bigint "byte_size", null: false t.string "checksum" t.datetime "created_at", null: false - t.index [ "key" ], name: "index_active_storage_blobs_on_key", unique: true + t.index ["key"], name: "index_active_storage_blobs_on_key", unique: true end create_table "active_storage_variant_records", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.uuid "blob_id", null: false t.string "variation_digest", null: false - t.index [ "blob_id", "variation_digest" ], name: "index_active_storage_variant_records_uniqueness", unique: true + t.index ["blob_id", "variation_digest"], name: "index_active_storage_variant_records_uniqueness", unique: true end create_table "addresses", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -84,7 +84,7 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.integer "postal_code" t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.index [ "addressable_type", "addressable_id" ], name: "index_addresses_on_addressable" + t.index ["addressable_type", "addressable_id"], name: "index_addresses_on_addressable" end create_table "api_keys", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -98,10 +98,10 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.datetime "updated_at", null: false t.string "display_key", null: false t.string "source", default: "web" - t.index [ "display_key" ], name: "index_api_keys_on_display_key", unique: true - t.index [ "revoked_at" ], name: "index_api_keys_on_revoked_at" - t.index [ "user_id", "source" ], name: "index_api_keys_on_user_id_and_source" - t.index [ "user_id" ], name: "index_api_keys_on_user_id" + t.index ["display_key"], name: "index_api_keys_on_display_key", unique: true + t.index ["revoked_at"], name: "index_api_keys_on_revoked_at" + t.index ["user_id", "source"], name: "index_api_keys_on_user_id_and_source" + t.index ["user_id"], name: "index_api_keys_on_user_id" end create_table "balances", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -112,8 +112,8 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.datetime "created_at", null: false t.datetime "updated_at", null: false t.decimal "cash_balance", precision: 19, scale: 4, default: "0.0" - t.index [ "account_id", "date", "currency" ], name: "index_account_balances_on_account_id_date_currency_unique", unique: true - t.index [ "account_id" ], name: "index_balances_on_account_id" + t.index ["account_id", "date", "currency"], name: "index_account_balances_on_account_id_date_currency_unique", unique: true + t.index ["account_id"], name: "index_balances_on_account_id" end create_table "budget_categories", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -123,9 +123,9 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.string "currency", null: false t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.index [ "budget_id", "category_id" ], name: "index_budget_categories_on_budget_id_and_category_id", unique: true - t.index [ "budget_id" ], name: "index_budget_categories_on_budget_id" - t.index [ "category_id" ], name: "index_budget_categories_on_category_id" + t.index ["budget_id", "category_id"], name: "index_budget_categories_on_budget_id_and_category_id", unique: true + t.index ["budget_id"], name: "index_budget_categories_on_budget_id" + t.index ["category_id"], name: "index_budget_categories_on_category_id" end create_table "budgets", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -137,8 +137,8 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.string "currency", null: false t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.index [ "family_id", "start_date", "end_date" ], name: "index_budgets_on_family_id_and_start_date_and_end_date", unique: true - t.index [ "family_id" ], name: "index_budgets_on_family_id" + t.index ["family_id", "start_date", "end_date"], name: "index_budgets_on_family_id_and_start_date_and_end_date", unique: true + t.index ["family_id"], name: "index_budgets_on_family_id" end create_table "categories", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -150,7 +150,7 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.uuid "parent_id" t.string "classification", default: "expense", null: false t.string "lucide_icon", default: "shapes", null: false - t.index [ "family_id" ], name: "index_categories_on_family_id" + t.index ["family_id"], name: "index_categories_on_family_id" end create_table "chats", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -161,7 +161,7 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.string "latest_assistant_response_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.index [ "user_id" ], name: "index_chats_on_user_id" + t.index ["user_id"], name: "index_chats_on_user_id" end create_table "credit_cards", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -190,8 +190,8 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.jsonb "metadata" t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.index [ "enrichable_id", "enrichable_type", "source", "attribute_name" ], name: "idx_on_enrichable_id_enrichable_type_source_attribu_5be5f63e08", unique: true - t.index [ "enrichable_type", "enrichable_id" ], name: "index_data_enrichments_on_enrichable" + t.index ["enrichable_id", "enrichable_type", "source", "attribute_name"], name: "idx_on_enrichable_id_enrichable_type_source_attribu_5be5f63e08", unique: true + t.index ["enrichable_type", "enrichable_id"], name: "index_data_enrichments_on_enrichable" end create_table "depositories", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -215,8 +215,8 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.boolean "excluded", default: false t.string "plaid_id" t.jsonb "locked_attributes", default: {} - t.index [ "account_id" ], name: "index_entries_on_account_id" - t.index [ "import_id" ], name: "index_entries_on_import_id" + t.index ["account_id"], name: "index_entries_on_account_id" + t.index ["import_id"], name: "index_entries_on_import_id" end create_table "exchange_rates", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -226,9 +226,9 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.date "date", null: false t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.index [ "from_currency", "to_currency", "date" ], name: "index_exchange_rates_on_base_converted_date_unique", unique: true - t.index [ "from_currency" ], name: "index_exchange_rates_on_from_currency" - t.index [ "to_currency" ], name: "index_exchange_rates_on_to_currency" + t.index ["from_currency", "to_currency", "date"], name: "index_exchange_rates_on_base_converted_date_unique", unique: true + t.index ["from_currency"], name: "index_exchange_rates_on_from_currency" + t.index ["to_currency"], name: "index_exchange_rates_on_to_currency" end create_table "families", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -258,9 +258,9 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.string "currency", null: false t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.index [ "account_id", "security_id", "date", "currency" ], name: "idx_on_account_id_security_id_date_currency_5323e39f8b", unique: true - t.index [ "account_id" ], name: "index_holdings_on_account_id" - t.index [ "security_id" ], name: "index_holdings_on_security_id" + t.index ["account_id", "security_id", "date", "currency"], name: "idx_on_account_id_security_id_date_currency_5323e39f8b", unique: true + t.index ["account_id"], name: "index_holdings_on_account_id" + t.index ["security_id"], name: "index_holdings_on_security_id" end create_table "impersonation_session_logs", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -273,7 +273,7 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.text "user_agent" t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.index [ "impersonation_session_id" ], name: "index_impersonation_session_logs_on_impersonation_session_id" + t.index ["impersonation_session_id"], name: "index_impersonation_session_logs_on_impersonation_session_id" end create_table "impersonation_sessions", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -282,8 +282,8 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.string "status", default: "pending", null: false t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.index [ "impersonated_id" ], name: "index_impersonation_sessions_on_impersonated_id" - t.index [ "impersonator_id" ], name: "index_impersonation_sessions_on_impersonator_id" + t.index ["impersonated_id"], name: "index_impersonation_sessions_on_impersonated_id" + t.index ["impersonator_id"], name: "index_impersonation_sessions_on_impersonator_id" end create_table "import_mappings", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -296,8 +296,8 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.uuid "mappable_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.index [ "import_id" ], name: "index_import_mappings_on_import_id" - t.index [ "mappable_type", "mappable_id" ], name: "index_import_mappings_on_mappable" + t.index ["import_id"], name: "index_import_mappings_on_import_id" + t.index ["mappable_type", "mappable_id"], name: "index_import_mappings_on_mappable" end create_table "import_rows", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -317,7 +317,7 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.datetime "created_at", null: false t.datetime "updated_at", null: false t.string "exchange_operating_mic" - t.index [ "import_id" ], name: "index_import_rows_on_import_id" + t.index ["import_id"], name: "index_import_rows_on_import_id" end create_table "imports", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -350,7 +350,7 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.string "exchange_operating_mic_col_label" t.string "amount_type_strategy", default: "signed_amount" t.string "amount_type_inflow_value" - t.index [ "family_id" ], name: "index_imports_on_family_id" + t.index ["family_id"], name: "index_imports_on_family_id" end create_table "investments", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -369,18 +369,18 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.datetime "expires_at" t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.index [ "email", "family_id" ], name: "index_invitations_on_email_and_family_id", unique: true - t.index [ "email" ], name: "index_invitations_on_email" - t.index [ "family_id" ], name: "index_invitations_on_family_id" - t.index [ "inviter_id" ], name: "index_invitations_on_inviter_id" - t.index [ "token" ], name: "index_invitations_on_token", unique: true + t.index ["email", "family_id"], name: "index_invitations_on_email_and_family_id", unique: true + t.index ["email"], name: "index_invitations_on_email" + t.index ["family_id"], name: "index_invitations_on_family_id" + t.index ["inviter_id"], name: "index_invitations_on_inviter_id" + t.index ["token"], name: "index_invitations_on_token", unique: true end create_table "invite_codes", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.string "token", null: false t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.index [ "token" ], name: "index_invite_codes_on_token", unique: true + t.index ["token"], name: "index_invite_codes_on_token", unique: true end create_table "loans", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -404,10 +404,10 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.string "type", null: false t.string "source" t.string "provider_merchant_id" - t.index [ "family_id", "name" ], name: "index_merchants_on_family_id_and_name", unique: true, where: "((type)::text = 'FamilyMerchant'::text)" - t.index [ "family_id" ], name: "index_merchants_on_family_id" - t.index [ "source", "name" ], name: "index_merchants_on_source_and_name", unique: true, where: "((type)::text = 'ProviderMerchant'::text)" - t.index [ "type" ], name: "index_merchants_on_type" + t.index ["family_id", "name"], name: "index_merchants_on_family_id_and_name", unique: true, where: "((type)::text = 'FamilyMerchant'::text)" + t.index ["family_id"], name: "index_merchants_on_family_id" + t.index ["source", "name"], name: "index_merchants_on_source_and_name", unique: true, where: "((type)::text = 'ProviderMerchant'::text)" + t.index ["type"], name: "index_merchants_on_type" end create_table "messages", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -421,7 +421,7 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.boolean "debug", default: false t.string "provider_id" t.boolean "reasoning", default: false - t.index [ "chat_id" ], name: "index_messages_on_chat_id" + t.index ["chat_id"], name: "index_messages_on_chat_id" end create_table "mobile_devices", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -435,9 +435,9 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.datetime "created_at", null: false t.datetime "updated_at", null: false t.integer "oauth_application_id" - t.index [ "oauth_application_id" ], name: "index_mobile_devices_on_oauth_application_id" - t.index [ "user_id", "device_id" ], name: "index_mobile_devices_on_user_id_and_device_id", unique: true - t.index [ "user_id" ], name: "index_mobile_devices_on_user_id" + t.index ["oauth_application_id"], name: "index_mobile_devices_on_oauth_application_id" + t.index ["user_id", "device_id"], name: "index_mobile_devices_on_user_id_and_device_id", unique: true + t.index ["user_id"], name: "index_mobile_devices_on_user_id" end create_table "oauth_access_grants", force: :cascade do |t| @@ -449,9 +449,9 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.string "scopes", default: "", null: false t.datetime "created_at", null: false t.datetime "revoked_at" - t.index [ "application_id" ], name: "index_oauth_access_grants_on_application_id" - t.index [ "resource_owner_id" ], name: "index_oauth_access_grants_on_resource_owner_id" - t.index [ "token" ], name: "index_oauth_access_grants_on_token", unique: true + t.index ["application_id"], name: "index_oauth_access_grants_on_application_id" + t.index ["resource_owner_id"], name: "index_oauth_access_grants_on_resource_owner_id" + t.index ["token"], name: "index_oauth_access_grants_on_token", unique: true end create_table "oauth_access_tokens", force: :cascade do |t| @@ -464,10 +464,10 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.datetime "created_at", null: false t.datetime "revoked_at" t.string "previous_refresh_token", default: "", null: false - t.index [ "application_id" ], name: "index_oauth_access_tokens_on_application_id" - t.index [ "refresh_token" ], name: "index_oauth_access_tokens_on_refresh_token", unique: true - t.index [ "resource_owner_id" ], name: "index_oauth_access_tokens_on_resource_owner_id" - t.index [ "token" ], name: "index_oauth_access_tokens_on_token", unique: true + t.index ["application_id"], name: "index_oauth_access_tokens_on_application_id" + t.index ["refresh_token"], name: "index_oauth_access_tokens_on_refresh_token", unique: true + t.index ["resource_owner_id"], name: "index_oauth_access_tokens_on_resource_owner_id" + t.index ["token"], name: "index_oauth_access_tokens_on_token", unique: true end create_table "oauth_applications", force: :cascade do |t| @@ -481,8 +481,8 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.datetime "updated_at", null: false t.uuid "owner_id" t.string "owner_type" - t.index [ "owner_id", "owner_type" ], name: "index_oauth_applications_on_owner_id_and_owner_type" - t.index [ "uid" ], name: "index_oauth_applications_on_uid", unique: true + t.index ["owner_id", "owner_type"], name: "index_oauth_applications_on_owner_id_and_owner_type" + t.index ["uid"], name: "index_oauth_applications_on_uid", unique: true end create_table "other_assets", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -513,8 +513,8 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.jsonb "raw_transactions_payload", default: {} t.jsonb "raw_investments_payload", default: {} t.jsonb "raw_liabilities_payload", default: {} - t.index [ "plaid_id" ], name: "index_plaid_accounts_on_plaid_id", unique: true - t.index [ "plaid_item_id" ], name: "index_plaid_accounts_on_plaid_item_id" + t.index ["plaid_id"], name: "index_plaid_accounts_on_plaid_id", unique: true + t.index ["plaid_item_id"], name: "index_plaid_accounts_on_plaid_item_id" end create_table "plaid_items", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -535,8 +535,8 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.string "status", default: "good", null: false t.jsonb "raw_payload", default: {} t.jsonb "raw_institution_payload", default: {} - t.index [ "family_id" ], name: "index_plaid_items_on_family_id" - t.index [ "plaid_id" ], name: "index_plaid_items_on_plaid_id", unique: true + t.index ["family_id"], name: "index_plaid_items_on_family_id" + t.index ["plaid_id"], name: "index_plaid_items_on_plaid_id", unique: true end create_table "properties", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -553,9 +553,9 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.uuid "outflow_transaction_id", null: false t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.index [ "inflow_transaction_id", "outflow_transaction_id" ], name: "idx_on_inflow_transaction_id_outflow_transaction_id_412f8e7e26", unique: true - t.index [ "inflow_transaction_id" ], name: "index_rejected_transfers_on_inflow_transaction_id" - t.index [ "outflow_transaction_id" ], name: "index_rejected_transfers_on_outflow_transaction_id" + t.index ["inflow_transaction_id", "outflow_transaction_id"], name: "idx_on_inflow_transaction_id_outflow_transaction_id_412f8e7e26", unique: true + t.index ["inflow_transaction_id"], name: "index_rejected_transfers_on_inflow_transaction_id" + t.index ["outflow_transaction_id"], name: "index_rejected_transfers_on_outflow_transaction_id" end create_table "rule_actions", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -564,7 +564,7 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.string "value" t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.index [ "rule_id" ], name: "index_rule_actions_on_rule_id" + t.index ["rule_id"], name: "index_rule_actions_on_rule_id" end create_table "rule_conditions", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -575,8 +575,8 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.string "value" t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.index [ "parent_id" ], name: "index_rule_conditions_on_parent_id" - t.index [ "rule_id" ], name: "index_rule_conditions_on_rule_id" + t.index ["parent_id"], name: "index_rule_conditions_on_parent_id" + t.index ["rule_id"], name: "index_rule_conditions_on_rule_id" end create_table "rules", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -587,7 +587,7 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.datetime "created_at", null: false t.datetime "updated_at", null: false t.string "name" - t.index [ "family_id" ], name: "index_rules_on_family_id" + t.index ["family_id"], name: "index_rules_on_family_id" end create_table "securities", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -605,8 +605,8 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.integer "failed_fetch_count", default: 0, null: false t.datetime "last_health_check_at" t.index "upper((ticker)::text), COALESCE(upper((exchange_operating_mic)::text), ''::text)", name: "index_securities_on_ticker_and_exchange_operating_mic_unique", unique: true - t.index [ "country_code" ], name: "index_securities_on_country_code" - t.index [ "exchange_operating_mic" ], name: "index_securities_on_exchange_operating_mic" + t.index ["country_code"], name: "index_securities_on_country_code" + t.index ["exchange_operating_mic"], name: "index_securities_on_exchange_operating_mic" end create_table "security_prices", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -616,8 +616,8 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.datetime "created_at", null: false t.datetime "updated_at", null: false t.uuid "security_id" - t.index [ "security_id", "date", "currency" ], name: "index_security_prices_on_security_id_and_date_and_currency", unique: true - t.index [ "security_id" ], name: "index_security_prices_on_security_id" + t.index ["security_id", "date", "currency"], name: "index_security_prices_on_security_id_and_date_and_currency", unique: true + t.index ["security_id"], name: "index_security_prices_on_security_id" end create_table "sessions", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -630,8 +630,8 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.datetime "subscribed_at" t.jsonb "prev_transaction_page_params", default: {} t.jsonb "data", default: {} - t.index [ "active_impersonator_session_id" ], name: "index_sessions_on_active_impersonator_session_id" - t.index [ "user_id" ], name: "index_sessions_on_user_id" + t.index ["active_impersonator_session_id"], name: "index_sessions_on_active_impersonator_session_id" + t.index ["user_id"], name: "index_sessions_on_user_id" end create_table "settings", force: :cascade do |t| @@ -639,7 +639,7 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.text "value" t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.index [ "var" ], name: "index_settings_on_var", unique: true + t.index ["var"], name: "index_settings_on_var", unique: true end create_table "subscriptions", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -653,7 +653,7 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.datetime "trial_ends_at" t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.index [ "family_id" ], name: "index_subscriptions_on_family_id", unique: true + t.index ["family_id"], name: "index_subscriptions_on_family_id", unique: true end create_table "syncs", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -671,9 +671,9 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.datetime "failed_at" t.date "window_start_date" t.date "window_end_date" - t.index [ "parent_id" ], name: "index_syncs_on_parent_id" - t.index [ "status" ], name: "index_syncs_on_status" - t.index [ "syncable_type", "syncable_id" ], name: "index_syncs_on_syncable" + t.index ["parent_id"], name: "index_syncs_on_parent_id" + t.index ["status"], name: "index_syncs_on_status" + t.index ["syncable_type", "syncable_id"], name: "index_syncs_on_syncable" end create_table "taggings", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -682,8 +682,8 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.uuid "taggable_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.index [ "tag_id" ], name: "index_taggings_on_tag_id" - t.index [ "taggable_type", "taggable_id" ], name: "index_taggings_on_taggable" + t.index ["tag_id"], name: "index_taggings_on_tag_id" + t.index ["taggable_type", "taggable_id"], name: "index_taggings_on_taggable" end create_table "tags", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -692,7 +692,7 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.uuid "family_id", null: false t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.index [ "family_id" ], name: "index_tags_on_family_id" + t.index ["family_id"], name: "index_tags_on_family_id" end create_table "tool_calls", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -705,7 +705,7 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.jsonb "function_result" t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.index [ "message_id" ], name: "index_tool_calls_on_message_id" + t.index ["message_id"], name: "index_tool_calls_on_message_id" end create_table "trades", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -716,7 +716,7 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.datetime "updated_at", null: false t.string "currency" t.jsonb "locked_attributes", default: {} - t.index [ "security_id" ], name: "index_trades_on_security_id" + t.index ["security_id"], name: "index_trades_on_security_id" end create_table "transactions", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -726,9 +726,9 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.uuid "merchant_id" t.jsonb "locked_attributes", default: {} t.string "kind", default: "standard", null: false - t.index [ "category_id" ], name: "index_transactions_on_category_id" - t.index [ "kind" ], name: "index_transactions_on_kind" - t.index [ "merchant_id" ], name: "index_transactions_on_merchant_id" + t.index ["category_id"], name: "index_transactions_on_category_id" + t.index ["kind"], name: "index_transactions_on_kind" + t.index ["merchant_id"], name: "index_transactions_on_merchant_id" end create_table "transfers", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -738,9 +738,9 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.text "notes" t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.index [ "inflow_transaction_id", "outflow_transaction_id" ], name: "idx_on_inflow_transaction_id_outflow_transaction_id_8cd07a28bd", unique: true - t.index [ "inflow_transaction_id" ], name: "index_transfers_on_inflow_transaction_id" - t.index [ "outflow_transaction_id" ], name: "index_transfers_on_outflow_transaction_id" + t.index ["inflow_transaction_id", "outflow_transaction_id"], name: "idx_on_inflow_transaction_id_outflow_transaction_id_8cd07a28bd", unique: true + t.index ["inflow_transaction_id"], name: "index_transfers_on_inflow_transaction_id" + t.index ["outflow_transaction_id"], name: "index_transfers_on_outflow_transaction_id" end create_table "users", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| @@ -769,10 +769,10 @@ ActiveRecord::Schema[7.2].define(version: 2025_07_10_225721) do t.text "goals", default: [], array: true t.datetime "set_onboarding_preferences_at" t.datetime "set_onboarding_goals_at" - t.index [ "email" ], name: "index_users_on_email", unique: true - t.index [ "family_id" ], name: "index_users_on_family_id" - t.index [ "last_viewed_chat_id" ], name: "index_users_on_last_viewed_chat_id" - t.index [ "otp_secret" ], name: "index_users_on_otp_secret", unique: true, where: "(otp_secret IS NOT NULL)" + t.index ["email"], name: "index_users_on_email", unique: true + t.index ["family_id"], name: "index_users_on_family_id" + t.index ["last_viewed_chat_id"], name: "index_users_on_last_viewed_chat_id" + t.index ["otp_secret"], name: "index_users_on_otp_secret", unique: true, where: "(otp_secret IS NOT NULL)" end create_table "valuations", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| -- 2.53.0 From 59b702d12b7d01b7204d7e51f5d7fa7d5ec27a6f Mon Sep 17 00:00:00 2001 From: Zach Gollwitzer Date: Fri, 18 Jul 2025 08:01:14 -0400 Subject: [PATCH 3/4] Update stimulus controller references to use namespace --- app/components/DS/dialog.html.erb | 2 +- app/components/DS/dialog.rb | 14 +++++++------- app/components/DS/menu.html.erb | 8 ++++---- app/components/DS/tabs.html.erb | 10 +++++----- app/components/DS/tabs.rb | 2 +- app/components/DS/tabs/nav.rb | 2 +- 6 files changed, 19 insertions(+), 19 deletions(-) diff --git a/app/components/DS/dialog.html.erb b/app/components/DS/dialog.html.erb index ac4cd07f..ca8f86b7 100644 --- a/app/components/DS/dialog.html.erb +++ b/app/components/DS/dialog.html.erb @@ -1,7 +1,7 @@ <%= wrapper_element do %> <%= tag.dialog class: "w-full h-full bg-transparent theme-dark:backdrop:bg-alpha-black-900 backdrop:bg-overlay #{drawer? ? "lg:p-3" : "lg:p-1"}", **merged_opts do %> <%= tag.div class: dialog_outer_classes do %> - <%= tag.div class: dialog_inner_classes, data: { dialog_target: "content" } do %> + <%= tag.div class: dialog_inner_classes, data: { DS__dialog_target: "content" } do %>
<% if header? %> <%= header %> diff --git a/app/components/DS/dialog.rb b/app/components/DS/dialog.rb index c2da56c6..3385003c 100644 --- a/app/components/DS/dialog.rb +++ b/app/components/DS/dialog.rb @@ -3,7 +3,7 @@ class DS::Dialog < DesignSystemComponent content_tag(:header, class: "px-4 flex flex-col gap-2", **opts) do title_div = content_tag(:div, class: "flex items-center justify-between gap-2") do title = content_tag(:h2, title, class: class_names("font-medium text-primary", drawer? ? "text-lg" : "")) if title - close_icon = render DS::Button.new(variant: "icon", class: "ml-auto", icon: "x", tabindex: "-1", data: { action: "dialog#close" }) unless hide_close_icon + close_icon = render DS::Button.new(variant: "icon", class: "ml-auto", icon: "x", tabindex: "-1", data: { action: "DS--dialog#close" }) unless hide_close_icon safe_join([ title, close_icon ].compact) end @@ -19,7 +19,7 @@ class DS::Dialog < DesignSystemComponent renders_many :actions, ->(cancel_action: false, **button_opts) do merged_opts = if cancel_action - button_opts.merge(type: "button", data: { action: "modal#close" }) + button_opts.merge(type: "button", data: { action: "DS--dialog#close" }) else button_opts end @@ -99,11 +99,11 @@ class DS::Dialog < DesignSystemComponent merged_opts = opts.dup data = merged_opts.delete(:data) || {} - data[:controller] = [ "dialog", "hotkey", data[:controller] ].compact.join(" ") - data[:dialog_auto_open_value] = auto_open - data[:dialog_reload_on_close_value] = reload_on_close - data[:action] = [ "mousedown->dialog#clickOutside", data[:action] ].compact.join(" ") - data[:hotkey] = "esc:dialog#close" + data[:controller] = [ "DS--dialog", "hotkey", data[:controller] ].compact.join(" ") + data[:DS__dialog_auto_open_value] = auto_open + data[:DS__dialog_reload_on_close_value] = reload_on_close + data[:action] = [ "mousedown->DS--dialog#clickOutside", data[:action] ].compact.join(" ") + data[:hotkey] = "esc:DS--dialog#close" merged_opts[:data] = data merged_opts diff --git a/app/components/DS/menu.html.erb b/app/components/DS/menu.html.erb index 47efe226..d4f0ea8d 100644 --- a/app/components/DS/menu.html.erb +++ b/app/components/DS/menu.html.erb @@ -1,17 +1,17 @@ -<%= tag.div data: { controller: "menu", menu_placement_value: placement, menu_offset_value: offset, testid: testid } do %> +<%= tag.div data: { controller: "DS--menu", DS__menu_placement_value: placement, DS__menu_offset_value: offset, testid: testid } do %> <% if variant == :icon %> - <%= render DS::Button.new(variant: "icon", icon: icon_vertical ? "more-vertical" : "more-horizontal", data: { menu_target: "button" }) %> + <%= render DS::Button.new(variant: "icon", icon: icon_vertical ? "more-vertical" : "more-horizontal", data: { DS__menu_target: "button" }) %> <% elsif variant == :button %> <%= button %> <% elsif variant == :avatar %> - <% end %> -