Skip to content

remember the new fragment tile selection#226

Open
csgeeek wants to merge 2 commits into
IBM:mainfrom
csgeeek:main
Open

remember the new fragment tile selection#226
csgeeek wants to merge 2 commits into
IBM:mainfrom
csgeeek:main

Conversation

@csgeeek

@csgeeek csgeeek commented Feb 5, 2023

Copy link
Copy Markdown
Contributor

Signed-off-by: Balaji Yaswanth Vankala balajiyaswanth.v@gmail.com

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 <balajiyaswanth.v@gmail.com>
@netlify

netlify Bot commented Feb 5, 2023

Copy link
Copy Markdown

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

Visit the deploys page to approve it

Name Link
🔨 Latest commit ca22290

Signed-off-by: Balaji Yaswanth Vankala <balajiyaswanth.v@gmail.com>
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