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

Aux window: move away from globals that need to be contextual #195888

Closed
1 task
bpasero opened this issue Oct 18, 2023 · 4 comments
Closed
1 task

Aux window: move away from globals that need to be contextual #195888

bpasero opened this issue Oct 18, 2023 · 4 comments
Assignees
Labels
debt Code quality issues workbench-auxwindow Issues related to use of auxiliary ("floating") windows.
Milestone

Comments

@bpasero
Copy link
Member

bpasero commented Oct 18, 2023

With floating windows, there is not just one window or document but one per window. Global use of window and document should cause a ESLint warning and utilities should be provided as alternatives.

Adoptions

  • $window

//cc @alexdima

@bpasero bpasero added debt Code quality issues workbench-auxwindow Issues related to use of auxiliary ("floating") windows. labels Oct 18, 2023
@bpasero bpasero added this to the On Deck milestone Oct 18, 2023
@bpasero bpasero changed the title Aux window: move away from global window, document usages Aux window: move away from global window, document and globals usages Nov 1, 2023
@bpasero bpasero modified the milestones: On Deck, November 2023 Nov 6, 2023
@bpasero bpasero changed the title Aux window: move away from global window, document and globals usages Aux window: move away from globals that need to be contextual Nov 7, 2023
@bpasero
Copy link
Member Author

bpasero commented Nov 8, 2023

After discussion with Jo: maybe we could patch setTimeout to always run in the active window. This would ensure that throttling does not apply at least for most short living timeouts.

Pending investigation what happens when a window closes that has a timer associated.

@bpasero
Copy link
Member Author

bpasero commented Nov 9, 2023

More on setTimeout: we could patch the global window method to schedule the callback on all opened window and then cancel it for the first winner. We would in addition have to schedule it for new windows opening with the diff of the duration.

@bpasero bpasero modified the milestones: November 2023, On Deck Nov 13, 2023
@bpasero bpasero modified the milestones: On Deck, December 2023 Dec 1, 2023
@bpasero bpasero modified the milestones: December / January 2024, On Deck Dec 15, 2023
@bpasero
Copy link
Member Author

bpasero commented Jan 29, 2024

@bpasero bpasero closed this as completed Jan 29, 2024
@bpasero bpasero modified the milestones: On Deck, February 2024 Jan 29, 2024
@rebornix
Copy link
Member

rebornix commented Feb 5, 2024

@bpasero I fixed the $window usage in notebook now.

@microsoft microsoft locked and limited conversation to collaborators Jun 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debt Code quality issues workbench-auxwindow Issues related to use of auxiliary ("floating") windows.
Projects
None yet
Development

No branches or pull requests

3 participants