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

[WIP] Refactor Preview#3057

Merged
jasonLaster merged 5 commits into
firefox-devtools:masterfrom
jasonLaster:slege
Jun 1, 2017
Merged

[WIP] Refactor Preview#3057
jasonLaster merged 5 commits into
firefox-devtools:masterfrom
jasonLaster:slege

Conversation

@jasonLaster
Copy link
Copy Markdown
Contributor

@jasonLaster jasonLaster commented Jun 1, 2017

Associated Issue: #3053

Summary of Changes

  • stop getting variables from pause data
  • move logic to an ast selection action
  • stop using hidden expressions

Comment thread src/components/Editor/index.js Outdated
}
const location = getTokenLocation(this.editor.codeMirror, token);
setSelection(tokenText, location);
console.log("selection", token, tokenText, location);
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.

rouge console.log

Comment thread src/utils/pause.js Outdated
sourceMaps: any
): Promise<Frame[]> {
if (!frames || frames.length == 0) {
if (true || !sourceMaps || !frames || frames.length == 0) {
Copy link
Copy Markdown
Contributor

@bomsy bomsy Jun 1, 2017

Choose a reason for hiding this comment

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

i think the true cancels out all other checks

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 1, 2017

Codecov Report

Merging #3057 into master will increase coverage by 0.93%.
The diff coverage is 71.11%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3057      +/-   ##
==========================================
+ Coverage   65.17%   66.11%   +0.93%     
==========================================
  Files          75       74       -1     
  Lines        2593     2597       +4     
  Branches      525      525              
==========================================
+ Hits         1690     1717      +27     
+ Misses        903      880      -23
Impacted Files Coverage Δ
src/utils/editor/expression.js 0% <ø> (-24.25%) ⬇️
src/selectors.js 100% <ø> (ø) ⬆️
src/utils/parser/index.js 100% <ø> (ø) ⬆️
src/utils/parser/utils/closest.js 92.1% <100%> (-2.64%) ⬇️
src/utils/parser/getOutOfScopeLocations.js 85.71% <100%> (ø) ⬆️
src/reducers/sources.js 78.83% <100%> (+0.63%) ⬆️
src/actions/ast.js 72.5% <64.28%> (-20.84%) ⬇️
src/reducers/ast.js 88.57% <72.72%> (-7.27%) ⬇️
src/utils/parser/scopes.js 72.72% <0%> (-22.73%) ⬇️
... and 3 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 7ca9c89...3f975d3. Read the comment docs.

Comment thread src/reducers/ast.js
return state.set("selection", {
expression,
location,
result
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.

do we need to make sure updating is false here?

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.

hmm, i guess i should. was being cute :)

@bomsy
Copy link
Copy Markdown
Contributor

bomsy commented Jun 1, 2017

looks good! just tested , it works nicely!

There seems to be some lines which should be out of scope which seem to be still on when we hover.

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