-
-
Notifications
You must be signed in to change notification settings - Fork 937
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use amount input on rules page instead of plain text field #2566
Use amount input on rules page instead of plain text field #2566
Conversation
✅ Deploy Preview for actualbudget ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Bundle Stats — desktop-clientHey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle. As this PR is updated, I'll keep you updated on how the bundle size is impacted. Total
Changeset
View detailed bundle breakdownAdded No assets were added Removed No assets were removed Bigger
Smaller No assets were smaller Unchanged
|
Bundle Stats — loot-coreHey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle. As this PR is updated, I'll keep you updated on how the bundle size is impacted. Total
Changeset No files were changed View detailed bundle breakdownAdded No assets were added Removed No assets were removed Bigger No assets were bigger Smaller No assets were smaller Unchanged
|
Hi @jfdoming Unfortunately, this is not yet working as expected. However, if I enter the value separated by a comma, the value is set to 0,00 after saving. I have created a video of the procedure to make it easier to understand: |
Tried it out and looks like the sign always turns into positive when updating a negative amount atm |
Hi @joel-jeremy, It's not about the signs. However, as soon as I enter the value separated by a comma (German notation), the value is not saved, but 0,00 instead. |
hey @ByteChild @joel-jeremy, I believe the fix to just use |
It looks fine now :) Thank you @jfdoming and @joel-jeremy |
Nice! That fixed the issue. Another one I see is the split rule's percent option is using the AmountInput component. I think that should stay as a regular input. Not sure how hard it would be to implement but maybe we can auto append |
Good idea! I added a basic implementation of the % formatting that seemed to work well in my basic testing. Can you have a look when you get the time and let me know if you have any concerns with this? It behaves a little differently than the |
When I set a fixed amount value e.g. 200 and then change to a percent amount, the default percent amount gets set to a large number (20000%) |
Ah, good catch. That's a latent bug that was hidden because everything was using
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a bug where percent results in a negative number when you switch from fixed amount and percent while the fixed amount input has a negative value in it.
Hmm, yeah I was aware of that one. I think it will be tricky to get right due to the way state flows, but I'll give it another crack |
Nice! The negative issue seems to be fixed now. I wonder if it makes sense to always just default the percent to 100% instead of converting the amount to a percent i.e. 20000 --> 20000% |
891eb94
to
e838b27
Compare
Functionally it's now working good! One nit I have UX wise is the movement of the cursor when you click on the input and also when you type non-numeric values. Makes it look like the input is flickering. Would it be better if we render a fixed % sign at the end of the percent input field instead of having the % as part of the input itself? |
I agree the UX could be improved a bit (I see a couple of things), but I think this is pretty good for a first go. I'd recommend merging this and then focus on various UX improvements in future PRs. |
There was feedback on the original rules-with-splits PR that amount inputs could use the featureful amount input instead of a plain text field. This PR updates that page to use the
AmountInput
component.