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

Refactor popupWindow.less with Aphrodite #7929

Merged
merged 4 commits into from Apr 17, 2017
Merged

Conversation

@luixxiul
Copy link
Contributor

luixxiul commented Mar 28, 2017

Also add right:1em to create margin between the pop up and the window right border

Closes #7927

Auditors: @bbondy @bridiver @bsclifton @cezaraugusto @jonathansampson - I would like to ask you to review the PR as you have edit popupWindow.js some way. Thanks in advance!

Test Plan:

  1. Open about:preferences#security
  2. Enable LastPass
  3. Click the extension icon on the navigation bar
  4. Make sure you can log in your account
  • 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).
}
}

return <div
className={cx({
popupWindow: true,
reverseExpand: styles.right !== undefined
[css(styles.popupWindow)]: true,
[css((style.right !== undefined) && styles.reverseExpand)]: true

This comment has been minimized.

Copy link
@cezaraugusto

cezaraugusto Apr 5, 2017

Contributor

I know it was here before but not sure what's the reason of having it? row-reverse does nothing here

@@ -129,6 +129,7 @@ const globalStyles = {
switchNubShadow: '1px 1px 5px -2px black',
buttonShadow: '0px 1px 5px -1px rgba(0, 0, 0, 1.0)',
dialogShadow: '0px 8px 22px 0px rgba(0, 0, 0, .5)',
flyoutDialogBoxShadow: '2px 2px 8px #3b3b3b',

This comment has been minimized.

Copy link
@jonathansampson

jonathansampson Apr 6, 2017

Collaborator

I don't think we should be using non-black hex colors for shadows. rgba handles this particular thing much better, IMHO.

This comment has been minimized.

Copy link
@luixxiul

luixxiul Apr 6, 2017

Author Contributor

Thanks for notifying. I'll replace it this with a variable later.

@@ -69,35 +72,55 @@ class PopupWindow extends ImmutableComponent {
}

render () {
let styles = {}
let style = {}
if (parseInt(this.width)) {

This comment has been minimized.

Copy link
@jonathansampson

jonathansampson Apr 6, 2017

Collaborator

Can we avoid doing parseInt twice for this.width and this.height?

if (parseInt(this.width)) {
styles.width = (parseInt(this.width) + 2)
style.width = (parseInt(this.width) + 2)
}
if (parseInt(this.height)) {

This comment has been minimized.

Copy link
@jonathansampson

jonathansampson Apr 6, 2017

Collaborator

Can we avoid doing parseInt twice for this.width and this.height?

This comment has been minimized.

Copy link
@bsclifton

bsclifton Apr 7, 2017

Member

++ on this comment

padding: 0,
position: 'absolute',
zIndex: globalStyles.zindex.zindexPopupWindow,
WebkitUserSelect: 'none'

This comment has been minimized.

Copy link
@jonathansampson

jonathansampson Apr 6, 2017

Collaborator

user-select (userSelect) is supported unprefixed in Blink. We should avoid using the prefixed version.

@@ -117,6 +117,7 @@

@buttonShadow: 0px 1px 5px -1px rgba(0, 0, 0, 0.5);
@dialogShadow: 0px 8px 22px 0px rgba(0, 0, 0, .5);
@flyoutDialogBoxShadow: 2px 2px 8px #3b3b3b;

This comment has been minimized.

Copy link
@jonathansampson

jonathansampson Apr 6, 2017

Collaborator

To echo my earlier comment; I don't think we should use non-black HEX colors for shadows. rgba handles this much better.

This comment has been minimized.

Copy link
@luixxiul

luixxiul Apr 6, 2017

Author Contributor

ditto!

@luixxiul luixxiul requested review from NejcZdovc and removed request for bridiver and bbondy Apr 6, 2017
Copy link
Member

bsclifton left a comment

If you can address the feedback by @jonathansampson- the changes LGTM 😄

Copy link
Member

NejcZdovc left a comment

LGTM after @jonathansampson fixes

@luixxiul luixxiul modified the milestones: 0.14.3, 0.14.2 Apr 9, 2017
@cezaraugusto
Copy link
Contributor

cezaraugusto commented Apr 10, 2017

rebase pls

@luixxiul
Copy link
Contributor Author

luixxiul commented Apr 10, 2017

Would anyone please add another commit to fix the issues mentioned above about parseInt? Thanks!

Suguru Hirahara and others added 3 commits Apr 10, 2017
Also add right:1em to create margin between the pop up and the window right border

Closes #7927

Auditors:

Test Plan:
1. Open about:preferences#security
2. Enable LastPass
3. Click the extension icon on the navigation bar
4. Make sure you can log in your account
Auditors: @luxxiul
Copy link
Contributor

cezaraugusto left a comment

rebased, removed remaining LESS files and updated per @jonathansampson feedback. Waiting others feedback, ++ from me

@luixxiul luixxiul removed the help wanted label Apr 16, 2017
if (this.top + this.height < window.innerHeight) {
style.top = this.top
if (top) {
if (top + this.height < window.innerHeight) {

This comment has been minimized.

Copy link
@jonathansampson

jonathansampson Apr 17, 2017

Collaborator

I think you meant top + height here.

Auditors: @jonathansampson
@cezaraugusto cezaraugusto merged commit 0d6d9b5 into brave:master Apr 17, 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 failed
Details
@luixxiul luixxiul deleted the luixxiul:popupWindow-aphrodite branch Apr 17, 2017
@luixxiul
Copy link
Contributor Author

luixxiul commented Apr 17, 2017

thanks guys for helping me out :-)

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

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