-
Notifications
You must be signed in to change notification settings - Fork 2.9k
feat(react-drawer): release to 9.0.0 stable #29711
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(react-drawer): release to 9.0.0 stable #29711
Conversation
Perf Analysis (
|
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| Avatar | mount | 634 | 627 | 5000 | |
| Button | mount | 315 | 319 | 5000 | |
| Field | mount | 1120 | 1158 | 5000 | |
| FluentProvider | mount | 707 | 717 | 5000 | |
| FluentProviderWithTheme | mount | 73 | 86 | 10 | |
| FluentProviderWithTheme | virtual-rerender | 65 | 67 | 10 | |
| FluentProviderWithTheme | virtual-rerender-with-unmount | 70 | 79 | 10 | |
| MakeStyles | mount | 862 | 881 | 50000 | |
| Persona | mount | 1715 | 1696 | 5000 | |
| SpinButton | mount | 1407 | 1426 | 5000 |
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 2601b36:
|
📊 Bundle size reportUnchanged fixtures
|
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: aa664abe172b5ceedb63bafdc690ac2e82ab48db (build) |
change/@fluentui-react-drawer-3cfc5c74-8b22-419c-a72a-43ecad9c876f.json
Outdated
Show resolved
Hide resolved
change/@fluentui-react-components-03e7f032-b0d9-4221-8522-b7bfb9ffb223.json
Outdated
Show resolved
Hide resolved
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.
We should not expose APIs from preview components in APIs for stable components:
| open?: MotionShorthand<HTMLDivElement>; |
| motion: MotionState<HTMLDivElement>; |
Please update types to not reference @fluentui/react-motion-preview.
Co-authored-by: Martin Hochel <[email protected]>
Co-authored-by: Martin Hochel <[email protected]>
@layershifter Can you elaborate please?
|
@Hotell the same discussion happened in #29391. Currently, drawer components expose an API from preview package via If a breaking change in
However, now stable and preview packages linked by public interfaces. For example, I use import { OverlayDrawer } from "@fluentui/react-components" // 9.0.0
import { useMotion } from "@fluentui/react-motion-preview" // 0.4.0
function App() {
const motion = useMotion();
return <OverlayDrawer open={motion} />
}A break in import { OverlayDrawer } from "@fluentui/react-components" // 9.1.0
import { useMotion } from "@fluentui/react-motion-preview" // 0.4.0
function App() {
const motion = useMotion();
// 💥💥💥💥💥💥💥
// Builds breaks as `motion` type have been changed
return <OverlayDrawer open={motion} />
}It's fine to use |
|
thanks for providing needed context @layershifter , so basically what should be done here is to inline/copy that type from react-motion-preview within react-drawer component correct ? Then it's the owner responsibility to not break that type contract ( besides runtime contract that's happening behind the scenes ), because TS is structural something like this is easy doable do decouple boundaries with only 1 downside ( no DRY code ) |
Yeah, that works. @marcosmoura is there is a strict requirement to expose API for overrides? I mean this:
Which is basically If there is no such requirement now, we will have less constraints in future if we will just expose |
yup if possible, this would be ideal (drastically reducing that non DRY I mentioned in previous comments ) 🙏 |
We can remove, but some partners need to do the overrides to integrate with their apps. We can remove the possibility for overrides right now, but those partners will need to hold a little while we release the motion package to stable as well. |
* master: breaking(react-drawer): open now only accepts a boolean instead of MotionShorthand (microsoft#29736) fix (breadcrumb): Overflow examples refactoring (microsoft#29723) refactor(tools): replace deprecated apis (microsoft#29624) [Part 3] Update documentation content for all charts (microsoft#29727) chore: throws if FlatTree is used as a subtree (microsoft#29729) feat(react-storybook-addon-export-to-sandbox): make addon generic so it can be published and use by others (microsoft#29674) chore(TimePicker-compat): add bundle size fixture (microsoft#29717) applying package updates Move CredScanSuppression file to root so 1ESPT output task picks it up (microsoft#29722) fix(CI): increase pipeline agent timeout threshold to 90 minutes (microsoft#29710) fix(breadcrumb): examples and styles (microsoft#29679) chore(react-tree): stop unnecessary re-rendering when no actions are available (microsoft#29694) applying package updates
@layershifter @Hotell |
Hotell
left a comment
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.
🚢
|
@marcosmoura after #29736 we still have: fluentui/packages/react-components/react-drawer/src/shared/DrawerBase.types.ts Lines 31 to 33 in 667d05d
I mentioned it in the original message, too. Is there motivation to keep it as it? It's not so big issue as with Can you please replace |
good catch, I checked only api.md report which while import from that package it doesn't show its leaking to anything public.
welp looks like we cannot rely on that thing :). @marcosmoura let's refactor it to -import { MotionState } from '@fluentui/react-motion-preview';
type MotionState = { canRender: boolean; type: string }
export type DrawerBaseState = Required<Pick<DrawerBaseProps, 'position' | 'size'>> & {
- motion: MotionState<HTMLDivElement>;
+ motion: MotionState;
};though naked
While not breaking change on runtime, type checking would explode. -> IMO its not breaking change rather than fix, but we dont provide any kinds of codemods etc which might provide not the best v9 bump for our users. |




Release Drawer to stable. Drawer do not use the new
-previewpattern.