Skip to content
This repository was archived by the owner on Jul 27, 2025. It is now read-only.

Consolidate and simplify account pages#2462

Merged
zachgoll merged 6 commits intomainfrom
zachgoll/maybe-914-simplify-account-page-routes-and-template
Jul 18, 2025
Merged

Consolidate and simplify account pages#2462
zachgoll merged 6 commits intomainfrom
zachgoll/maybe-914-simplify-account-page-routes-and-template

Conversation

@zachgoll
Copy link
Copy Markdown
Contributor

@zachgoll zachgoll commented Jul 18, 2025

A quick refactor in preparation for updating the account activity views and other forms.

We previously had a "show" page per-accountable type, which led to a confusing view hierarchy of:

show.html.erb -> _template.html.erb -> _chart.html.erb -> chart.html.erb (turbo frame)

This is all now simplified into the shared accounts_controller as:

show.html.erb -> UI::AccountPage (VC)


Also adds a basic pattern for using ViewComponent for more complex views that either have a lot of view logic or need to be broadcast from background jobs. All "application components" live under the UI:: namespace, a useful pattern for avoiding the need to suffix every component with _component.rb

@zachgoll zachgoll merged commit 8c97c9d into main Jul 18, 2025
5 checks passed
@zachgoll zachgoll deleted the zachgoll/maybe-914-simplify-account-page-routes-and-template branch July 18, 2025 09:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant