Skip to content

'Back to Editor' links to the last opened project (Fixes #2175) #2178

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

Merged
merged 2 commits into from
May 3, 2023

Conversation

lindapaiste
Copy link
Collaborator

Fixes #2175

Changes:

  • "Back to Editor" links to the URL of the active sketch based on the Redux state.
  • If no sketch is opened, it links to the root / as before.

I have verified that this pull request:

  • has no linting errors (npm run lint)
  • has no test errors (npm run test)
  • is from a uniquely-named feature branch and is up to date with the develop branch.
  • is descriptively named and links to an issue number, i.e. Fixes #123

I do have a question with regards to the special handling of URLs for p5 examples, which is applied in the SketchList. Should that be applied here as well? Both versions of the URL work. If we want to prefer the "pretty" version then we can extract that logic into a utility function and use it in multiple places.

let url = `/${username}/sketches/${sketch.id}`;
if (username === 'p5') {
url = `/${username}/sketches/${slugify(sketch.name, '_')}`;
}

@raclim raclim merged commit d593125 into processing:develop May 3, 2023
@lindapaiste lindapaiste deleted the fix/back-to-editor branch August 8, 2023 02:02
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.

"Back to Editor" should return to your Sketch with the unique Sketch URL
2 participants