-
Notifications
You must be signed in to change notification settings - Fork 811
Register an entitySign and render an icon. #7457
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
base: main
Are you sure you want to change the base?
Conversation
|
|
||
| ## Displaying a Sign | ||
|
|
||
| To display a Sign in the backoffice, you register an entitySign extension and bind it to one or more flags using the forEntityFlags property. If you're using an icon variant, you must set kind: "icon" and provide both meta.iconName and meta.label, so the UI has the necessary visual and accessible information to render. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we somehow formulate/hint that its optional if you like to bind it with a flag. You can choose to have other things determining the appearance. :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated the text clarifying this. You mention something about splitting the documentation and moving the frontend part to the extension folder?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me @engijlr. I suggested a few small updates, partially addressing @nielslyngsoe's point in the copy.
I think it would be nice to present a second example under a heading like "Example: Rendering an Entity Sign with Custom Logic" where you show how to render a backoffice sign without server input. Presumably this won't have a forEntityFlags setting but will have a referenced .ts file where the logic is implemented. That'll handle the rest of Niel's point about showing that this isn't just an extension that depends on the data coming from the management API.
Maybe you can think of a good real-world example, but even an illustrative one adding a sign for any document that has been created in the last week would suffice. The create date for a document I believe is in the tree item response model, so you could read if from there,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, all looks good from my perspective @engijlr,
π Description
This PR explains how to register an entitySign, bind it with forEntityFlags, and render an icon.
π Related Issues (if applicable)
Relates to PR: umbraco/Umbraco-CMS#20328
β Contributor Checklist
I've followed the Umbraco Documentation Style Guide and can confirm that:
Product & Version (if relevant)
CMS 16.4/17
Deadline (if relevant)
Expect this to be published along with the RC for 16.4 or 17.