-
Notifications
You must be signed in to change notification settings - Fork 315
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: add custom element disambiguation #1852
Conversation
Adds a customElementHelper to allow vendors to add a disambiguation to mgt element names Adds a custom mgtHtml wrapper overtop of html from lit
fixed React code generation
The updated storybook is available here |
remove disambiguation from analytics header
The updated storybook is available here |
The updated storybook is available here |
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.
Fantastic work @gavinbarron looks and works well for me.
…onent registration
The updated storybook is available here |
The updated storybook is available here |
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 really cool! From what I can see, with the default configuration it's backwards compatible, because the default prefix is mgt-
but offers the ability to define a solution-specific prefix. Are there any drawbacks that you're aware of that we should into consideration?
The updated storybook is available here |
The updated storybook is available here |
Co-authored-by: Musale Martin <[email protected]>
The updated storybook is available here |
Closes #1765
PR Type
Feature
Description of the changes
Adds the ability for developers to add a custom segment to the custom elements registered with the browser.
Provides a new
customElement
decorator to wrap the lit implementation and set tag prefixes appropriately.Updates all usages of customElement to use the mgt specific implementation
Adds a new
mgtHtml
string literal tag function to dynamically rewrite mgt tags as needed at runtime which wraps thehtml
tag function fromlit
Updates SCSS to avoid using element name based CSS selectors and adds classes to elements in markup where needed.
Updates React generator script to use base tag names.
Updates Mgt React wraper to add the appropriate prefix to tags being written to the DOM.
Updates React sample app to demonstrate usage of
customElementHelper.withDisambiguation('foo')
.PR checklist
yarn build
) and changes have been tested in at least two supported browsers (Edge + non-Chromium based browser)yarn setLicense
)Other information