Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Fix bug affecting width of tabs when closing them with the mouse #11436

Merged
merged 1 commit into from
Oct 13, 2017

Conversation

petemill
Copy link
Member

Fix #11434

The tabs are meant to stay the same size until mouseout, according to #6088 and implemented in #6342. They were sometimes growing (or shrinking) on click and then shrinking further on mouseout due to the size being calculated at the wrong time.

Submitter Checklist:

  • Submitted a ticket for my issue if one did not already exist.
  • Used Github auto-closing keywords in the commit message.
  • Added/updated tests for this change (for new code or code which already has tests).
  • Ran git rebase -i to squash commits (if needed).
  • Tagged reviewers and labelled the pull request as needed.

Test Plan (manual):

flex tabs

  • Make the window narrow
  • Open ~7 tabs (enough for the tabs to fill the width of the container and get smaller)
  • Mouse over the first tab's close button and click it
  • Expected: The next tab stays exactly the same size, and the next tab's close button is directly under the mouse, until mouseout of the tab bar

max-width tabs

  • Make the window wider
  • Open ~3 tabs (not enough for the tabs to fill the width of the container and get smaller)
  • Mouse over the first tab's close button and click it
  • Expected: The next tab stays exactly the same size, and the next tab's close button is directly under the mouse, until mouseout of the tab bar

Reviewer Checklist:

Tests

  • Adequate test coverage exists to prevent regressions
  • Tests should be independent and work correctly when run individually or as a suite ref
  • New files have MPL2 license header

Fix brave#11434

The tabs are meant to stay the same size until mouseout, according to brave#6088 and implemented in brave#6342. They were sometimes growing (or shrinking) on click and then shrinking further on mouseout due to the size being calculated at the wrong time
@codecov-io
Copy link

codecov-io commented Oct 11, 2017

Codecov Report

Merging #11436 into master will decrease coverage by 0.01%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##           master   #11436      +/-   ##
==========================================
- Coverage   52.46%   52.44%   -0.02%     
==========================================
  Files         268      268              
  Lines       25195    25182      -13     
  Branches     4021     4020       -1     
==========================================
- Hits        13218    13207      -11     
+ Misses      11977    11975       -2
Flag Coverage Δ
#unittest 52.44% <0%> (-0.02%) ⬇️
Impacted Files Coverage Δ
...p/renderer/components/tabs/content/closeTabIcon.js 45.09% <0%> (+6.03%) ⬆️
js/stores/appStoreRenderer.js 91.17% <0%> (-8.83%) ⬇️
app/renderer/components/reduxComponent.js 84.37% <0%> (-6.25%) ⬇️
js/stores/windowStore.js 27.27% <0%> (-0.31%) ⬇️

Copy link
Contributor

@cezaraugusto cezaraugusto left a comment

Choose a reason for hiding this comment

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

+++++ works flawlessly, thanks!

@cezaraugusto cezaraugusto merged commit a57a9f3 into brave:master Oct 13, 2017
@luixxiul luixxiul added this to the 0.22.x (Nightly Channel) milestone Oct 13, 2017
@luixxiul
Copy link
Contributor

Added to 0.22.x.

@petemill petemill deleted the fix-mouse-tab-close-size branch October 13, 2017 21:17
@petemill
Copy link
Member Author

This PR also fixes #12837 which is assigned to 0.20, so changing milestone for this to 0.20 and uplifting to 0.21 and 0.20

@petemill petemill modified the milestones: 0.22.x (Nightly Channel), 0.20.x (Beta Channel) Jan 25, 2018
petemill pushed a commit that referenced this pull request Jan 25, 2018
Fix bug affecting width of tabs when closing them with the mouse
petemill pushed a commit that referenced this pull request Jan 25, 2018
Fix bug affecting width of tabs when closing them with the mouse
@petemill
Copy link
Member Author

0.21 57ff8d3
0.20 ffe02fe

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tabs grow too large or small when closing, until mouseout
4 participants