-
Notifications
You must be signed in to change notification settings - Fork 975
Finished Aphrodite restyle of safebrowsing.js. Fixes issue #9025 #13592
Finished Aphrodite restyle of safebrowsing.js. Fixes issue #9025 #13592
Conversation
Cleaning up open PRs |
js/about/safebrowsing.js
Outdated
} | ||
|
||
onAdvancedToggle () { | ||
onAdvancedToggle = () => { |
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.
why was this changed?
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.
To prevent having to call .bind from each usage (at the time, anticipated future use).
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.
nice work, comments left
(baseSelector.includes(GLOBALS) ? generateSubtreeStyles(selector) : null) | ||
} | ||
|
||
export const childSelector = (selector) => { |
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 this is a leftover. Is this being used elsewhere?
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.
No. that's a leftover with no cleanup. Removing childSelector
fontWeight: 400, | ||
margin: 0, | ||
padding: 0 | ||
}, |
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.
nit: we usually add an extra line break between properties when dealing with styles
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.
Yes, I saw that on the styling guidelines after the fact. Done.
[GLOBALS]: { | ||
'*': { | ||
color: globalStyles.color.commonTextColor, | ||
fontFamily: 'Helvetica Neue, Arial, sans-serif', |
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 can replace it with -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", sans-serif;
which is the default font set for our app
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.
Done.
} | ||
} | ||
}) | ||
export default extended.css(styles[GLOBALS]) |
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.
for parity with other exports
we use I think it's preferable to use Node.js module.export
utility instead of ES6's so module.exports = extended.css(styles[GLOBALS])
would be better
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.
Agree. Done.
js/about/safebrowsing.js
Outdated
|
||
class SafebrowsingPage extends React.Component { | ||
constructor (props) { | ||
super(props) | ||
this.state = { | ||
advanced: false | ||
} | ||
let headDiv = document.querySelector('#appContainer') |
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.
consulting the DOM in React has its cost and we could avoid this by adding a new <div>
with the same CSS properties and result is the same i.e.
render () {
return <div className={css(styles.appContainer)}>
<div className={css(styles.error__content)} data-test-id='errorContent'>
...stuff
</div>
</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.
Agree. Done.
}, | ||
'html, body, #appContainer, #appContainer > div': { | ||
height: '100%' | ||
}, |
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.
same as above comment regarding line-break
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 one I might need your help understanding.
@cezaraugusto Thank you. Updated with corrections. |
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.
++
…efactor Finished Aphrodite restyle of safebrowsing.js. Fixes issue #9025
@jasonrsadler @cezaraugusto after talking with @NejcZdovc, I uplifted this to 0.23.x to avoid getting ourselves into a nasty merge conflict type situation (like we had in the past when cherry picking commits to older releases) |
Labeled as |
Submitter Checklist:
git rebase -i
to squash commits (if needed).Test Plan:
Reviewer Checklist:
Tests
Finishes restyle to Aphrodite. Eliminates dependency to 'less' files.
Requesting Review @luixxiul @bsclifton
Requesting Security Review @diracdeltas
fixes #9025