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

Share button doesn't change page URL #105

Open
edemaine opened this issue May 10, 2022 · 5 comments
Open

Share button doesn't change page URL #105

edemaine opened this issue May 10, 2022 · 5 comments

Comments

@edemaine
Copy link
Contributor

As reported in Discord, clicking on the Share button copies the short URL to the clipboard, but doesn't change the page URL (window.location); it remains the long URL. This is confusing behavior.

On the deployed site, I don't even see the brief change in icon to a chain link anymore (but I do see it on a dev server, even though it's failing to do the PUT).

@amoutonbrady
Copy link
Member

Yeah I think we pushed the work I was doing on the share button a bit prematurely.
I reckon I'm being a bit inactive these days and its showing.
I'll try to investigate the issue, thanks for reporting!

@amoutonbrady
Copy link
Member

I misread the issue. There's no real issue. You are pointing out a behavior that seems confused (rightfully so!)
Do you have a better proposal than the actual implementation? I'm all hear :)

@edemaine
Copy link
Contributor Author

I'd propose the following behavior:

  1. After content doesn't change for a bit of time, the window.location URL updates to the long explicit form (#...) automatically. This just costs a little time but no storage, and ensures that the URL is almost always a representation of the current reality. (Currently it doesn't update until you click Share.)
  2. After clicking Share button, the short URL (?hash=...) is copied to clipboard (as currently) and the window.location URL changes to that as well. When the content changes again, the URL becomes the long form again (via Rule 1 above).

@edemaine
Copy link
Contributor Author

It seems like neither of the suggested behaviors are live on https://stage-playground.solidjs.com/scratchpad — is it OK to reopen this issue?

@trusktr
Copy link
Contributor

trusktr commented Sep 25, 2023

The share button changes the URL for me every time.

Screen.Recording.2023-09-25.at.1.19.45.PM.mov

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

No branches or pull requests

4 participants