Skip to content
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: report custom element name collisions #2053

Merged
merged 5 commits into from
Feb 23, 2023

Conversation

gavinbarron
Copy link
Member

@gavinbarron gavinbarron commented Feb 22, 2023

Closes #2056

PR Type

  • Feature

Description of the changes

Provides custom element name collision detection and logging when using the customElement decorator that is part of @microsoft/mgt-element

PR checklist

  • Project builds (yarn build) and changes have been tested in at least two supported browsers (Edge + non-Chromium based browser)
  • All public APIs (classes, methods, etc) have been documented following the jsdoc syntax
  • Stories have been added and existing stories have been tested
  • Added appropriate documentation. Docs PR:
  • License header has been added to all new source files (yarn setLicense)
  • Contains NO breaking changes

Adds the following output to the console when using a v3 webpart without disambiguation and the tenant has mgt-spfx installed:
image

custom element name collisions are now detected before calling define()
logging is added to the console.error to help developers identify the collisions
includes version information to assist in troubleshooting
@ghost
Copy link

ghost commented Feb 22, 2023

Thank you for creating a Pull Request @gavinbarron.

This is a checklist for the PR reviewer(s) to complete before approving and merging this PR:

  • I have verified a documentation PR has been linked and is approved (or not applicable)
  • I have ran this PR locally and have tested the fix/feature
  • I have verified that stories have been added to storybook (or not applicable)
  • I have tested existing stories in storybook to verify no regression has occured
  • I have tested the solution in at least two browsers (Edge + 1 non-Chromium based browser)

@gavinbarron gavinbarron changed the title Feat/report name collisions feat: report custom element name collisions Feb 22, 2023
@gavinbarron gavinbarron changed the base branch from main to next/fluentui February 22, 2023 22:27
@gavinbarron gavinbarron marked this pull request as ready for review February 23, 2023 03:13
@github-actions
Copy link

The updated storybook is available here

Copy link
Contributor

@musale musale left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Extend customElement registration to detect name collisions
3 participants