-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[core] feat: OverlaysProvider #6674
Conversation
WIP continue fixing Overlay2 testsBuild artifact links for this commit: documentation | landing | table | demoThis is an automated comment from the deploy-preview CircleCI job. |
renderPageActions={this.renderPageActions} | ||
renderViewSourceLinkText={this.renderViewSourceLinkText} | ||
/> | ||
<OverlaysProvider> |
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.
TODO in a future PR: expose a <BlueprintProvider>
which does all 3
fix Overlay2 testsBuild artifact links for this commit: documentation | landing | table | demoThis is an automated comment from the deploy-preview CircleCI job. |
Fix core:iso test:Build artifact links for this commit: documentation | landing | table | demoThis is an automated comment from the deploy-preview CircleCI job. |
Overlay2 backcompatBuild artifact links for this commit: documentation | landing | table | demoThis is an automated comment from the deploy-preview CircleCI job. |
address self-review, attempt to fix testBuild artifact links for this commit: documentation | landing | table | demoThis is an automated comment from the deploy-preview CircleCI job. |
Fix testsBuild artifact links for this commit: documentation | landing | table | demoThis is an automated comment from the deploy-preview CircleCI job. |
@@ -73,6 +75,7 @@ | |||
"@blueprintjs/node-build-scripts": "workspace:^", | |||
"@blueprintjs/test-commons": "workspace:^", | |||
"@testing-library/react": "^12.1.5", | |||
"@types/use-sync-external-store": "0.0.6", |
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.
note that this does not need to be in "dependencies" because it's not exposed in the generated types:
// useLegacyOverlayStack.d.ts
import React from "react";
import { type OverlayStackAction } from "../../context/overlays/overlaysProvider";
import type { UseOverlayStackReturnValue } from "./useOverlayStack";
/**
* Public only for testing.
*/
export declare const dispatch: React.Dispatch<OverlayStackAction>;
/**
* Legacy implementation of a global overlay stack which maintains state in a global variable.
* This is used for backwards-compatibility with overlay-based components in Blueprint v5.
* It will be removed in Blueprint v6 once `<OverlaysProvider>` is required.
*
* @see https://github.com/palantir/blueprint/wiki/Overlay2-migration
*/
export declare function useLegacyOverlayStack(): UseOverlayStackReturnValue;
revert stopPropagationEvents removalBuild artifact links for this commit: documentation | landing | table | demoThis is an automated comment from the deploy-preview CircleCI job. |
Follow-up to #6656
Checklist
<Dialog>
,<Drawer>
,<Popover>
,<Omnibar>
Changes proposed in this pull request:
<OverlaysProvider>
component anduseOverlayStack()
hook to manage global overlay stack statereact-uid
library to generate ids for Overlay2 instances<OverlayProvider>
by utilizinguseSyncExternalStore()
(requires shimming in React 16) to reference overlay state in a global variableuseOverlayStack()
with and without the suggested provider contextReviewers should focus on:
No regressions in overlay-based components