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

fix: consolidate person view types #2943

Merged
merged 4 commits into from
Jan 17, 2024
Merged

Conversation

gavinbarron
Copy link
Member

@gavinbarron gavinbarron commented Jan 9, 2024

Closes #2941

PR Type

  • Bugfix

Description of the changes

removes the PersonViewType enum in favor of the ViewType enum

BREAKING CHANGE: PersonViewType has been removed. 'avatar' is no longer a valid value for the 'view' attribute on the 'mgt-person' component

PR checklist

  • License header has been added to all new source files (yarn setLicense)
  • Contains NO breaking changes

Other information

removes the PersonViewType enum in favor of the ViewType enum

BREAKING CHANGE: PersonViewType has been removed. 'avatar' is no longer a valid value for the 'view' attribute on the 'mgt-person' component
@gavinbarron gavinbarron requested a review from a team as a code owner January 9, 2024 00:22
sebastienlevert
sebastienlevert previously approved these changes Jan 9, 2024
@sebastienlevert
Copy link
Contributor

I'd love to see a docs PR for this one.

@gavinbarron
Copy link
Member Author

Interestingly as I looked at this more closely using PersonViewType.avatar only worked due to an overlap of the enum numeric values between it and ViewType.image. Providing the string "avatar" to the view attribute only worked because of ViewType.image being the default when the supplied string couldn't be correctly converted to a ViewType.

This change is essentially eliminate a duplicate type that can cause confusion.

musale
musale previously approved these changes Jan 15, 2024
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-get 30% 100% 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 81% 64% 0
mgt-components.src.components.mgt-person-card 65% 50% 0
mgt-components.src.components.mgt-picker 78% 100% 0
mgt-components.src.components.mgt-profile 40% 100% 0
mgt-components.src.components.mgt-tasks-base 77% 100% 0
mgt-components.src.components.mgt-theme-toggle 100% 100% 0
mgt-components.src.components.mgt-todo 79% 100% 0
mgt-components.src.components.sub-components.mgt-arrow-options 71% 100% 0
mgt-components.src.components.sub-components.mgt-flyout 78% 53% 0
mgt-components.src.components.sub-components.mgt-spinner 100% 100% 0
mgt-components.src.graph 39% 89% 0
mgt-components.src.styles 92% 80% 0
mgt-components.src.utils 79% 19% 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% 73% 0
mgt-element.dist.es6.src 91% 80% 0
mgt-element.dist.es6.utils.src.utils 66% 69% 0
mgt-element.src 93% 40% 0
mgt-element.src.components 78% 100% 0
mgt-element.src.mock 81% 56% 0
mgt-element.src.providers 83% 91% 0
mgt-element.src.utils 71% 90% 0
Summary 66% (14249 / 21595) 64% (429 / 667) 0

@gavinbarron gavinbarron enabled auto-merge (squash) January 16, 2024 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[BUG] mgt-person has two possible enums for 'view'
3 participants