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 Rename styles choice #1799

Closed
XavierVilars opened this issue Apr 11, 2023 · 1 comment · Fixed by #2199
Closed

Remember Rename styles choice #1799

XavierVilars opened this issue Apr 11, 2023 · 1 comment · Fixed by #2199

Comments

@XavierVilars
Copy link

XavierVilars commented Apr 11, 2023

Describe the bug
In the studio, renaming a token will not necessarely rename the according style. It seems the checkbox "Rename style" is unticked by default. it should ideally remember the last used choice.

To Reproduce
Steps to reproduce the behavior:

  1. Rename a token binded with a style in Figma
  2. click on validate
  3. check the rename style textbox
  4. Validate. At this point all is ok.
  5. Take another token binded with a style in Figma and rename it
  6. validate
  7. the tick box "rename style" is now already checked.
  8. Validate
  9. the style is not modify.

Expected behavior
It is good to keep the previous choice of the user. I'm modifying some token's name and I don't want to check and check again the same settings to validate. So, you just need to correct this bug.

Screenshots or Screencasts
image

@six7 six7 changed the title Style is not renamed even if the checkbox is checked in the validation popup. Remember Rename styles choice Apr 14, 2023
@six7 six7 moved this from 📥 Triage to 🔜 Next up in Tokens Studio for Figma Roadmap Apr 14, 2023
six7 added a commit that referenced this issue Aug 30, 2023
Fixes #2031
Fixes #2097
Fixes #1799


This set of changes includes improvements to the user experience and
state management, as well as bug fixes. The `ConfirmDialog` and `Input`
components were updated to ensure immediate focus on the input element
after rendering. The `useTokens` module and `EditTokenForm` component
now store the last used update mode when renaming tokens, improving
state management and UI. Two bug fixes were also included, related to
issues when renaming tokens or token groups.

* `src/app/components/Input.tsx`: `setTimeout` function removed and
`focus()` called directly on `htmlInputRef.current` to ensure immediate
focus on input element after rendering. (F6c8a7b5L3)
* `src/app/components/ConfirmDialog.tsx`: Improved UX by focusing on
first input field after `ConfirmDialog` is shown by removing setTimeout
function and adding `firstInput` to useEffect dependencies in
`ConfirmDialog.tsx`. (F7d9e2c8L1)
* `src/app/store/useTokens.tsx`: Stores last used update mode when
renaming tokens and groups, and UI now defaults to last used update mode
instead of current mode. (F5a6b1e4L1)
* `src/app/components/EditTokenForm.tsx`: Stores last used update mode
when renaming tokens, ensuring it is selected by default instead of
current mode. Improves state management and UI. (F2b5c8f1L1)
* `.changeset/curly-ravens-prove.md` and
`.changeset/young-kangaroos-brake.md`: Updated
`@tokens-studio/figma-plugin` to fix bug causing issues when renaming
tokens or token groups. (Bug fixes)
@github-project-automation github-project-automation bot moved this from 📤 Ready for dev to ✅ Done in Tokens Studio for Figma Roadmap Aug 30, 2023
@six7
Copy link
Collaborator

six7 commented Aug 30, 2023

Shipped in 1.37.10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

2 participants