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

1896 fetching other collections from preview #6523

Merged

Conversation

cdennington
Copy link
Contributor

Summary

Allowing users to access data from other collections whilst in the preview pane.

See the comments here: #1896

This is my first time contributing to this repo, so I'm not 100% across the code base, so feedback is welcome.

I've tested this on a project I am working on at the moment and it worked as expected:

  • I was able to pull in all posts to a listing page
  • I was able to render the header and footer which are separate collections on every page

Checklist

Please add a x inside each checkbox:

  • I have read the contribution guidelines.
  • Code is formatted via running yarn format.
  • Tests are passing via running yarn test.
  • The status checks are successful (continuous integration). Those can be seen below.

@cdennington cdennington requested a review from a team July 27, 2022 00:47
@pbredenberg
Copy link

Would love to see this feature in Netlify CMS. Anyone from the team interested in taking a look?

@nicksull
Copy link

This would be a great feature.

@stale
Copy link

stale bot commented Apr 26, 2023

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.

@martinjagodic
Copy link
Member

@cdennington are you still interested in moving this forward?

@cdennington
Copy link
Contributor Author

@martinjagodic I'd happily be involved in pushing this one out, what do you need from me? Other than fixing conflicts

@martinjagodic
Copy link
Member

@cdennington great. Please solve conflicts first and then we will review. Thanks!

@Boelensman1 Boelensman1 force-pushed the 1896-fetching-other-collections-from-preview branch from 22d09a7 to 134df13 Compare March 18, 2024 21:49
@cdennington cdennington requested a review from a team as a code owner March 18, 2024 21:49
Signed-off-by: Wigger Boelens <me@wigger.email>
@martinjagodic
Copy link
Member

@cdennington linter is failing. Please run npm run lint locally to see the problem.

Signed-off-by: Wigger Boelens <me@wigger.email>
@Boelensman1
Copy link
Contributor

@martinjagodic, cdennington didn't have the time to finish this, so I took over.

With the docs moving to a different repo, I guess I should just make a seperate pull request there to add the docs for this?

@martinjagodic
Copy link
Member

With the docs moving to a different repo, I guess I should just make a seperate pull request there to add the docs for this?

Yes please

@Boelensman1
Copy link
Contributor

Boelensman1 commented Mar 19, 2024

Added the pull request for the documentation (written by @cdennington) here: decaporg/decap-website#55.

Not sure why the macos build is failing, it seems to get stuck installing dependencies. No changes have been made to those.

@martinjagodic martinjagodic requested review from demshy and removed request for a team March 20, 2024 10:08
@demshy
Copy link
Member

demshy commented Mar 20, 2024

This is great @Boelensman1, MacOS build is a bit cranky sometimes, don't worry about it :)

Left you one little question otherwise this is good to go and can be released today/tomorrow with a few other PRs.

@demshy demshy merged commit 9e18ffb into decaporg:main Mar 20, 2024
10 checks passed
yuri-g-taboola referenced this pull request in taboola/decap-cms May 22, 2024
* feat(preview): successfully getting collection by name and slug

* feat(blog): cleanup EditorPreviewPane.js

* feat(preview): new function added to allow previews to fetch data from other collections

* feat(preview): running format and test

* feat(preview): add getCollection to types

Signed-off-by: Wigger Boelens <me@wigger.email>

* feat(preview): fix lint issues

Signed-off-by: Wigger Boelens <me@wigger.email>

---------

Signed-off-by: Wigger Boelens <me@wigger.email>
Co-authored-by: cdennington <charlie@design-id.tech>
Co-authored-by: Wigger Boelens <me@wigger.email>
Co-authored-by: Martin Jagodic <jagodicmartin1@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants