You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When using visual editing and setting up locations for documents, when a user creates a new post, the locations are empty.
When they add the fields required to generate the location, i.e. slug, so that it can show locations as '/slug', it doesn't reload the locations until the editor refreshes or re-opens the page in the Sanity structure tool.
This means I've had to account for this in training our editors, so they can then preview the content in presentation mode. Telling them to reload the page when creating new pages or editing the slug in Sanity, in order for the preview URL to be correct.
Describe the solution you'd like
It would be great if the locations were resolved dynamically as the user updates the page, without needing the additional step for a user to remember to reload the page in order to be able to preview it.
If a user changes the slug of a page, or any other field that the preview is dependent on, then the preview might no longer work, if the frontend depends on that information to render the page in the preview.
Describe alternatives you've considered
I've tried using both defineLocations and using a DocumentLocationsResolver but they only run once when the page is loaded, it would be good if this listened for page changes as the editor edits the page. So that the locations are always up to date.
Additional context
When creating a new post, and adding fields, the locations property does not show.
After refreshing the page, the location is shown, and editor can now use this to open presentation mode for that post.
Ideally, the editor wouldn't be required to refresh the page to be able to preview the content.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
When using visual editing and setting up locations for documents, when a user creates a new post, the locations are empty.
When they add the fields required to generate the location, i.e.
slug
, so that it can show locations as '/slug', it doesn't reload the locations until the editor refreshes or re-opens the page in the Sanity structure tool.This means I've had to account for this in training our editors, so they can then preview the content in presentation mode. Telling them to reload the page when creating new pages or editing the slug in Sanity, in order for the preview URL to be correct.
Describe the solution you'd like
It would be great if the locations were resolved dynamically as the user updates the page, without needing the additional step for a user to remember to reload the page in order to be able to preview it.
If a user changes the slug of a page, or any other field that the preview is dependent on, then the preview might no longer work, if the frontend depends on that information to render the page in the preview.
Describe alternatives you've considered
I've tried using both
defineLocations
and using aDocumentLocationsResolver
but they only run once when the page is loaded, it would be good if this listened for page changes as the editor edits the page. So that the locations are always up to date.Additional context
When creating a new post, and adding fields, the locations property does not show.
After refreshing the page, the location is shown, and editor can now use this to open presentation mode for that post.
Ideally, the editor wouldn't be required to refresh the page to be able to preview the content.
The text was updated successfully, but these errors were encountered: