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

Add page information for JS frames and display it inside JS tooltips #2300

Merged
merged 4 commits into from Nov 15, 2019

Conversation

canova
Copy link
Member

@canova canova commented Nov 7, 2019

This is the front-end of Bug 1468789. Adds upgraders for the new frameTable field and displays that information in the JS tooltips.

Example profile

Example tooltip of JS frame that belongs to an iframe:
Screen shot of an iframe

@canova canova requested a review from gregtatum November 7, 2019 12:05
@codecov
Copy link

codecov bot commented Nov 7, 2019

Codecov Report

Merging #2300 into master will decrease coverage by 0.01%.
The diff coverage is 81.57%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #2300      +/-   ##
=========================================
- Coverage   86.11%   86.1%   -0.02%     
=========================================
  Files         204     204              
  Lines       15019   15054      +35     
  Branches     3769    3774       +5     
=========================================
+ Hits        12934   12962      +28     
- Misses       1913    1918       +5     
- Partials      172     174       +2
Impacted Files Coverage Δ
src/test/fixtures/profiles/gecko-profile.js 100% <ø> (ø) ⬆️
src/components/flame-graph/FlameGraph.js 87.14% <ø> (ø) ⬆️
src/profile-logic/data-structures.js 94.73% <ø> (ø) ⬆️
src/components/stack-chart/index.js 100% <ø> (ø) ⬆️
src/components/stack-chart/Canvas.js 94.23% <ø> (ø) ⬆️
src/profile-logic/process-profile.js 93.63% <ø> (ø) ⬆️
src/components/flame-graph/Canvas.js 89.28% <ø> (ø) ⬆️
src/test/fixtures/profiles/call-nodes.js 100% <ø> (ø) ⬆️
src/test/fixtures/profiles/processed-profile.js 97.98% <100%> (ø) ⬆️
src/app-logic/constants.js 100% <100%> (ø) ⬆️
... and 8 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 552a5ca...3cb8a67. Read the comment docs.

Copy link
Member

@gregtatum gregtatum left a comment

Choose a reason for hiding this comment

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

I didn't finish the review yet (I forgot to send what I had so far on Friday), but here are some comments so far. In the future it would be nicer to break up the upgrading code into a separate commit. It's quite hard to review that code, with all of the other component changes and snapshot changes as well.

docs-developer/gecko-profile-format.md Show resolved Hide resolved
docs-developer/gecko-profile-format.md Show resolved Hide resolved
src/types/gecko-profile.js Outdated Show resolved Hide resolved
src/types/profile.js Show resolved Hide resolved
src/profile-logic/gecko-profile-versioning.js Outdated Show resolved Hide resolved
src/profile-logic/gecko-profile-versioning.js Show resolved Hide resolved
src/profile-logic/processed-profile-versioning.js Outdated Show resolved Hide resolved
Copy link
Member Author

@canova canova left a comment

Choose a reason for hiding this comment

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

@gregtatum sorry about the single huge commit. I should have split those upgraders. Will do in the future. Addressed your comments and answered some of them.

docs-developer/gecko-profile-format.md Show resolved Hide resolved
src/profile-logic/processed-profile-versioning.js Outdated Show resolved Hide resolved
src/types/profile.js Show resolved Hide resolved
src/profile-logic/gecko-profile-versioning.js Show resolved Hide resolved
Copy link
Member

@gregtatum gregtatum left a comment

Choose a reason for hiding this comment

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

Thanks! This is looking good to me now. The only thing I noticed was some missing test coverage, which I marked as optional and possibly a follow-up, so we could land now since this is a big PR already.

// Finding current frame and parent frame URL(if there is).
let pageAndParentPageURL;
if (pages) {
const page = pages.find(p => p.innerWindowID === innerWindowID);
Copy link
Member

Choose a reason for hiding this comment

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

Optional, or follow-up: I noticed in the codecov report that this area wasn't covered by a test. It'd be good to snapshot test, and maybe use getByText to find the URLs in the component.

Copy link
Member Author

Choose a reason for hiding this comment

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

Adding tests for this, but probably it would be good to review those tests. Will open a follow-up PR for that.

src/types/gecko-profile.js Outdated Show resolved Hide resolved
src/types/profile.js Show resolved Hide resolved
src/types/profile.js Outdated Show resolved Hide resolved
@canova canova merged commit a53a424 into firefox-devtools:master Nov 15, 2019
@canova canova deleted the frame-page-info branch November 15, 2019 13:04
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.

None yet

2 participants