Open andree-rehnberg opened 4 years ago
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
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!
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.