-
Notifications
You must be signed in to change notification settings - Fork 308
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!: convert enums to string unions #2962
Conversation
All enums used as properties on components have been converted to string union types refactor: ViewType is now a string union type and not an enum BREAKING CHANGE: ViewType is now a string union type and not an enum refactor: UserType is now a string union type and not an enum BREAKING CHANGE: UserType is now a string union type and not an enum refactor: PersonType is now a string union type and not an enum BREAKING CHANGE: PersonType is now a string union type and not an enum refactor: GroupType is now a string union type and not an enum BREAKING CHANGE: GroupType is now a string union type and not an enum refactor: groupType property on MgtPeoplePicker is now GroupType[] BREAKING CHANGE: groupType property on MgtPeoplePicker is now a GroupType[] not a GroupType that is a bitmask of the desired group types. Developers using the group-type attribute will find the behavior unchanged. refactor: avatarType renamed to AvatarType and converted to string union type BREAKING CHANGE: the avatarType eunm has been renamed to AvatarType for consistency and converted to a string union type refactor: ResponseType for mgt-get converted to string union type from enum BREAKING CHANGE: the ResponseType for mgt-get is now a string union type and not an enum refactor: PersonCardInteraction is now a string union type and not an enum BREAKING CHANGE: PersonCardInteraction is now a string union type and not an enum
🚀 New react-contoso sample application deployed here |
1 similar comment
🚀 New react-contoso sample application deployed here |
📖 The updated storybook is available here |
1 similar comment
📖 The updated storybook is available here |
…neration in Storybook
🚀 New react-contoso sample application deployed here |
📖 The updated storybook is available here |
Signed-off-by: Martin Musale <martinmusale@microsoft.com>
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.
I really like the changes this adds in MGT usage especially for react. I made updates to storybook usage and it's good to go!
🚀 New react-contoso sample application deployed here |
📖 The updated storybook is available here |
This impacts directly #2934. We should wait for this to be merged before we merge the big storybook changes. |
🚀 New react-contoso sample application deployed here |
|
📖 The updated storybook is available here |
Thank you for catching those, I got the ones in the tests, but totally didn't think to double check the casing in the stories |
Closes #2942
PR Type
Description of the changes
rework all enum based component attribute properties as string unions for consistency between react and web components
PR checklist
yarn build
) and changes have been tested in at least two supported browsers (Edge + non-Chromium based browser)yarn setLicense
)Other information
There are many breaking changes in this PR for React consumers of the library, this simplifies the usage of the components
Old style:
Old style:
Thanks to the use of string unions we still get intellisense and type checking on these props, they're just simpler to use and align to the web component attributes e.g.