Skip to content
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

BREAKING CHANGE: Include collection pages in the Pages tab #64

Merged
merged 3 commits into from
Nov 20, 2019

Conversation

taufiq
Copy link
Contributor

@taufiq taufiq commented Nov 20, 2019

This PR does the following:

  1. Removes Collections tab and displays the displaced collection pages in the Pages tab instead
  2. Introduces a new modal for editing the frontmatter of the collection pages (CollectionPagesSettingsModal)
  3. Users who click on the page cards of collection pages will still be directed to edit on the /sites/:siteName/collections/:collectionName/:pageName endpoint instead of the default /sites/:siteName/pages/:pageName endpoint.

NOTE
This is a pull request that needs to be merged along with the PR for the backend or else it will break.

THIS WILL ONLY WORK WITH THE BACKEND BRANCH
`feat/flatten-collection-into-pages`.

This commit now introduces a new settings modal to handle CRUD
operations for collection pages and displays collection pages in the
`Pages` tab.
Since collection pages are shown on the `pages` tab, there is no need
for a separate `Collections` tab to show the various collection pages.
For context, when the user clicks on the collection page under the
`collections/:collectionName` endpoint, its sibling collection pages
gets passed into `location` of the router. The `EditCollectionPage` then
retrieves those pages and renders them  in the leftnav of the preview.

Since we are flattening the collections tab into the pages tab, we
currently do not keep track of the sibling collection pages of any
collection page. Hence this commit moves the logic to find the sibling
collection pages into `EditCollectionPage`.
@taufiq taufiq changed the title BREAKING CHANGE: Include collection pages in the Pages tab Include collection pages in the Pages tab Nov 20, 2019
@taufiq taufiq changed the title Include collection pages in the Pages tab BREAKING CHANGE: Include collection pages in the Pages tab Nov 20, 2019
Copy link
Contributor

@prestonlimlianjie prestonlimlianjie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@taufiq taufiq merged commit 50751fe into master Nov 20, 2019
@prestonlimlianjie prestonlimlianjie deleted the feat/flatten-collection-into-pages branch November 21, 2019 02:01
@kwajiehao
Copy link
Contributor

This PR also resolves issue #19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants