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

Add new category flow#1857

Merged
zachgoll merged 14 commits intomaybe-finance:mainfrom
syedbarimanjan:Improvement/new-add-category-flow
Feb 24, 2025
Merged

Add new category flow#1857
zachgoll merged 14 commits intomaybe-finance:mainfrom
syedbarimanjan:Improvement/new-add-category-flow

Conversation

@syedbarimanjan
Copy link
Contributor

@syedbarimanjan syedbarimanjan commented Feb 13, 2025

A video showing the changes in action:

simplescreenrecorder-2025-02-13_19.34.10.online-video-cutter.com.mp4

Fixes #1734
/claim #1734

@syedbarimanjan
Copy link
Contributor Author

syedbarimanjan commented Feb 13, 2025

@zachgoll can you please approve the workflow and review.

@goldenstein64

This comment was marked as duplicate.

@zachgoll
Copy link
Contributor

@goldenstein64 would you mind opening a new issue for this? I agree with your suggestion, but since it applies to all of our modals / drawers in the app, it's probably worth a standalone issue.

@syedbarimanjan syedbarimanjan force-pushed the Improvement/new-add-category-flow branch from 0ec9ba9 to a0ccd52 Compare February 17, 2025 23:54
@syedbarimanjan
Copy link
Contributor Author

syedbarimanjan commented Feb 18, 2025

@zachgoll

simplescreenrecorder-2025-02-18_05.07.03.mp4

@syedbarimanjan
Copy link
Contributor Author

@zachgoll

simplescreenrecorder-2025-02-19_22.05.57.mp4

Copy link
Contributor

@zachgoll zachgoll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looking a lot better! Core flow works great.

Before we merge, I think there are a few general "cleanup" items to address (several mentioned in comments):

Model validation / migration

Currently, the Category class allows nil for a category. Per @justinfar comments about the shapes icon being our default, we'll need to:

  • Add a default value for lucide_icon of shapes on the Category table
  • Add a NOT NULL constraint on lucide_icon

Edge Cases in UI

  • When you edit a subcategory, users can change the color to be different than the parent. This is because we have before_create :inherit_color_from_parent in the model, but really, we need this to be before_commit to cover both create + update flows + hide the color option in the UI if it is editing a subcategory.
  • When a user selects a preset color, then choose a custom color, the preset color remains selected in the UI (see video below):
CleanShot.2025-02-19.at.15.01.50.mp4

@syedbarimanjan
Copy link
Contributor Author

syedbarimanjan commented Feb 20, 2025

@zachgoll

Copy link
Contributor

@zachgoll zachgoll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After all comments are addressed and merge conflicts resolved, we'll run the tests and get this merged.

Functionality looks good!

Signed-off-by: Syed Bariman Jan <syedbarimanjan@gmail.com>
Copy link
Contributor

@zachgoll zachgoll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good! Looks like there is a failing check, so once resolved we're good to merge.

Signed-off-by: Syed Bariman Jan <syedbarimanjan@gmail.com>
Signed-off-by: Syed Bariman Jan <syedbarimanjan@gmail.com>
@syedbarimanjan
Copy link
Contributor Author

syedbarimanjan commented Feb 24, 2025

@zachgoll resolved the failing check and merged with main to resolve conflicts.

@zachgoll
Copy link
Contributor

@syedbarimanjan great, nice work! Let me know if you have any issues with the bounty payment.

@zachgoll zachgoll merged commit 95989a6 into maybe-finance:main Feb 24, 2025
5 checks passed
pranav7 pushed a commit to pranav7/maybe that referenced this pull request Mar 2, 2025
* resolve git issue

* Add new category flow

* Improve contrast checker

* make error message small

* update ui to match figma design

* realign color picker

* changes

* rename color picker controller to new category controller

* cleanup code

* cleanup code

* resize and realign icon avatar

* Fix js lint errors

Signed-off-by: Syed Bariman Jan <syedbarimanjan@gmail.com>

---------

Signed-off-by: Syed Bariman Jan <syedbarimanjan@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improvement: New Add Category Flow

4 participants