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

Future: (IDEA ADVANCED) Add button to behavior tab - Sync states/categories #460

Open
kaltinril opened this issue Jan 3, 2025 · 0 comments

Comments

@kaltinril
Copy link
Collaborator

kaltinril commented Jan 3, 2025

If you go through a lot of edits on a component, you can end up with breadcrumbs from past attempts at working on that control.

A potential useful feature (ask others not sure?) would be a "destructive" button that removed all categories, states, and variables set in them, essentially resetting the categories and states that exist. Not changing the variables inside those states though.

Meaning if you have these categories and states and behaviors:

Component:
Cat1
** state1
Cat2
** state2
** randomState
randomcat
** unusedstate

behavior:
Cat1
** state1
Cat2
** state2

Clicking the button would perform the following:

  1. Warn the user of the destructive nature, suggest they backup their files if they don't know what they are doing.
  2. Loop over the categories on the component
  3. If a category isn't in set of behaviors associated to the component (randomcat), add it to the "delete" list
  4. Automatically add all states under it (unusedstate) to the "delete" list
  5. Automatically add all variables that are set in those states to the "delete" list
  6. Loop over the states inside the Valid components
  7. If a state is found that is not part of the behaviors, add that state to the "delete" list
  8. Also, add any variables set to the "delete" list
  9. once all that is done, display the "delete" list to the user
  10. Have the user CONFIRM they want all that to be deleted
  11. (optional / advanced) make it so the user can check/uncheck if they don't want a specific they to be touched.

Outcome of clicking the button on the theoretical setup:

Component:
Cat1
** state1
Cat2
** state2

image

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

No branches or pull requests

1 participant