Add assign merchant rule for transactions #2174

Merged
ahatzz11 merged 2 commits from assign-merchat-rule into main 2025-05-02 19:30:31 +08:00
ahatzz11 commented 2025-04-29 04:37:39 +08:00 (Migrated from github.com)

This PR allows someone to set a merchant as part of a transaction rule. This fixes #2143.

One weird piece of UX in here is that you can't create a new merchant from this menu - this is true of other places that reference merchants as well (like the transaction drawer). It would be great to do this in all of the places that mention merchants becuase navigating out of a rule/transaction to make a merchant is kind of annoying, but that isn't part of this PR.

This PR allows someone to set a merchant as part of a transaction rule. This fixes #2143. One weird piece of UX in here is that you can't create a new merchant from this menu - this is true of other places that reference merchants as well (like the transaction drawer). It would be great to do this in all of the places that mention merchants becuase navigating out of a rule/transaction to make a merchant is kind of annoying, but that isn't part of this PR. <img src="https://github.com/user-attachments/assets/4442f580-6be2-4fdc-85e5-a3795492a60f" width="500">
zachgoll (Migrated from github.com) approved these changes 2025-05-02 19:30:22 +08:00
zachgoll (Migrated from github.com) left a comment

Looks good!

RE inline merchants: I agree that adding merchants inline would be nice. This is mainly a limitation with browser-native select inputs (vs. your typical React app with interactive dropdowns). We kept everything native during the initial app build to optimize for speed.

The future solution to this is to start building out some ViewComponent form elements such as SelectComponent to add to the design system.

But while Rails is very strong in the area of form building + simplicity, it doesn't have a great/standard answer for things like this like the React/Vue world does. This will be a fairly heavy lift with lots of edge cases, so had to kick this one down the road a bit until we got the core feature set launched.

Looks good! RE inline merchants: I agree that adding merchants inline would be nice. This is mainly a limitation with browser-native select inputs (vs. your typical React app with interactive dropdowns). We kept everything native during the initial app build to optimize for speed. The future solution to this is to start building out some ViewComponent form elements such as `SelectComponent` to add to the [design system](https://github.com/maybe-finance/maybe/tree/main/app/components). But while Rails is very strong in the area of form building + simplicity, it doesn't have a great/standard answer for things like this like the React/Vue world does. This will be a fairly heavy lift with lots of edge cases, so had to kick this one down the road a bit until we got the core feature set launched.
Sign in to join this conversation.