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

Improve visualizer editing UX, or at least cache-bust fetching of gists #635

Closed
avaragado opened this issue Aug 27, 2019 · 1 comment
Closed

Comments

@avaragado
Copy link
Contributor

Bug or feature request?

Depends on your perspective... feels like a bug to me because unexpected things happen, but technically I'm requesting a new feature.

Description:

When you're logged in to the visualizer, you're effectively editing a gist: hitting Save adds a new revision to that gist. This suggests that any gist editing mechanism should be fine: just edit the gist in your favourite tool, ensure the gist id is in the URL in the browser, and reload. In particular, this would let you use your own editor, which is tuned to your fingers, and not the narrow black textarea provided by the visualizer. (Even better would be a VSCode extension to run the visualizer locally.)

However, this doesn't work very well. There's no 'reload gist' button in the visualizer, so after editing the gist outside the visualizer you must refresh the visualizer page - but doing so loses your auth to github, and also doesn't seem to load the updated gist anyway (due to browser caching, it seems).

(Bug) Expected result:

  • Browser refresh retains github auth, and reload gist from github

(Bug) Actual result:

  • Browser refresh loses github auth, and retains old gist content (because the browser's cached the original response; workaround is to keep browser dev tools open, which is not ideal)

(Bug) Potential fix:

  • Bust the browser cache when fetching the gist
  • Add a 'Reload' button alongside 'Update' and 'Save' for better UX
@davidkpiano
Copy link
Member

Browser refresh retains github auth

I don't want this to happen, as storing GitHub tokens in cookies or localStorage would be a potential security risk for this tool, and security comes first.

We should take the route of having a "Reload" button instead.

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

2 participants