This repository was archived by the owner on Jul 27, 2025. It is now read-only.
Fixes issue with mapping values during the transactions import#1327
Merged
zachgoll merged 3 commits intomaybe-finance:mainfrom Oct 21, 2024
Merged
Conversation
- There's a default debounce timeout based on element type - You can parameterize debounce timeout on a data-attribute
iwfyou
approved these changes
Oct 21, 2024
zachgoll
approved these changes
Oct 21, 2024
Contributor
zachgoll
left a comment
There was a problem hiding this comment.
Thanks for tackling this one!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why?
At the final step of a transactions import, the summary showing how many new items will be added displays numbers that don’t match the options selected in the previous steps.
I imported a CSV with 2 rows, mapped every category, tag, and account, but the summary shows that some of those items will be created.
If I go back to the mapping step, I can see that some of the selected options were cleared.
The issue was caused by the debounce timeout in the auto-submit-form Stimulus controller. It waits 500ms to submit the form, so if you click the 'Next' button too quickly, the form doesn't get submitted, and the option isn't saved.
What?
I added a default debounce timeout that adjusts based on the element type, and also made it customizable by allowing a custom debounce timeout to be set through a data attribute
What should we test?
Select an item during the mapping step when importing transactions and quickly move to the next step. At the final step of the import, you should now see a 0 next to Categories, Accounts, and Tags.