-
Notifications
You must be signed in to change notification settings - Fork 811
Kinds #7468
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?
Kinds #7468
Conversation
β¦ for consistency, removed outdated warnings, and refined TypeScript integration details.
16/umbraco-cms/customizing/extending-overview/extension-types/kind.md
Outdated
Show resolved
Hide resolved
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 very good to me @bszyman. I made a couple of suggestions you can consider for improvements.
Regarding the one about using UmbExtensionManifestKind, you'll need to verify that, but it is what I see in the source code so even if the syntax you have works, if what I've suggested does too then I think it's better to align with what people might see if they look into the CMS source code.
16/umbraco-cms/customizing/extending-overview/extension-types/kind.md
Outdated
Show resolved
Hide resolved
16/umbraco-cms/customizing/extending-overview/extension-types/kind.md
Outdated
Show resolved
Hide resolved
16/umbraco-cms/customizing/extending-overview/extension-types/kind.md
Outdated
Show resolved
Hide resolved
16/umbraco-cms/customizing/extending-overview/extension-types/kind.md
Outdated
Show resolved
Hide resolved
|
Hi @bszyman Looks good, Ive added comments to Andy's comments above, just to confirm his perspectives. I would like to add for a Kind to show up correctly in TypeScript. Especially relevant if your kinds are to be available for others. Then it is important also to define Types for the Kind. For the particular example, it would look like this: This will give Intellisense when writing a Manifest of that Type and Kind. For it to be available for others, as in if you are doing a package, that would be a bigger story, properly requiring some article describing how you need to publish your package on NPM and make an export of the package types. So the above 'Global' types can be declared in the tsconfig for the customizatin using CMS & the fictive package. So similar to how we export extension-types, a package would need to do similar. See TSConfig of this part: https://docs.umbraco.com/umbraco-cms/customizing/development-flow#typescript-setup Using a package that you like to utilize the Types of β would result in a tsconfig looking something like this: I hope that perspective makes sense, so that does invite for a Article on |
|
@nielslyngsoe - Appreciate your suggestions! What I've done in my sample project is added a file
And this is my code, mostly copying what you provided. import type {
ManifestHeaderApp,
MetaHeaderAppButtonKind,
} from "@umbraco-cms/backoffice/extension-registry";
export interface CustomManifestHeaderAppButtonKind extends ManifestHeaderApp {
type: "customHeaderAppButton";
kind: "button";
meta: MetaHeaderAppButtonKind;
}
export interface CustomMetaHeaderAppButtonKind {
href: string;
label: string;
icon: string;
}
declare global {
interface UmbExtensionManifestMap {
CustomManifestHeaderAppButtonKind: CustomManifestHeaderAppButtonKind;
}
}TS doesn't like the
I want to make sure I'm clear/not misunderstanding:
|


π Description
The original article seemed like it was written by AI maybe? It was mostly correct, just a few changes and clarifications to make.
π Related Issues (if applicable)
#7425
β Contributor Checklist
I've followed the Umbraco Documentation Style Guide and can confirm that:
Product & Version (if relevant)
v16
Deadline (if relevant)
N/A
π Helpful Resources