Skip to content
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

remember the new fragment tile selection #226

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

csgeeek
Copy link
Contributor

@csgeeek csgeeek commented Feb 5, 2023

Signed-off-by: Balaji Yaswanth Vankala [email protected]

Related Tickets & Documents

What type of PR is this? (check all that apply)

  • 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:-

  1. IMPORT_JSON
  2. EMPTY_PAGE
  3. 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

Signed-off-by: Balaji Yaswanth Vankala <[email protected]>
@netlify
Copy link

netlify bot commented Feb 5, 2023

👷 Deploy request for carbon-components-builder pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit ca22290

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remember the new fragment radio tile selection
1 participant