feat: add functionality to replace the "Status" section in the document or global edit view
What?
This PR adds the ability to replace the Status section of the document or global edit view, without the need to replace the whole Edit view.
Why?
In certain cases there may be a need to add custom elements before or after the original Status component. In our case, we need to replace the whole Status component to support custom locale publishing logic and also for additional status indicators for the users.
How?
In the docs package:
- Added a description of the Status component to the components section within both the collections and globals sections.
In the next package:
- Enabled rendering of the custom Status component.
- Modified the Live Preview components to include the Status component prop.
In the payload package:
- Introduced type definitions for the Status component.
- Implemented importMap generation for the Status component.
In the ui package:
- Modified the Edit view to pass the Status component to DocumentControls.
- Updated the DocumentControls component to accept and render a custom Status component if defined.
Hi @paulpopus, is there anything I can do from my end to go forward with this PR?
Sorry for bumping, but I've merged in the latest changes. This is still relevant in our case.
@Spreizu no worries, will aim to review properly this week
Looks like CI is failing, I have this PR on my todo to review if you can find the time to get this green + address the comments from copilot
Looks good to me otherwise
Looks like CI is failing, I have this PR on my todo to review if you can find the time to get this green + address the comments from copilot
Looks good to me otherwise
Thanks for feedback! I'll address the Copilot comments and try to resolve CI issues.