remember the new fragment tile selection
Signed-off-by: Balaji Yaswanth Vankala [email protected]
Related Tickets & Documents
- Related Issue #203
- Closes #203
What type of PR is this? (check all that apply)
- [x] Feature
- [ ] Bug Fix
- [ ] Refactor
- [ ] Documentation Update
Scope
This PR enhances the user experience by remembering the fragment tile selection and auto-selecting the most used fragment type by default.
Implementation
After a fragment is submitted then the frequency will be stored in the localstorage inside an object fragmentSelectionCount via global state context. The state of the defaultSelected fragment radio tile will be fetched from the localstorage every time. Out of all, the one with max count will be assigned to the defaultSelected.
For this feature the auto-selected value will be one of the following:-
- IMPORT_JSON
- EMPTY_PAGE
- EMPTY_FRAGMENT
Screenshots/Recordings/Diagrams:
How to test
We can verify the fragment selection with the fragmentSelectionCount object in localstorage from browser console.
[optional] To-do before merge
[optional] To-do after merge
Deploy request for carbon-components-builder pending review.
Visit the deploys page to approve it
| Name | Link |
|---|---|
| Latest commit | ca22290ef20410144e09a95c3dc4aa8e7b037c4a |