Closed dadiorchen closed 2 years ago
Hey @dadiorchen. I've had a PR for one of your previous issues. I recently noticed this. If it is still available I would love to work on this issue. I believe we can make use of cookies to solve the issue. We can have a middleware function that can check to see if the required cookie exists. Thank you!
@svihang8 sorry for the delay, thanks for what you've done for us, yes, please go forward and take this one. Because now we have adapted localStorage somewhere in this project, so I tend to use the same tech to handle this issue, is it okay? Please check this page: https://github.com/Greenstand/treetracker-web-map-client/search?q=storage
@dadiorchen with 'fullscreen' do you mean whether or not the embed
value in the url is true
?
@RubenSmn correct!
@RubenSmn this one is problematic, in some case we must use the URL to control the embed behavior.
BUT, maybe we can do in this way?
?embed=true
Another solution: https://github.com/Greenstand/treetracker-web-map-client/issues/707
BUT, maybe we can do in this way?
1. Open: http://localhost:3000/planters/940/trees/186734?embed=true 2. Display map in embedded mode 3. Save the mode status into cookie/localstorage 4. Jump to another page without `?embed=true` 5. Read the cookie/localstorage 6. Display map in embedded mode
@dadiorchen I think this is a good way to solve this issue
:tada: This issue has been resolved in version 2.0.0-beta.28 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:
Currently, we are using a query parameter embed: http://localhost:3000/planters/940/trees/186734?embed=true to indicate this is a fullscreen map, this approach has some downsides:
We should find another solution for this, either cookies or localStorage,
Some hints: