Because the state related to tag/group data is parsed and re-rendered on getting features,
the local UI was slow to change and the user sometimes saw incorrect tag states (on saving).
Ideally, server would persist changes on input events if additional state parsing isn't needed...
Also, because the changes to state weren't adjusted properly, the UI of tags didn't reflect the changes made by the user.
Fixes
To fix this, I've adjusted the input events of tags to make adjustments to local features, which now persist when jumping between groups/images.
In addition, to fix the inconvenience of saving per tag, I've introduced a state (updatedTagFeatures) to keep track of features that have been changed and added a global save tags button (only shown when there are changes).
And I've added a loader to indicate that values are getting saved.
Overview:
Fixes tag state race conditions.
Problems
Fixes
features
, which now persist when jumping between groups/images.updatedTagFeatures
) to keep track of features that have been changed and added a global save tags button (only shown when there are changes).Related Jira tickets:
Testing Steps:
Deployed branch to https://taggit-tacc.github.io/
Image