8000 [Enhancement] Encode the full view state in the URL · Issue #1005 · zbycz/osmapp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[Enhancement] Encode the full view state in the URL #1005

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

Open
2 of 7 tasks
ManDay opened this issue Apr 26, 2025 · 3 comments
Open
2 of 7 tasks

[Enhancement] Encode the full view state in the URL #1005

ManDay opened this issue Apr 26, 2025 · 3 comments

Comments

@ManDay
Copy link
ManDay commented Apr 26, 2025

I've not been able to obtain an URL which would share the current view, including

(list possibly incomplete). Optimally, the current view in its entirety would be constantly reflected by the URL as shown in the address bar ( cf. #119 ). Alternatively, a "share"/"link to" feature would seem like an intuitive and commonplace implementation.

@amenk
Copy link
Contributor
amenk commented May 11, 2025

Maybe in a general share/link feature it is easier to implement. Also to consider, that if OsmApp is installed as PWA, the current URL is not really visible.

@zbycz
Copy link
Owner
zbycz commented May 20, 2025

I am not sure about reflecting all of the app state in the URL. It feels like it can easily become too long. Also browser history events could be spammed.

Adding selected ones in the share dialog - possibly optionally, could be feasible. The parameters could be consumed only once on the app load and then deleted from the URL.

@ManDay
Copy link
Author
ManDay commented May 20, 2025

Thank you for the responses. A share/link feature would certainly cover that use case fully and also be available for PWA, as you said @amenk .

On the other hand -- and I just mention this for the sake of completeness, not because I'd be opposed to the share/link idea in any way -- the address bar/URL/history stack would seem to be the appropriate place to reflect the entire state of the current view, despite the URL possibly becoming long, in my opinion.

Put differently: If the address bar does not update with the current view, what other purpose would it have? What would motivate cutting it down to an easily readable/typable string which does reflect the current state, as it may be reproduced elsewhere? Personally, I've never felt the need to have a "simple" URL in the address bar, as long as it satisfies the following criteria:

  • it doesn't contain sensitive information
  • it is human-readable
  • it doesn't contain useless information

E.g. I'm sceptical when copying an amazon.com link with opaque, long strings, but I have no concern with an URL of the sort ...?x=...&y=...&z=...&layer=...&selected=....

Meanwhile, an URL which omits something which I want to share is entirely useless to me. Therefore, I see no reason to simplify it for aesthetic (?) reasons.

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

3 participants
0