-
Notifications
You must be signed in to change notification settings - Fork 972
Refactor about:extensions with Aphrodite #7346
Conversation
render () { | ||
const className = css( | ||
commonStyles.listItem, |
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.
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.
+++++++++++++++
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.
+++++++++++++++++
render () { | ||
const className = css( | ||
commonStyles.listItem, |
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.
+++++++++++++++
js/about/extensions.js
Outdated
<div className='extensionImage'> | ||
<img src={`${this.props.extension.get('base_path')}/${icon}`} /> | ||
<div className={css(styles.extensionImage)}> | ||
<img className={css(styles.img)} src={`${this.props.extension.get('base_path')}/${icon}`} /> | ||
</div> | ||
<div className='extensionDetails'> |
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.
can we remove that class or just replace it to data-id-test
just for future-friendliness?
js/about/extensions.js
Outdated
@@ -113,7 +158,7 @@ class AboutExtensions extends React.Component { | |||
}) | |||
} | |||
render () { | |||
return <div className='extensionDetailsPage'> | |||
return <div className={css(styles.detailsPage)}> | |||
<h2 data-l10n-id='extensions' /> | |||
<div className='extensionDetailsPageContent'> |
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.
ditto
js/about/extensions.js
Outdated
<h3 className='extensionTitle'>{bravifyText(this.props.extension.get('name'))}</h3> | ||
<span className='extensionVersion'>{this.props.extension.get('version')}</span> | ||
<h3 className={css(styles.extensionTitle)}>{bravifyText(this.props.extension.get('name'))}</h3> | ||
<span className={css(styles.extensionVersion)}>{this.props.extension.get('version')}</span> | ||
{ | ||
!['__MSG_extDescriptionGoogleChrome__', '__MSG_appDesc__'].includes(this.props.extension.get('description')) | ||
? <div className='extensionDescription'>{bravifyText(this.props.extension.get('description'))}</div> |
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.
ditto
js/about/extensions.js
Outdated
require('../../node_modules/font-awesome/css/font-awesome.css') | ||
|
||
const styles = StyleSheet.create({ |
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.
[minor] I think it's more likely to edit logic code more than editing styles, and this way we have to scroll down all Aphrodite stuff to get there. Can we put styles at the end of the file?
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 put that here bearing in mind that on HTML files inlined styles are placed before body tag. Moving these to the bottom is fine for me too. CC @bbondy and @bsclifton for comments. I think we do not have the rule on the placement (Sorry if I missed it).
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.
Moving to the bottom would be great (so that everything is consistent) 👍
opacity: 0.3; | ||
} | ||
} | ||
} |
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.
💯
"let's use less LESS"
@luixxiul let me know once you address the feedback and I can review / merge 😄 |
Ok updated. Let me know if it is ok so I will squash the commits ;-) |
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.
Comments left- otherwise, looks great! 😄 Once you've implemented feedback and squashed, we're good to go on merge. I made sure the about:extensions tests pass (vimium fails, but that's expected) and all unit tests pass 👍
js/about/extensions.js
Outdated
require('../../node_modules/font-awesome/css/font-awesome.css') | ||
|
||
const styles = StyleSheet.create({ |
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.
Moving to the bottom would be great (so that everything is consistent) 👍
@@ -106,6 +106,7 @@ const globalStyles = { | |||
navbarBraveButtonMarginLeft: '80px', | |||
navbarLeftMarginDarwin: '76px', | |||
sideBarWidth: '190px', | |||
aboutPageDetailsPageWidth: '704px', |
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 variable name is not very clear... Can we name it something more appropriate, like aboutExtensionDetailWidth
?
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 think I named so in order to replace other "704px"s on about pages with that variable (this one too: 9ad4b84#diff-9d96fcb58c1eeedf8e3d6d7f46b1a794R118).
Is it OK to do so with this PR or another one?
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.
sure, that works 👍
render () { | ||
const className = css( | ||
commonStyles.listItem, |
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.
+++++++++++++++++
Closes #7345 - extensions.less is deleted - itemList.less is unlinked - globalStyles.spacing.aboutPageDetailsPageWidth is introduced Auditors: Test Plan: 1. Open about:preferences#advanced 2. Disable Torrent Viewer 3. Restart the browser 4. Open about:extensions 5. Make sure Torrent Viewer is disabled (grayed out) 6. Enable Torrent Viewer 7. Make sure Torrent Viewer is enabled
Squashed! |
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.
++
Test Plan
Description
Closes #7345
Auditors: @cezaraugusto, @bsclifton
git rebase -i
to squash commits (if needed).Blocked on #7258#7258 was merged to the master