-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: support storing page ordering of folders in DB #850
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Datadog ReportBranch report: ✅ 0 Failed, 167 Passed, 34 Skipped, 37.6s Total Time |
@@ -11,6 +11,7 @@ export const ResourceType = { | |||
CollectionLink: "CollectionLink", | |||
CollectionPage: "CollectionPage", | |||
IndexPage: "IndexPage", | |||
PageOrder: "PageOrder", |
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.
Could _pages be used for potentially storing other page related metadata? If so, using a more generic name like PageMeta or PageSettings would be 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.
Hmm no, page-related metadata are stored within those individual pages. This is a page ordering that is tied to the folder and not to individual pages.
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.
Hmm understand, I just meant if there's potentially other use cases for _pages in future in which using a generic name now will help prevent migrations etc
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.
Renamed PageOrder to FolderMeta and _pages
to _meta
. I think we can have the option to have a CollectionMeta type in the future to control the ordering of items within the collection, but will need to be careful about the difference between this folder ordering meta vs normal folder metadata.
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.
lgtm, with one main comment on the naming of the resource type to be more generic. leave it to @dcshzj to take a call on this
f31e980
to
ae52b2f
Compare
Problem
We need to support page ordering within folders, but there is no way to represent this inside Studio.
Solution
Breaking Changes
Features:
_pages
permalink with a newPageOrder
resource type.PageOrder
resource from appearing in the list of pages when viewing a folder inside Studio.PageOrder
resource into account.Notes: