Skip to content

Do not pop if there is nothing to pop#3901

Merged
julienw merged 2 commits into
firefox-devtools:mainfrom
julienw:do-no-pop-if-there-is-nothing-to-pop
Feb 24, 2022
Merged

Do not pop if there is nothing to pop#3901
julienw merged 2 commits into
firefox-devtools:mainfrom
julienw:do-no-pop-if-there-is-nothing-to-pop

Conversation

@julienw

@julienw julienw commented Feb 21, 2022

Copy link
Copy Markdown
Contributor

This fixes the following STR:

  1. Click on the last element in the transform navigator bar (at the top of the call tree)

=> nothing should change, because clicking on the last element pops nothing.
But the call tree is completely compacted instead.

I realized that the FilterNavigatorBar always reports when the last element is clicked. So this is what I changed.

I noticed that when there's a preview selection, clicking the last element will remove the selection. I retained this behavior and made it accessible (previously there were no button for this to work).

There should be no visible change besides these 2 changes.

production
deploy preview

@codecov

codecov Bot commented Feb 21, 2022

Copy link
Copy Markdown

Codecov Report

Merging #3901 (6b652e8) into main (4173f53) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head 6b652e8 differs from pull request most recent head 330ae19. Consider uploading reports for the commit 330ae19 to get more accurate results

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3901   +/-   ##
=======================================
  Coverage   87.19%   87.19%           
=======================================
  Files         277      277           
  Lines       23666    23593   -73     
  Branches     6258     6213   -45     
=======================================
- Hits        20636    20573   -63     
+ Misses       2786     2778    -8     
+ Partials      244      242    -2     
Impacted Files Coverage Δ
src/components/shared/FilterNavigatorBar.js 100.00% <100.00%> (+25.00%) ⬆️
src/profile-logic/sanitize.js 95.26% <0.00%> (-1.28%) ⬇️
src/selectors/publish.js 96.66% <0.00%> (-0.21%) ⬇️
src/reducers/publish.js 98.07% <0.00%> (ø)
src/test/fixtures/utils.js 95.65% <0.00%> (ø)
src/components/app/MenuButtons/Publish.js 79.79% <0.00%> (+0.18%) ⬆️
src/components/timeline/Selection.js 82.24% <0.00%> (+3.38%) ⬆️

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 4173f53...330ae19. Read the comment docs.

@julienw julienw requested a review from canova February 21, 2022 17:04
children: React.Node,
|};

class FilterNavigatorBarButton extends React.PureComponent<FilterNavigatorBarButtonProps> {

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.

@canova canova left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me, thanks!

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