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: require explicit component registration #2848

Merged
merged 1 commit into from
Nov 13, 2023

Conversation

gavinbarron
Copy link
Member

@gavinbarron gavinbarron commented Nov 13, 2023

Closes #

PR Type

  • Feature

Description of the changes

all components must now be registered by developers to ensure that they render a convenience registeration function of registerMgtComponents can register all components mgt-loader registers all components when loading the underlying scripts into the browser

BREAKING CHANGE: Developers must explicitly call the register function for all components used in their application. Importing from the root of @microsoft/mgt-components no longer has an automatic registration side effect.

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

BEGIN_COMMIT_OVERRIDE
feat!: require explicit component registration (#2848)

all components must now be registered by developers to ensure that they render
a convenience registeration function of registerMgtComponents can register all components
mgt-loader registers all components when loading the underlying scripts into the browser

BREAKING CHANGE: Developers must explicitly call the register function for all web components used in their application when using components from @microsoft/mgt-components. Importing from the root of @microsoft/mgt-components no longer has an automatic registration side effect. NOTE Components from @microsoft/mgt-react will automatically register the underlying web component when they are used for the first time.
END_COMMIT_OVERRIDE

all components must now be registered by developers to ensure that they render
a convenience registeration function of registerMgtComponents can register all components
mgt-loader registers all components when loading the underlying scripts into the browser

BREAKING CHANGE: Developers must explicitly call the register function for all components used in their application. Importing from the root of @microsoft/mgt-components no longer has an automatic registration side effect
Copy link
Contributor

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)

Copy link

🚀 New react-contoso sample application deployed here

Copy link

Code Coverage

Package Line Rate Branch Rate Complexity Health
mgt-components.src.components 80% 100% 0
mgt-components.src.components.mgt-contact 63% 100% 0
mgt-components.src.components.mgt-file 51% 100% 0
mgt-components.src.components.mgt-file-list 56% 100% 0
mgt-components.src.components.mgt-file-list.mgt-file-upload 49% 88% 0
mgt-components.src.components.mgt-messages 66% 100% 0
mgt-components.src.components.mgt-organization 47% 100% 0
mgt-components.src.components.mgt-person 79% 65% 0
mgt-components.src.components.mgt-person-card 64% 50% 0
mgt-components.src.components.mgt-profile 40% 100% 0
mgt-components.src.components.mgt-theme-toggle 100% 100% 0
mgt-components.src.components.sub-components.mgt-flyout 72% 53% 0
mgt-components.src.components.sub-components.mgt-spinner 100% 100% 0
mgt-components.src.graph 38% 89% 0
mgt-components.src.styles 92% 80% 0
mgt-components.src.utils 78% 20% 0
mgt-element.dist.es6.components.src.components 73% 80% 0
mgt-element.dist.es6.mock.src.mock 90% 72% 0
mgt-element.dist.es6.providers.src.providers 85% 69% 0
mgt-element.dist.es6.src 91% 80% 0
mgt-element.dist.es6.utils.src.utils 66% 69% 0
mgt-element.src 88% 100% 0
mgt-element.src.components 84% 100% 0
mgt-element.src.mock 81% 56% 0
mgt-element.src.providers 80% 85% 0
mgt-element.src.utils 71% 90% 0
Summary 65% (12380 / 19049) 64% (406 / 637) 0

Copy link

🚀 New react-contoso sample application deployed here

Copy link

📖 The updated storybook is available here

Copy link

📖 The updated storybook is available here

1 similar comment
Copy link

📖 The updated storybook is available here

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

Successfully merging this pull request may close these issues.

None yet

2 participants