payload icon indicating copy to clipboard operation
payload copied to clipboard

feat: add functionality to replace the "Status" section in the document or global edit view

Open Spreizu opened this issue 11 months ago • 3 comments

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.

Spreizu avatar Feb 13 '25 15:02 Spreizu

Hi @paulpopus, is there anything I can do from my end to go forward with this PR?

Spreizu avatar Mar 15 '25 15:03 Spreizu

Sorry for bumping, but I've merged in the latest changes. This is still relevant in our case.

Spreizu avatar May 08 '25 05:05 Spreizu

@Spreizu no worries, will aim to review properly this week

paulpopus avatar May 12 '25 22:05 paulpopus

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

paulpopus avatar Dec 08 '25 19:12 paulpopus

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.

Spreizu avatar Dec 09 '25 07:12 Spreizu