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

Page is not rendered as modal when refreshed. #47

Open
andree-rehnberg opened this issue Dec 28, 2019 · 2 comments
Open

Page is not rendered as modal when refreshed. #47

andree-rehnberg opened this issue Dec 28, 2019 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@andree-rehnberg
Copy link

If I open a page as a modal and then refresh it, it stops being rendered as a modal and is instead just rendered as a regular page. In my case I want to always have the page displayed as a modal on top of a base page, even if the link refreshed or copied to be sent to someone.

Is there some way to force a page to always be displayed in a modal or is my only option to design the page to both fit a regular and modal style?

Example can be found in your demo site:
https://gatsby-starter-with-gatsby-plugin-modal-routing.netlify.com/

Click "Page 2 in Modal" and then refresh, it is then rendered as a regular page.

@stephanebruckert
Copy link

I think this is a UX choice. It doesn't make sense to open a modal through a direct link. You want to show a real page instead

@lsirivong
Copy link
Owner

Hi @andree-rehnberg, thanks for the note. This behavior is intentional for this plugin.

This is meant to mimic the behavior of sites like Instagram. For example browse a page such as https://www.instagram.com/verge/, click into a post. It opens as a modal. Refresh the page, and you are removed from the modal context.

I recognize there's some interest in this being the behavior (it's been requested before), so I'll leave this open for other folks to chime in on ideas on how this could be supported as an opt-in feature.

I'm not actively building Gatsby sites anymore, so I do not have much time or interest in working on this, but happy to review and adopt any contributions any folks might have!

@lsirivong lsirivong added enhancement New feature or request help wanted Extra attention is needed labels Jun 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants