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

feat(next): adds support for edit view description components #9763

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

akhrarovsaid
Copy link
Contributor

@akhrarovsaid akhrarovsaid commented Dec 5, 2024

What?

This PR adds support for distinct edit view descriptions since there was clearly the infrastructure in place for it anyway. This also fixes an issue where collection descriptions were finding their way into document edit views.

Why?

To enable end-users to add their own custom components as descriptions in edit views.

How?

By allowing a new Description custom component in the admin.components.views.edit object.

Before:
Description-before--Payload.webm

After:
Description-after--Payload.webm

Notes:

  • I noticed that none of the custom components in renderDocumentSlots are actually getting passed default props. I decided it was likely out of scope for this PR, but can easily add this in. This was fixed.

Copy link
Contributor

@DanRibbens DanRibbens left a comment

Choose a reason for hiding this comment

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

I see this as a breaking change. In order to get this merged we need to fallback to existing components. In a future major version we can remove the extra collectionConfig?.admin?.components?.Description if we want to. For now somebody will bave to define a Description returning null as a workaround if they wanted to have a list view Description and not edit.Description.

Also, the PR needs documentation changes.

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.

2 participants