Skip to content

[Tab selector #1] Add a redux state for the tab filter#5072

Merged
canova merged 3 commits into
firefox-devtools:mainfrom
canova:tab-selector-redux-state
Aug 5, 2024
Merged

[Tab selector #1] Add a redux state for the tab filter#5072
canova merged 3 commits into
firefox-devtools:mainfrom
canova:tab-selector-redux-state

Conversation

@canova

@canova canova commented Aug 3, 2024

Copy link
Copy Markdown
Member

This is the first PR from #5068.

It adds the basic redux state and adds some tests for this behavior. It doesn't change anything related to user visible behavior yet.

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 requested a review from julienw August 3, 2024 15:59
@codecov

codecov Bot commented Aug 3, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.49%. Comparing base (e62f81a) to head (5968863).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5072   +/-   ##
=======================================
  Coverage   88.48%   88.49%           
=======================================
  Files         304      304           
  Lines       27444    27461   +17     
  Branches     7423     7430    +7     
=======================================
+ Hits        24285    24302   +17     
  Misses       2934     2934           
  Partials      225      225           

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

@canova canova force-pushed the tab-selector-redux-state branch 3 times, most recently from 75f1cfe to d85fe73 Compare August 3, 2024 16:14

@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.

It looks reasonable to me, thanks

Comment thread src/app-logic/url-handling.js Outdated
urlState.profileSpecific.full.localTrackOrderByPid,
urlState.profileSpecific.full.localTrackOrderChangedPids
);
baseQuery.tabID = urlState.profileSpecific.full.tabFilter || undefined;

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'd do:

Suggested change
baseQuery.tabID = urlState.profileSpecific.full.tabFilter || undefined;
baseQuery.tabID = urlState.profileSpecific.full.tabFilter ?? undefined;

because tabFilter is a number and could be theorically 0

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.

Good catch, changed it. Thanks!

Comment on lines +586 to +591
let oldTabID = null;
if (query.ctxId && Number.isInteger(Number(query.ctxId))) {
tabID = Number(query.ctxId);
oldTabID = Number(query.ctxId);
}

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.

a comment to explain the difference between both tab ids could be useful

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, added one. I will remove this in the end but still keeping while we have the active tab view. But I'm thinking about at which point I should remove the old active tab view. Maybe it's better to do it sooner than later.

@canova canova force-pushed the tab-selector-redux-state branch from d85fe73 to 5968863 Compare August 5, 2024 19:09
@canova

canova commented Aug 5, 2024

Copy link
Copy Markdown
Member Author

Thanks for the review!

@canova canova merged commit 986c0b5 into firefox-devtools:main Aug 5, 2024
@canova canova deleted the tab-selector-redux-state branch August 5, 2024 19:26
@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