Feature addition: Color fill star icon when toggled to favorite #553
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.
Description
The current version makes it difficult for the end-user to identify if a starred note is actually added to favorites or not, this is because there's no UI change when a note is starred from the bottom menu bar, this would make the user click the star option multiple times which is a bad UX. A simple fix would be to reflect the changes when a note is added/removed from favorites, like filling the star color when a note is toggled to be favorite, and remove the filling when it is removed from favorites.
This PR adds this feature to improve the UX, and also this behavior is consistent across all the components (Bottom menu bar, Notes list and, context menu).
The toggle state is also accessed from the redux store(Where required) instead of having a separate function that determines the toggle state. Moreover, this is achieved, without having to make any changes or updates to the stylesheets, by making use of
fill
props of the icon.Closes #511
Browser checklist
This PR has been tested in the following browsers:
Testing checklist