-
Notifications
You must be signed in to change notification settings - Fork 974
Conversation
@@ -68,12 +71,6 @@ const styles = StyleSheet.create({ | |||
overflow: 'hidden' | |||
}, | |||
|
|||
// Add extra space for pages that have no icon | |||
// such as about:blank and about:newtab | |||
noFavicon: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not called anywhere.
paddingLeft: globalStyles.spacing.defaultIconPadding, | ||
paddingRight: globalStyles.spacing.defaultIconPadding | ||
padding: 0, | ||
width: `calc(${globalStyles.spacing.tabsToolbarHeight} * 1.1)`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
26px * 1.1
is nearly equal to the pinned tab width where the padding is increased from 2px to 4px.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems fragile to me. What if at a given point we decide to update tabs toolbar height?
pinned tabs sizing are also are not used anywhere else so I won't mind having the size explicitly described here.
alignSelf: 'center', | ||
position: 'relative', | ||
textAlign: 'center', | ||
justifyContent: 'center', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need those.
@@ -17,14 +17,13 @@ const globalStyles = require('../../styles/global') | |||
class TabIcon extends ImmutableComponent { | |||
render () { | |||
const styles = StyleSheet.create({ | |||
icon: { | |||
tabIcon: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replaced as it is confusing on debugging (we already have icon
on styles/tab.js
).
}, | ||
|
||
active: { | ||
background: `rgba(255, 255, 255, 1.0)`, | ||
height: globalStyles.spacing.tabHeight, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
redundant
Closes #10368 - Increase pinned tabs width - Remove the hard-coded value from icon_audio Also: - Move styles.audioIcon to tabStyles.icon_audio - Avoid possibility of style inconsistency - Add padding to icon_audio Auditors: @cezaraugusto Test Plan: 1. Open brave.com in a new tab 2. Open github.com in another new tab 3. Pin them 4. Make sure the width of the pinned tabs is as it should be Test Plan 2: 1. Open example.com 2. Pin the tab 3. Make sure the default icon appears at the center of the pinned tab Test Plan 3: 1. Open youtube video 2. Make sure the spacing around the audio icon, favicon and tab's title is equal
Codecov Report
@@ Coverage Diff @@
## master #10533 +/- ##
==========================================
- Coverage 54.32% 54.31% -0.01%
==========================================
Files 245 245
Lines 21159 21156 -3
Branches 3260 3260
==========================================
- Hits 11494 11491 -3
Misses 9665 9665
|
@@ -61,17 +61,11 @@ class AudioTabIcon extends React.Component { | |||
|
|||
render () { | |||
return <TabIcon | |||
className={css(tabStyles.icon, styles.audioIcon)} | |||
className={css(tabStyles.icon, tabStyles.icon_audio)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Specifying a style in each file will create style inconsistency quite easily.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to merge this given its working fine and the need for other task but please follow up my comment to avoid future regressions.
Closes #10368
Auditors: @cezaraugusto
Test Plan:
Test Plan 2:
Test Plan 3:
Submitter Checklist:
git rebase -i
to squash commits (if needed).Reviewer Checklist:
Tests