Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

[Project Search] Fix duplicate sources#5165

Merged
jasonLaster merged 2 commits into
firefox-devtools:masterfrom
AlexisDeschamps:5159-fix-duplicate-sources
Jan 23, 2018
Merged

[Project Search] Fix duplicate sources#5165
jasonLaster merged 2 commits into
firefox-devtools:masterfrom
AlexisDeschamps:5159-fix-duplicate-sources

Conversation

@AlexisDeschamps
Copy link
Copy Markdown

@AlexisDeschamps AlexisDeschamps commented Jan 21, 2018

#5159

Summary of Changes

  • Removed loadAllFiles method
  • Started loading files in searchSources

Test Plan

Screenshots

Before:
image

After:
image

@AlexisDeschamps AlexisDeschamps changed the title 5159 fix duplicate sources [Project Search] Fix duplicate sources Jan 21, 2018
@jasonLaster
Copy link
Copy Markdown
Contributor

Looks great. I'll review more fully tuesday

.filter(source => isLoaded(source) && !isThirdParty(source));
.filter(source => !isThirdParty(source));
for (const source of validSources) {
await dispatch(loadSourceText(source));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

loadSourcetext calls isLoaded anyway, nice.

await dispatch(clearSearchResults());
await dispatch(addSearchQuery(query));
dispatch(updateSearchStatus(statusType.fetching));
await dispatch(loadAllSources());
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Like the shift in approach. Instead of loading everything up front we load them one by one.

@lukaszsobek
Copy link
Copy Markdown
Contributor

@lukaszsobek
Copy link
Copy Markdown
Contributor

lukaszsobek commented Jan 21, 2018

Edit: read comment below.

If we don't already have one it would be great to have a test that checks if the status is correctly updated after all sources were loaded.

@jbhoosreddy
Copy link
Copy Markdown
Contributor

@lukaszsobek I did the updateSearchStatus(statusType.done) refactor in a separate PR #5124. We could leave it there to prevent merge conflicts.

@jasonLaster
Copy link
Copy Markdown
Contributor

jasonLaster commented Jan 23, 2018

Hey @jbhoosreddy, @AlexisDeschamps could you do a rebase here when you have a chance

Alexis Deschamps added 2 commits January 22, 2018 20:22
Fixed duplicate sources bug

Fixed lint
@AlexisDeschamps
Copy link
Copy Markdown
Author

AlexisDeschamps commented Jan 23, 2018

@jasonLaster I completed a rebased.

@jasonLaster jasonLaster merged commit a986a9b into firefox-devtools:master Jan 23, 2018
jasonLaster pushed a commit to jasonLaster/debugger.html that referenced this pull request Jan 25, 2018
@AlexisDeschamps AlexisDeschamps deleted the 5159-fix-duplicate-sources branch February 2, 2018 14:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants