-
-
Notifications
You must be signed in to change notification settings - Fork 168
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
Redirect 'GET on Preview' link to edit page #2904
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice fix! Looks good 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea of fixing that scary error screen... but I'm not sure if rendering the saved version for a preview link is the way to go.
If somebody copies the preview and shares it, they'd expect the unsaved changes to be shown, which we can't do.
Perhaps we could either show a nicer error/explanation why sharing the preview does not work that way, or redirecting to the backend 🤔
The thing is, the people grabbing these links and sharing them will not see this nicer error, because it already works for them. it only breaks for the people receiving the link, and i don't think they'll benefit from a link to the backend.. On the other hand, if we redirect it to the correct "Edit" page for that record.. At least you'd end up in the correct spot without having to dig much deeper. Would that be a good compromise? 🤔 |
@bobdenotter yes, that would make sense! Sure, I'm on board 🚂 🚋 🚋 |
GET
requests for Preview
@I-Valchev Updated! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Yesss, looks good! Let's roll.
Sometimes clients or editors paste links to specific pages with a URL they've copy/pasted from a preview. Like
https://example.org/preview/123
.This will give an error like:
This PR allows a
GET
request to that page (assuming it's published, similar to the existing "detail view")