Repository navigation
fix(next): supports root document view overrides as separate from default edit view - #7673
Merged
Merged
Conversation
jacobsfletch
marked this pull request as ready for review
August 14, 2024 16:59
Member
Author
|
An alternative to this would be to make this type a union of Payload Component and the views config. That way we could infer the types based on the presence of the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
We've since lost the ability to override the document view at the root-level. This was a feature that made it possible to override the entire document routing/view structure, including the document header/tabs and all nested routes within, i.e. the API route/view, the Live Preview route/view, etc. This is distinct from the "default" edit view, which only targets the component rendered within the "edit" tab. This regression was introduced when types were simplified down to better support "component paths" here: #7620. The
defaultkey was incorrectly used as the "root" view override. To continue to support stricter types and root view overrides, a newrootkey has been added to theviewsconfig.You were previously able to do this:
This is now done like this:
Some of the documentation was also incorrect according to the new component paths API.
Type of change
Checklist: