-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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(nested collections): allow additional content in flatter structure #6498
base: main
Are you sure you want to change the base?
Conversation
This commit fixes decaporg#4972 to allow nested folders with additional content beyond an index file. Side effect: To keep the feature simple, this will now show index files as pages within a folder in NetlifyCMS. This enables creating additional files alongside the given index, but is a change in behavior from the current implementation. Co-authored-by: Eric Gade <[email protected]>
I’m not quite sure what the failed check "Required PR Labels" is, but I’m not able to assign or edit PR labels. I’d appreciate an assist! |
Hmm, looking at the build failure, it seems to be unrelated to this changeset.
|
Is there any update on this PR? This seems useful |
@ashishkharche I believe the pull request is ready for a team member to review. I suspect it is hard for the Netlify team to review pull requests at the moment due to the builds and tests being broken in CI. I reported that issue and got as far as I could get on fixing it in #6509, but that pull request also has yet to be reviewed. That’s the latest I know of on my end — apologies I can’t be of more help! |
@adunkman It's hard for @netlify/cms-maintainers to review because there is no one in that group. Nothing has been reviewed or merged since late May. Netlify support says the product team is deliberating whether to hire another maintainer or to stop maintaining altogether, and hope the community picks up the torch with a fork. Perhaps 18F would be interested? |
@bmackinney do you have a link to that conversation or was it a private message? |
Nevermind, I found it: https://answers.netlify.com/t/is-this-project-dead/70988 Thanks for asking the questions. There is so much here that needs to be addressed. |
Has any popular fork came out of this yet? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@adunkman (or anyone else involved) are you still interested in moving this forward? |
Yes, can you merge these changes as they make the nested collections far more intuitive and usable. I have tested the changes on a custom local build of Decap CMS and they work as described by the author of the PR. |
+1 on better nesting. I'm trying to have sub folders with files not named index.md in them and it doesn't look possible right now |
It would be so great to get this PR merged! Is there anything I can do to help moving this forward? /cc @demshy |
@fgnass NestedCollection.spec.js.snap has merge conflicts, could you solve them? Thanks! You can also add your review of the PR; it will be helpful for sure! |
Summary
This commit fixes #4972 by allowing nested folders with additional content beyond an index file.
Side effect: To keep the feature simple, this will now show index files as pages within a folder in NetlifyCMS. This enables creating additional files alongside the given index, but is a change in behavior from the current implementation. There’s a quick table explaining over in #4972 (comment), but please let me know if there are any questions.
Motivation
I’m working on a multilingual site which uses nested collections to manage regional content. The content is organized on disk by language, then region, then 4 files per region. Allowing additional content beyond an index file within nested collections (implementing #4972) allows NetlifyCMS to manage this content.
Test plan
There are test changes in this PR, because nested collections were originally asserted to work differently — as demonstrated by #4972 (comment), the current behavior is not very straightforward and as such the behavior change is intentional.
If you spot a hole in test coverage, I’d be happy to add tests!
Checklist
yarn format
.yarn test
.Here is a photo of my cat, Toulouse! 😻