Skip to content

[Tab selector #2] Extract the page data in the full view#5073

Merged
canova merged 3 commits into
firefox-devtools:mainfrom
canova:tab-selector-2
Aug 13, 2024
Merged

[Tab selector #2] Extract the page data in the full view#5073
canova merged 3 commits into
firefox-devtools:mainfrom
canova:tab-selector-2

Conversation

@canova

@canova canova commented Aug 5, 2024

Copy link
Copy Markdown
Member

This is the second PR of #5068.

It doesn't depend on the first PR, so you can review it independently. Also it's some refactoring and minor code changes without visible UI/UX changes. Previous and new tests should cover all the behaviors.

Previously extractProfileFilterPageData was only working on the active tab view and was returning early for the full view, with this change it should be possible to run it in the full view as well.

Similarly, I don't think it needs a deploy preview as it doesn't change anything, but let me know if you think otherwise.

@canova canova changed the title [Tab selector #2] [Tab selector #2] Extract the page data in the full view Aug 5, 2024
@codecov

codecov Bot commented Aug 5, 2024

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 93.75000% with 1 line in your changes missing coverage. Please review.

Project coverage is 88.49%. Comparing base (986c0b5) to head (b2c90e2).

Files Patch % Lines
src/selectors/profile.js 92.85% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5073      +/-   ##
==========================================
- Coverage   88.49%   88.49%   -0.01%     
==========================================
  Files         304      304              
  Lines       27461    27463       +2     
  Branches     7430     7430              
==========================================
+ Hits        24302    24303       +1     
- Misses       2934     2935       +1     
  Partials      225      225              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@canova canova requested a review from julienw August 5, 2024 19:27

@julienw julienw 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, thanks!

}

const pageUrl = filteredPages[0].url;
const pageUrl = filteredPages[filteredPages.length - 1].url;

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.

too bad flow doesn't support .at(-1) 😅

@canova canova Aug 13, 2024

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yeah 😢

Comment thread src/selectors/profile.js
return item;
};

const topMostParent = getTopMostParent(page);

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.

I do find it easier to understand, thanks

canova added 3 commits August 13, 2024 10:30
… it work on the full view

Previously this function was only working on the active tab view. It
made sense at the time, but not anymore since we would like to have the
same logic in the full view and remove the active tab view altogether in
the future.
This doesn't change the behavior, but makes it easier to read and
understand.
@canova

canova commented Aug 13, 2024

Copy link
Copy Markdown
Member Author

Thanks for the review!

@canova canova merged commit 475773c into firefox-devtools:main Aug 13, 2024
@canova canova deleted the tab-selector-2 branch August 13, 2024 09:34
@canova canova mentioned this pull request Sep 5, 2024
canova added a commit that referenced this pull request Sep 5, 2024
[Tatsuyuki Ish] Fix type error in getPagesMap (#5063)
[Nazım Can Altınova] [Tab selector 1] Add a redux state for the tab
filter (#5072)
[Markus Stange] Remove a test for the inverted stack chart. (#5075)
[Markus Stange] Add an inverted tree test for getSamplesSelectedStates
and getTreeOrderComparator (#5076)
[Nazım Can Altınova] [Tab selector 2] Extract the page data in the full
view (#5073)
[Nazım Can Altınova] Do not crash on timeline hover/selection when a
profile doesn't have any samples or markers (#5086)
[Nazım Can Altınova] [Tab selector 3] Generate page information for all
tabs (#5082)
[Nazım Can Altınova] [Tab selector 4] Add a getTabToThreadIndexesMap
selector to get relevant threads per tab (#5087)
[joshuaobrien] Use the word 'archive' instead of 'zip file' in copy
(#5081)
[Markus Stange] Send a UserAgent header to the symbolication server
again (#5103)
[Julien Wajsberg] Add some console utilities to retrieve the current
profile and save it to disk (#5105)
[Nazım Can Altınova]  Add `selectedMarker` to the console APIs (#5107)
And various dependency updates.
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.

2 participants