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

Fix regression in list relation previews #1199

Merged

Conversation

Quicksaver
Copy link
Contributor

@Quicksaver Quicksaver commented Mar 27, 2018

- Summary
Closes #1198 - regression fix: PR #1087 broke relation lists preview.

- Test plan
This is hard, I haven't found any example in the demo that shows this. The ListControl component was using the forID property to check for metadata that has a structure like

{ "collection_name": { ... } }

but the changes to ensure forID uniqueness breaks this of course as the metadata doesn't have that unique string in the object's property names.

This fix ensures that ListControl uses the collection name without any unique string attached when checking for metadata.

- Description for the changelog
(Fix regression) previews for relation lists broken by #1087

@Quicksaver
Copy link
Contributor Author

cc @erquhart who reviewed #1087 so might be more familiar with that patch.

@verythorough
Copy link
Contributor

Deploy preview for netlify-cms-www ready!

Built with commit d6aded6

https://deploy-preview-1199--netlify-cms-www.netlify.com

@verythorough
Copy link
Contributor

Deploy preview for cms-demo ready!

Built with commit d6aded6

https://deploy-preview-1199--cms-demo.netlify.com

Copy link
Contributor

@erquhart erquhart left a comment

Choose a reason for hiding this comment

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

Thanks for following up on this @Quicksaver!

@erquhart erquhart merged commit b205134 into decaporg:master Mar 28, 2018
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.

Unique ids broke relation lists preview
3 participants