-
Notifications
You must be signed in to change notification settings - Fork 61
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
Remove public API usage of ComponentSlotStyle and redefine type internally #2996
Remove public API usage of ComponentSlotStyle and redefine type internally #2996
Conversation
CallWithChat bundle size is not changed.
|
Chat bundle size is not changed.
|
Calling bundle size is not changed.
|
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.
Great step forward to react 9!
|
||
import { IRawStyle } from '@fluentui/react'; | ||
|
||
/** |
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.
Would that be better to put this one in northstar wrapper?
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 did consider that but I'm actually against that as we shouldn't ever have publicly exported a fluent northstar interface and should have defined our own interface/used regular fluents in this package.
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.
(It also makes the bundling more difficult if we have a public API coming out of the northstar wrapper the way we rollup the api)
What
Redefine
ComponentSlotStyle
with interoperable type from fluentuiThis works because IRawStyle allows any
Record<string, any>
but has defined types for common CSS property (of which ComponentSlotStyle also supports) -- so is just a better version ofRecord<string, any>
for styles properties.Why
We are removing usage of fluent n-star (see #2988) to support react 18 (see #1900) and we need to not rely on this type.
How Tested
Checked for interopability: