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

[core] fix(Overlay2): use mutable stack ref, fix document event listeners #6681

Merged
merged 4 commits into from
Jan 30, 2024

Conversation

adidahiya
Copy link
Contributor

@adidahiya adidahiya commented Jan 26, 2024

Fixes #6679

Checklist

  • Includes tests
  • Update documentation

Changes proposed in this pull request:

  • fix(Overlay2): improve overlay stack state management to fix document mousedown event handler

Reviewers should focus on:

Fixes the linked bug

Screenshot

@adidahiya
Copy link
Contributor Author

WIP fix useOverlayStack

Build artifact links for this commit: documentation | landing | table | demo

This is an automated comment from the deploy-preview CircleCI job.

@adidahiya
Copy link
Contributor Author

use mutable stack

Build artifact links for this commit: documentation | landing | table | demo

This is an automated comment from the deploy-preview CircleCI job.

@adidahiya adidahiya changed the title WIP fix useOverlayStack [core] fix(Overlay2): use mutable stack ref, fix document event listeners Jan 29, 2024
@adidahiya adidahiya marked this pull request as ready for review January 29, 2024 23:37
Comment on lines +27 to +28
<OverlaysProvider>
<HotkeysProvider>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to add docs about the ordering of these providers. will do that in a separate PR which adds <BlueprintProvider>

@adidahiya
Copy link
Contributor Author

fix lint: break import cycle

Build artifact links for this commit: documentation | landing | table | demo

This is an automated comment from the deploy-preview CircleCI job.

@@ -55,6 +55,9 @@ export interface OverlayInstance {
/** Document "focus" event handler which needs to be attached & detached appropriately. */
handleDocumentFocus: (e: FocusEvent) => void;

/** Document "mousedown" event handler which needs to be attached & detached appropriately. */
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

now that there's an appropriate global context manager to handle this kind of logic, we should consider refactoring this behavior to have a single handler for the whole overlay stack instead of separate handlers for each overlay which need to be attached/detached. that would likely be safer and less prone to memory leaks.

@adidahiya adidahiya merged commit def9459 into develop Jan 30, 2024
11 of 12 checks passed
@adidahiya adidahiya deleted the ad/fix-overlay-clicks branch January 30, 2024 00:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot select items inside overlay
1 participant