Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Replace Button with BrowserButton, set common font properties for BrowserButton, etc. #10951

Closed
wants to merge 3 commits into from
Closed

Replace Button with BrowserButton, set common font properties for BrowserButton, etc. #10951

wants to merge 3 commits into from

Conversation

luixxiul
Copy link
Contributor

@luixxiul luixxiul commented Sep 14, 2017

Requires #11547
Blocks #10881

Fixes #10815
Closes #9223
Closes #11114
Closes #11115
Addresses #7168
Addresses #10898

Test Plans

1st commit

Addresses #7168

Test Plan 1:

  1. Open about:autofill
  2. Click 'Add Address' and 'Add Credit Card'
  3. Make sure the buttons are displayed

Test Plan 2:

  1. Open about:preferences#payments
  2. Click the setting icon
  3. Make sure the close button on the modal dialog is displayed

Test Plan 3:

  1. Open https://webtorrent.io/free-torrents
  2. Click any link to a torrent file
  3. Click 'Start Download'
  4. Make sure the button is changed to 'Stop Download'

Test Plan 4:

  1. Open clear browsing data panel
  2. Make sure there is margin between the buttons
  3. Open import browser data panel
  4. Repeat 2
  5. Open http://browserspy.dk/password.php
  6. Click a link to password-dk.php
  7. Repeat 2
  8. Open https://mixed-script.badssl.com/
  9. Click the lock icon
  10. Repeat 2
  11. Disable Widevine
  12. Open https://netflix.com to display the widevine panel
  13. Repeat 2

2nd commit

Fixes #10815
Closes #9223

Test Plan:

  1. Open about:preferences and display a button
  2. Open data import dialog
  3. Make sure the browser label is rendered in the same font properties

screenshot 2017-09-22 0 34 33 screenshot 2017-09-22 0 35 02

3rd commit

Closes #11114
Closes #11115
Addresses #10898

Test Plan:

  1. Open about:styles
  2. Click 'buttons'
  3. Make sure cursor becomes pointer on hover
  4. Open about:preferences#payments
  5. Click the advanced setting
  6. Make sure the close button of the modal overlay becomes pointer

Test Plan 2:

  1. Open brave.com
  2. Click the shield button
  3. Make sure that the close button, info button and reload button has pointer cursor on hover

Test Plan 3:

  1. Open about:preferences#plugins
  2. Make sure the info buttons under Widevine support has pointer cursor on hover

Test Plan 4:

  1. Open about:brave
  2. Click copy button
  3. Make sure the version information is copied

Submitter Checklist:

  • 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).
  • Tagged reviewers and labelled the pull request as needed.

Test Plan:

Reviewer Checklist:

Tests

  • Adequate test coverage exists to prevent regressions
  • Tests should be independent and work correctly when run individually or as a suite ref
  • New files have MPL2 license header

@luixxiul luixxiul added misc/button priority/P5 Cosmetic. Spelling, copy, layout. New features (which should also be part of an initiative). labels Sep 14, 2017
@luixxiul luixxiul added this to the 0.21.x (Nightly Channel) milestone Sep 14, 2017
@luixxiul luixxiul self-assigned this Sep 14, 2017
@@ -68,8 +68,7 @@ class SiteInfo extends React.Component {
<span className={cx({
fa: true,
'fa-lock': true,
[css(styles.secureIcon__fa)]: true,
[css(styles.secureIcon__extendedValidation)]: this.props.isExtendedValidation
[css(styles.secureIcon__fa, this.props.isExtendedValidation && styles.secureIcon__extendedValidation)]: true
Copy link
Contributor Author

@luixxiul luixxiul Sep 14, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't follow the BEM strictly; It'll be fixed with #10933

{
this.props.allowPause
? <BrowserButton
iconOnly
Copy link
Contributor Author

@luixxiul luixxiul Sep 14, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iconOnly rocks 🎸🤘

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

haha w00t 👨‍🎤 🎶

@luixxiul
Copy link
Contributor Author

luixxiul commented Sep 21, 2017

Requesting a review from @srirambv on his Windows environment (the 2nd commit).

@luixxiul luixxiul changed the title Replace Button with BrowserButton Replace Button with BrowserButton and set common font properties for BrowserButton Sep 21, 2017
@luixxiul luixxiul removed the priority/P5 Cosmetic. Spelling, copy, layout. New features (which should also be part of an initiative). label Sep 22, 2017
@@ -1,51 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
Copy link
Contributor

@cezaraugusto cezaraugusto Sep 22, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

YESSSSSSSS YOU DID IT SIR

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are normal <button> still left, which will be replaced with BrowserButton :-)

return <div className={css(
styles.dialog__wrapper_modal,
this.state.last && styles.dialog__wrapper_last,
this.props.transparentBackground && styles.dialog__wrapper_transparentBackground
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❣️

@luixxiul
Copy link
Contributor Author

Rebasing...

},

braveMenuContainer__braveShield_disabled: {
filter: 'grayscale(100%)',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

grayscale ftw

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@luixxiul does this also fix #9696?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so as this does not change the color of the number block.

Copy link
Contributor Author

@luixxiul luixxiul Sep 22, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a fix for that issue. Is it fine to commit it to this PR?

screenshot 2017-09-22 16 20 15

I could save it for another PR.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure- add it in 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added :-) 8615b5f

@luixxiul luixxiul changed the title Replace Button with BrowserButton and set common font properties for BrowserButton Replace Button with BrowserButton, set common font properties for BrowserButton, etc. Sep 23, 2017
@cezaraugusto
Copy link
Contributor

keen to review this but delaying to after 0.19.x, given it has some changes ledger-related. Setting as PR/blocked for now to keep track

@luixxiul
Copy link
Contributor Author

Until 0.19 is released, I'm going to add other commits to normalize the buttons! :-)

@bbondy bbondy modified the milestones: 0.20.x (Beta Channel), Backlog Oct 25, 2017
syuan100 pushed a commit to syuan100/browser-laptop that referenced this pull request Nov 9, 2017
Closes brave#11111
Requires brave#10951 to make the shield button non-draggable

Auditors: @cezaraugusto

Test Plan:
1. Open brave.com
2. Enable NoScript
3. Enable an extension
4. Make sure NoScript button, the extension button, and publisher button is not draggable
Suguru Hirahara added 3 commits December 2, 2017 12:00
Closes #10946
Addresses #7168
Addresses #10947
Addresses #10948

- Add browserButton_smallItem for delete confirmation button on downloadItem.js
- Refactor downloadItem with Aphrodite (partially)

Auditors:

Test Plan 1:
1. Make sure the brave shield icon is displayed
2. Open a new tab
3. Make sure the icon is light gray
4. Open http://example.com
5. Make sure the icon is orange
6. Disable the shield
7. Make sure the icon is dark gray

Test Plan 2:
1. Open about:autofill
2. Click 'Add Address' and 'Add Credit Card'
3. Make sure the buttons are displayed

Test Plan 3:
1. Open about:preferences#payments
2. Click the setting icon
3. Make sure the close button on the modal dialog is displayed

Test Plan 4:
1. Download a file
2. Make sure the close button is displayed on the download bar
3. Hover on the file item
4. Make sure the action buttons are displayed
5. Click the trash icon
6. Make sure the delete confirmation button works

Test Plan 5:
1. Open https://webtorrent.io/free-torrents
2. Click any link to a torrent file
3. Click 'Start Download'
4. Make sure the button is changed to 'Stop Download'

Test Plan 6:
1. Open clear browsing data panel
2. Make sure there is margin between the buttons
3. Open import browser data panel
4. Repeat 2
5. Open http://browserspy.dk/password.php
6. Click a link to password-dk.php
7. Repeat 2
8. Open https://mixed-script.badssl.com/
9. Click the lock icon
10. Repeat 2
11. Disable Widevine
11. Open https://netflix.com to display the widevine panel
12. Repeat 2
…n dialog

Closes #9223
Fixes #10815

Auditors:

Test Plan:
1. Open about:preferences and display a button
2. Open data import dialog
3. Make sure the browser label is rendered in the same font properties
Apply cursor:pointer to browserButton globally
Replace span with onClick with browserButton

Closes #11114
Closes #11115
Addresses #10898

Auditors:

Test Plan:
1. Open about:styles
2. Click 'buttons'
3. Make sure cursor becomes pointer on hover
4. Open about:preferences#payments
5. Click the advanced setting
6. Make sure the close button of the modal overlay becomes pointer

Test Plan 2:
1. Open brave.com
2. Click the shield button
3. Make sure that the close button, info button and reload button has pointer cursor on hover

Test Plan 3:
1. Open about:preferences#plugins
2. Make sure the info buttons under Widevine support has pointer cursor on hover

Test Plan 4:
1. Open about:brave
2. Click copy button
3. Make sure the version information is copied

Test Plan 5:
1. Open about:history
2. Search something
3. Make sure the clear button on the input form works
4. Open about:bookmarks
5. Make sure the clear button works
@cezaraugusto
Copy link
Contributor

is this font the right one? I think there are some efforts from design to change the actual font but not following so cc @petemill

screen shot 2017-12-19 at 1 09 06 pm

@cezaraugusto cezaraugusto added the needs-info Another team member needs information from the PR/issue opener. label Dec 19, 2017
@luixxiul
Copy link
Contributor Author

I haven't checked the source code for a while, so let me close once to try to find a better fix, thanks.

@luixxiul luixxiul closed this Jan 17, 2018
@luixxiul luixxiul removed this from the Triage Backlog milestone Jan 17, 2018
@luixxiul luixxiul removed their assignment Jan 28, 2018
@luixxiul luixxiul removed PR/blocked needs-info Another team member needs information from the PR/issue opener. labels Jan 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
6 participants