Dashboard empty view #707

Merged
claudey merged 12 commits from claudey-dashboard-empty-view into main 2024-05-03 20:11:31 +08:00
claudey commented 2024-05-03 05:50:32 +08:00 (Migrated from github.com)

Fixes #706

  • Show title, button and summary when no accounts are added.
  • Increased the padding-right value to make the button balanced.
Screenshot 2024-05-02 at 9 47 36 PM
Fixes #706 - Show title, button and summary when no accounts are added. - Increased the padding-right value to make the button balanced. <img width="1301" alt="Screenshot 2024-05-02 at 9 47 36 PM" src="https://github.com/maybe-finance/maybe/assets/1866816/71cf210b-42ec-488f-bd12-ac9016604510">
zachgoll (Migrated from github.com) reviewed 2024-05-03 06:53:21 +08:00
zachgoll (Migrated from github.com) left a comment

Nice work here! There was one small change that will need to be made that I left a comment about.

In addition, could we also perform this logic on the /accounts/summary page as well? To do this, I'd recommend placing the "No Accounts" message in a partial so that you can reuse it across these two views.

Nice work here! There was one small change that will need to be made that I left a comment about. In addition, could we also perform this logic on the `/accounts/summary` page as well? To do this, I'd recommend placing the "No Accounts" message in a partial so that you can reuse it across these two views.
@@ -3,13 +3,18 @@
<div>
zachgoll (Migrated from github.com) commented 2024-05-03 06:50:30 +08:00

In order to use the @accounts instance variable, it will need to be defined within the pages_controller#dashboard action.

Since we already have an @account_groups variable defined there, I'd recommend a small refactor like so:

@accounts = Current.family.accounts
@account_groups = @accounts.by_group(period: @period, currency: Current.family.currency)
In order to use the `@accounts` instance variable, it will need to be defined within the `pages_controller#dashboard` action. Since we already have an `@account_groups` variable defined there, I'd recommend a small refactor like so: ```ruby @accounts = Current.family.accounts @account_groups = @accounts.by_group(period: @period, currency: Current.family.currency) ```
zachgoll commented 2024-05-03 06:54:25 +08:00 (Migrated from github.com)

@claudey also, don't worry about the failing tests—I'll be coming back to fix those after I get some other work done.

@claudey also, don't worry about the failing tests—I'll be coming back to fix those after I get some other work done.
claudey (Migrated from github.com) reviewed 2024-05-03 15:47:47 +08:00
@@ -3,13 +3,18 @@
<div>
claudey (Migrated from github.com) commented 2024-05-03 15:47:46 +08:00

Thanks for the recommendation. I've added it in now.

Thanks for the recommendation. I've added it in now.
zachgoll (Migrated from github.com) approved these changes 2024-05-03 20:02:58 +08:00
zachgoll (Migrated from github.com) left a comment

Looks good, nice work!

Looks good, nice work!
Sign in to join this conversation.