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

Switching from URL to Local Storage does not make tokens writable #1279

Closed
alecgeatches opened this issue Sep 13, 2022 · 2 comments · Fixed by #1450
Closed

Switching from URL to Local Storage does not make tokens writable #1279

alecgeatches opened this issue Sep 13, 2022 · 2 comments · Fixed by #1450
Assignees
Labels
bug Something isn't working 👀 triage

Comments

@alecgeatches
Copy link

alecgeatches commented Sep 13, 2022

Describe the bug

After switching from a URL sync to local document storage, tokens are not changeable until refreshing the page.

I'm making a short tutorial for Figma Tokens. Ideally it would use a GitHub remote, but I want to exclude some of the trickier details (like getting a PAT) so I'm using a URL storage instead to get tokens into Figma. Ideally, users should be able to import via a URL and then switch to local document storage to be able to begin editing tokens right away.

To Reproduce

  1. In Figma Tokens -> Settings, add a Token Storage URL. For the video below, I used this gist:

    https://gist.githubusercontent.com/alecgeatches/d9831e259c06a132e7c7ab9cb52e9454/raw/5cbe4d2796341b6c29acdf7a135f571fc6674cda/tokens.json
    
  2. View tokens. Note that tokens are not editable as expected.

  3. Switch to Settings, and set token storage to "Local Document".

  4. Go back to tokens. See that the tokens are not editable.

  5. Refresh the page.

  6. Go to Figma Tokens -> Tokens. Note that the tokens are now editable.

Video of these reproduction steps below:

switch-to-local-storage.mp4

Expected behavior

At step 4, after switching to local document storage, tokens should be editable.

Figma file (optional)

Here is the Figma file used in the video: https://www.figma.com/file/5NZf8UfaZCPhcZRTjpRfmX/Material-3-Design-Kit---Figma-Tokens-Example

JSON (optional)

The token gist is available here: https://gist.github.com/alecgeatches/d9831e259c06a132e7c7ab9cb52e9454

Thank you!

@alecgeatches alecgeatches changed the title Switching to local storage does not make tokens writable Sep 13, 2022
@richardhuf84
Copy link

I've experienced the same issue. As a workaround, logging out of Figma, and logging back in, makes the local document tokens editable.

@six7
Copy link
Collaborator

six7 commented Sep 24, 2022

Also reopening the plugin should do the trick, but agree that this is not desirable and something we should fix. Thanks for creating this!

@six7 six7 added the bug Something isn't working label Sep 24, 2022
@swordEdge swordEdge self-assigned this Nov 22, 2022
@six7 six7 mentioned this issue Dec 5, 2022
@six7 six7 closed this as completed Jan 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 👀 triage
4 participants