Skip to content
This repository has been archived by the owner. It is now read-only.

Refactor about:extensions with Aphrodite #7346

Merged
merged 1 commit into from Mar 13, 2017
Merged

Conversation

@luixxiul
Copy link
Contributor

luixxiul commented Feb 21, 2017

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

Description

Closes #7345

  • extensions.less is deleted
  • itemList.less is unlinked
  • globalStyles.spacing.aboutPageDetailsPageWidth is introduced

Auditors: @cezaraugusto, @bsclifton

  • 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).

Blocked on #7258 #7258 was merged to the master

render () {
const className = css(
commonStyles.listItem,

This comment has been minimized.

Copy link
@cezaraugusto

cezaraugusto Feb 23, 2017

Contributor

+++++++++++++++

This comment has been minimized.

Copy link
@bsclifton

bsclifton Mar 12, 2017

Member

+++++++++++++++++

render () {
const className = css(
commonStyles.listItem,

This comment has been minimized.

Copy link
@cezaraugusto

cezaraugusto Feb 23, 2017

Contributor

+++++++++++++++

<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'>

This comment has been minimized.

Copy link
@cezaraugusto

cezaraugusto Feb 23, 2017

Contributor

can we remove that class or just replace it to data-id-test just for future-friendliness?

@@ -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'>

This comment has been minimized.

Copy link
@cezaraugusto

cezaraugusto Feb 23, 2017

Contributor

ditto

<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>

This comment has been minimized.

Copy link
@cezaraugusto

cezaraugusto Feb 23, 2017

Contributor

ditto

require('../../node_modules/font-awesome/css/font-awesome.css')

const styles = StyleSheet.create({

This comment has been minimized.

Copy link
@cezaraugusto

cezaraugusto Feb 23, 2017

Contributor

[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?

This comment has been minimized.

Copy link
@luixxiul

luixxiul Feb 24, 2017

Author Contributor

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).

This comment has been minimized.

Copy link
@bsclifton

bsclifton Mar 12, 2017

Member

Moving to the bottom would be great (so that everything is consistent) 👍

opacity: 0.3;
}
}
}

This comment has been minimized.

Copy link
@cezaraugusto

cezaraugusto Feb 23, 2017

Contributor

💯

"let's use less LESS"

@bsclifton
Copy link
Member

bsclifton commented Mar 10, 2017

@luixxiul let me know once you address the feedback and I can review / merge 😄

@luixxiul
Copy link
Contributor Author

luixxiul commented Mar 11, 2017

Ok updated. Let me know if it is ok so I will squash the commits ;-)

@luixxiul luixxiul added this to the 0.13.6 milestone Mar 11, 2017
Copy link
Member

bsclifton left a comment

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 👍

require('../../node_modules/font-awesome/css/font-awesome.css')

const styles = StyleSheet.create({

This comment has been minimized.

Copy link
@bsclifton

bsclifton Mar 12, 2017

Member

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',

This comment has been minimized.

Copy link
@bsclifton

bsclifton Mar 12, 2017

Member

this variable name is not very clear... Can we name it something more appropriate, like aboutExtensionDetailWidth?

This comment has been minimized.

Copy link
@luixxiul

luixxiul Mar 13, 2017

Author Contributor

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?

This comment has been minimized.

Copy link
@bsclifton

bsclifton Mar 13, 2017

Member

sure, that works 👍

render () {
const className = css(
commonStyles.listItem,

This comment has been minimized.

Copy link
@bsclifton

bsclifton Mar 12, 2017

Member

+++++++++++++++++

Suguru Hirahara
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
@luixxiul
Copy link
Contributor Author

luixxiul commented Mar 13, 2017

Squashed!

Copy link
Member

bsclifton left a comment

++

@bsclifton bsclifton merged commit 14cd6ae into brave:master Mar 13, 2017
0 of 2 checks passed
0 of 2 checks passed
continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
@luixxiul luixxiul deleted the luixxiul:aboutExtensions-aphrodite branch Mar 13, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.