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!: split config and permission methods out of mgt-person-card #2840

Merged
merged 3 commits into from
Nov 10, 2023

Conversation

gavinbarron
Copy link
Member

@gavinbarron gavinbarron commented Nov 10, 2023

Closes #2839

PR Type

  • Bugfix
  • Feature

Description of the changes

splits out the logic for cacluating the scopes required for the mgt-person-card into a separate function and file splits the static config for MgtPersonCard into a separate class changes the schema of the config for MgtPersonCard fixes an issue where setting isSendMessageVisible to false did not stop the quick message ui from rendering adds tests to validate the permission sets

BREAKING CHANGE: MgtPersonCard no longer has a static config property.This config has been moved to the MgtPersonCardConfig class to allow developers to import the config and associated getMgtPersonCardScopes function at the top level of their applicaiton without automatically adding the weight of the full mgt-person-card component and dependencies to the entry file for their applications.
BREAKING CHANGE: The organization section for configuring MgtPersonCard may no longer be set to false, use undefined instead.

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

Other information

BEGIN_COMMIT_OVERRIDE
feat!: split config and permission methods out of mgt-person-card (#2840)

splits out the logic for cacluating the scopes required for the mgt-person-card into a separate function and file
splits the static config for MgtPersonCard into a separate class
fixes an issue where setting isSendMessageVisible to false did not stop the quick message ui from rendering
adds tests to validate the permission sets

BREAKING CHANGE: MgtPersonCard no longer has a static config property.This config has been moved to the MgtPersonCardConfig class to allow developers to import the config and associated getMgtPersonCardScopes function at the top level of their applicaiton without automatically adding the weight of the full mgt-person-card component and dependencies to the entry file for their applications.

feat!: change schema of organization section in MgtPersonCardConfig (#2840)

BREAKING CHANGE: The organization section for configuring MgtPersonCard may no longer be set to false, use undefined instead.
BEGIN_COMMIT_END

…-card

splits out the logic for cacluating the scopes required for the mgt-person-card into a separate function and file
splits the static config for MgtPersonCard into a separate class
changes the schema of the config for MgtPersonCard
fixes an issue where setting isSendMessageVisible to false did not stop the quick message ui from rendering
adds tests to validate the permission sets

BREAKING CHANGE: MgtPersonCard no longer has a static config property.This config has been moved to the MgtPersonCardConfig class to allow developers to import the config and associated getMgtPersonCardScopes function at the top level of their applicaiton without automatically adding the weight of the full mgt-person-card component and dependencies to the entry file for their applications.
BREAKING CHANGE: The organization section for configuring MgtPersonCard may no longer be set to false, use undefined instead.
Copy link

🚀 New react-contoso sample application deployed here

Copy link

📖 The updated storybook is available here

@gavinbarron gavinbarron enabled auto-merge (squash) November 10, 2023 18:09
Copy link
Contributor

@sebastienlevert sebastienlevert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing!

Copy link

📖 The updated storybook is available here

@gavinbarron gavinbarron merged commit 8177699 into main Nov 10, 2023
8 checks passed
@gavinbarron gavinbarron deleted the fix/person-card-config-and-permissions branch November 10, 2023 18:17
Copy link

Code Coverage

Package Line Rate Branch Rate Complexity Health
mgt-components.src.components 81% 100% 0
mgt-components.src.components.mgt-contact 68% 83% 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 66% 47% 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 79% 28% 0
mgt-element.dist.es6.components.src.components 73% 79% 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% (12445 / 19049) 64% (416 / 649) 0

Copy link

🚀 New react-contoso sample application deployed 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.

Using the MgtPersonCard.config static at the root of an application pulls a lot of weight into the entry file
2 participants