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

Fix 3146 - editor occassionaly doesn't jump to a line#3147

Merged
bomsy merged 1 commit into
firefox-devtools:masterfrom
jasonLaster:align-line-fix
Jun 9, 2017
Merged

Fix 3146 - editor occassionaly doesn't jump to a line#3147
bomsy merged 1 commit into
firefox-devtools:masterfrom
jasonLaster:align-line-fix

Conversation

@jasonLaster

Copy link
Copy Markdown
Contributor

Associated Issue: #3146

Summary of Changes

This fixes an annoying issue where the debugger would occasionally forget to jump to a line. the issue was that when you wanted to go to a source that was hidden, the first attempt would be to go to the line, then a second attempt would be to move the tab. The second attempt cleared the line number. The fix is to introduce a new action

} else if (selectedSource.get("error")) {
this.showMessage(selectedSource.get("error"));
} else if (this.props.selectedSource !== selectedSource) {
this.showSourceText(selectedSource, selectedLocation);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

decided to drop some sourceText refs while i was here

Comment thread src/utils/editor/index.js
function isTextForSource(sourceText) {
return !sourceText.get("loading") && !sourceText.get("error");
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this method was not helpful :)

Comment thread src/reducers/sources.js
return { id: source.id, loading: true };
} else if (action.status === "error") {
return { error: action.error, loading: false };
return { id: source.id, error: action.error, loading: false };

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this fixes a bug where source wasn't getting these field because it couldn't merge w/o an id

@codecov

codecov Bot commented Jun 9, 2017

Copy link
Copy Markdown

Codecov Report

Merging #3147 into master will decrease coverage by 0.19%.
The diff coverage is 11.76%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master   #3147     +/-   ##
========================================
- Coverage   47.49%   47.3%   -0.2%     
========================================
  Files          97      95      -2     
  Lines        4009    4004      -5     
  Branches      825     825             
========================================
- Hits         1904    1894     -10     
- Misses       2105    2110      +5
Impacted Files Coverage Δ
src/utils/editor/index.js 13.33% <ø> (+0.56%) ⬆️
src/actions/sources.js 50.62% <0%> (-0.65%) ⬇️
src/components/Editor/index.js 20.16% <0%> (-0.11%) ⬇️
src/reducers/sources.js 78.37% <50%> (-1.76%) ⬇️
src/utils/pretty-print/index.js 40% <0%> (-5.46%) ⬇️
src/utils/parser/index.js 100% <0%> (ø) ⬆️
src/components/Editor/SearchBar.js 22.11% <0%> (ø) ⬆️
src/utils/search/utils/build-query.js
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eb87e77...25b61a8. Read the comment docs.

@codecov

codecov Bot commented Jun 9, 2017

Copy link
Copy Markdown

Codecov Report

Merging #3147 into master will decrease coverage by 0.07%.
The diff coverage is 11.76%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3147      +/-   ##
==========================================
- Coverage   47.49%   47.42%   -0.08%     
==========================================
  Files          97       97              
  Lines        4009     4013       +4     
  Branches      825      825              
==========================================
- Hits         1904     1903       -1     
- Misses       2105     2110       +5
Impacted Files Coverage Δ
src/utils/editor/index.js 13.33% <ø> (+0.56%) ⬆️
src/actions/sources.js 50.62% <0%> (-0.65%) ⬇️
src/components/Editor/index.js 20.16% <0%> (-0.11%) ⬇️
src/reducers/sources.js 78.37% <50%> (-1.76%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eb87e77...5dd237c. Read the comment docs.

@bomsy bomsy left a comment

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.

LGTM!

@bomsy bomsy merged commit bd8592c into firefox-devtools:master Jun 9, 2017
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.

2 participants