-
Notifications
You must be signed in to change notification settings - Fork 972
Private tab/Session tab icon needs right padding before text #6031
Conversation
d6ac1c8
to
3a7cf28
Compare
@bsclifton updated! |
3a7cf28
to
b2c270b
Compare
I pulled this up and tried a few configurations and got it to break In the above pic, notice how the audio icon has no margin-left
(if it's easy enough, this might be a great chance to try it out as an Aphrodite component; it could be a new tabIcon component or similar) |
b2c270b
to
fa5e5af
Compare
@jkup I saw this is using the Aphrodite components! Let me know when it's ready for review 😄 (PS- I saw the audio icon was accidentally checked in as pink) |
1762ce1
to
8c42092
Compare
|
||
class AudioTabIcon extends ImmutableComponent { | ||
render () { | ||
return <TabIcon withBlueIcon {...this.props} /> |
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.
😻 (love all the things that happen with this one line)
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 wonder if there's a clean way to eliminate the mapping, since it's almost redundant;
ex: this returns withBlueIcon, which then maps itself to styles.blueIcon...
Can we have an array of styles? and then expand using a spread (in the parent)
<TabIcon customStyles={[styles.blueIcon]} {...this.props} />
===>
class TabIcon extends ImmutableComponent {
//...
render() {
const styles = [].concat(this.props.customStyles || [])
className = css(...styles)
//...
statsLightGray: '#999999', | ||
defaultIconBackground: '#F7F7F7' | ||
} | ||
|
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 mentioned over Slack, but these may (or may not) be better if they were partitioned into logical groups, like color, zindex, breakpoint, etc. Pros of this:
- could be split into another file easily
- if (in the future) there were no references in the code to that file, standard.js would raise a lint error / webpack should exclude it
Curious what others think? @cezaraugusto @bbondy @luixxiul
For me personally, I'm good with this as-is: the list is fairly short though and I think it may make more sense to update this in iterations 😄
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 updated it with my understanding of what would be good! Would love to hear comments!
@@ -0,0 +1,47 @@ | |||
/* This Source Code Form is subject to the terms of the Mozilla Public |
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.
Just noticed this now- the new preferred location for components would be in:
app/renderer/components
😄
This lets us easily break up the rendering portion (client side JavaScript) and the browser portion (which has access to node / makes use of muon (electron))
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.
Moved!
this.props.tab.get('audioMuted') | ||
})} | ||
if (this.props.tab.get('audioPlaybackActive') && !this.props.tab.get('audioMuted')) { | ||
iconClass = 'fa fa-volume-up' |
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.
These class names (along with the other FontAwesome class names) might be a natural fit into the global styles?
For example:
const globalStyles = {
//..
classAudioPlayingIcon: 'fa fa-volume-up',
classAudioMutedIcon: 'fa fa-volume-off',
//...
}
@@ -18,6 +18,8 @@ const dnd = require('../dnd') | |||
const windowStore = require('../stores/windowStore') |
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.
If you move the new tabIcon component to the new location (app/renderer/components
), you may consider moving this too 😄 If moved, you'll have to update the paths for the requires here and then also anywhere that includes this (ex: tabs, pinnedtabs)
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.
If it's all good with you, I might try moving tab.js later. I tried moving it now but it has a lot of deps to move around.
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.
sounds good! 😄
Comments left... great job! 😄 Using Aphrodite will be a huge step forward with regard to stabilizing and encapsulating our styles (which gives us more confidence about making future changes) |
8c42092
to
d8f5292
Compare
@cezaraugusto did you want to check this out too? I know you're working in the same code right now 😄 (otherwise, LGTM!) |
@bradleyrichter @cezaraugusto is working on that issue; I'll share your image there 😄 |
git rebase -i
to squash commits (if needed).Fix #5936
Auditors @bradleyrichter @bsclifton
Test Plan: