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

Extract tab lifecycle events #2123

Merged
merged 5 commits into from
Aug 31, 2023

Conversation

sammacbeth
Copy link
Collaborator

@sammacbeth sammacbeth commented Jul 24, 2023

Reviewer: @kzar

Description:

  • Currently, events that trigger updates to the data in tabManger global are strewn about several parts of the codebase.
  • This PR moves all these events into a single 'component', which is initialized on startup. This keeps all this code together in a single, short(ish) initialization function.
  • This also updates tabManager initialization, to load existing tabs ASAP (it was previously delayed behind several async startup processes), which should limit startup race-conditions.
  • This refactor will also help us make this code compatible with Safari in the feature, where the unsupported events here will have to be replaced.

@sammacbeth sammacbeth force-pushed the sam/tab-manager-component branch 2 times, most recently from 53f8866 to ebdda11 Compare July 24, 2023 08:00
@sammacbeth sammacbeth marked this pull request as ready for review July 24, 2023 08:31
@sammacbeth sammacbeth requested a review from kzar July 24, 2023 08:31
@jonathanKingston
Copy link
Collaborator

I think this is fine, just going to leave it out the latest build to reduce risk as people are away etc.

@sammacbeth sammacbeth force-pushed the sam/tab-manager-component branch from ebdda11 to 1be52da Compare August 23, 2023 08:02
@sammacbeth sammacbeth force-pushed the sam/tab-manager-component branch from f3e0fe9 to f067dca Compare August 31, 2023 07:07
Copy link
Collaborator

@jonathanKingston jonathanKingston left a comment

Choose a reason for hiding this comment

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

Cheers for the changes :)

@sammacbeth sammacbeth merged commit 21b1b0c into duckduckgo:main Aug 31, 2023
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.

4 participants