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

Refactor about:preferences#payments #6009

Merged
merged 3 commits into from
Dec 6, 2016
Merged

Refactor about:preferences#payments #6009

merged 3 commits into from
Dec 6, 2016

Conversation

luixxiul
Copy link
Contributor

@luixxiul luixxiul commented Dec 3, 2016

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

I created the follow-up of this PR: #6047

Auditors: @bradleyrichter

Test Plan:
As I restyled about:preferences#payments again with #6047, please test just these two for this PR:

  1. Refactor about:preferences#payments #6009 (comment)
    • Make sure the row of the ledger table on about:payments is aligned horizontally
      clipboard01
  2. Refactor about:preferences#payments #6009 (comment)
    • Make sure the top right button on the modal dialog works
    screenshot 2016-12-06 12 34 16 screenshot 2016-12-06 12 34 38

@luixxiul luixxiul added this to the 0.13.0 milestone Dec 3, 2016
@luixxiul luixxiul changed the title Refactor about:preferences#payments (titleBar and walletBar) Refactor about:preferences#payments Dec 4, 2016
@luixxiul luixxiul changed the title Refactor about:preferences#payments Refactor about:preferences#payments (part 1) Dec 4, 2016
@@ -58,35 +58,6 @@
overflow: hidden;
}
}

.qrcodeOverlay {
Copy link
Contributor Author

@luixxiul luixxiul Dec 4, 2016

Choose a reason for hiding this comment

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

.qrcodeOverlay was moved under #bitcoinDashboard. Code which is not specific to the general overlay, if any other, should be moved to a proper place.

@@ -13,33 +13,6 @@ body {
display: none !important; /* for testing/debug only */
}

#paymentsSwitches {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved under .titleBar

@@ -69,12 +42,6 @@ body {
display: inline-block;
}

.bitcoinQRTitle {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved under .qrcodeOverlay .dialog-body

@@ -516,30 +483,6 @@ table.sortableTable {
}
}

.paymentsMessage {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved under #paymentsContainer

@@ -563,13 +506,6 @@ table.sortableTable {
text-align: left;
}

span.paymentHistoryButton.browserButton {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved under .walletBar .settingsList .settingItem

line-height: 1.3em;
margin: 0;

&.subTitle {
Copy link
Contributor Author

@luixxiul luixxiul Dec 4, 2016

Choose a reason for hiding this comment

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

.settingsListSubTitle was replaced with .settingsListTitle .subTitle, which can be more easily maintained.

margin: 0 auto;
}

.dialog-header {
Copy link
Contributor Author

@luixxiul luixxiul Dec 4, 2016

Choose a reason for hiding this comment

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

Because any modal creates .dialog-header, .dialog-body, .dialog-footer, they should be set inside it, whether they have properties or not. This will work for a guide for devs and help avoiding unexpected regressions.

@luixxiul luixxiul modified the milestones: 0.13.1, 0.13.0 Dec 4, 2016
@@ -1299,7 +1301,7 @@ class PaymentsTab extends ImmutableComponent {
<span className='sectionTitle'>Brave Payments</span>
<span className='sectionSubTitle'>beta</span>
</div>
<div className='pull-left' id='paymentsSwitches'>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed pull-left as flexbox model was applied.

@bsclifton bsclifton self-assigned this Dec 4, 2016
@bsclifton
Copy link
Member

@luixxiul let me know when this is ready for review 😄 I can test it locally on Mac and Windows to make sure it works great

@bsclifton
Copy link
Member

OK @luixxiul- I got a chance to review, most everything looks good 😄

  1. Can you please cherry pick this commit into your branch? I had to update selectors to fix some tests. It also fixes an issue that @willy-b had opened. I was unable to push to your fork (usually, you can if you check the box on the PR screen saying "allow folks with commit access to push changes")
    https://github.com/bsclifton/browser-laptop/commit/17f54098617dab5266e4992f99447fb1fd5ef38a

  2. When viewing the table with sites, if any sites are verified (ex: clifton.io), the verified checkmark is going out of bounds.
    screen shot 2016-12-05 at 2 47 40 pm

  3. When pulling up QR code, there is not an overlay over the previous element anymore; the layers behind QR code modal are transparent. Also, notice the top right- the close button is messed up:
    screen shot 2016-12-05 at 2 49 01 pm

@luixxiul
Copy link
Contributor Author

luixxiul commented Dec 6, 2016

Thanks @bsclifton for reviewing! I'm fixing both :-)

@luixxiul luixxiul changed the title Refactor about:preferences#payments (part 1) [WiP] Refactor about:preferences#payments (part 1) Dec 6, 2016
Suguru Hirahara and others added 2 commits December 6, 2016 12:47
1. Refactored about:preferences#payments (titleBar and walletBar)
  - Partly addresses #5494
2. Applied vertical-top to the right element
  - Fixes #5962
3. Refactored dialog on about:preferences#payments (l10n)
  - Closes #6007
4. Refactored Brave wallet modal dialog (part 1)
  - Fixes #5785 based on https://github.com/luixxiul/browser-laptop/commit/2327e9eca53eb4a637dd4c3e3a2a1d1f613c2fbc
5. Replaced the button on the modal dialog with the SVG icon

Auditors: @bradleyrichter @bsclifton

Test Plan 1:
1. Make sure paymentsMessage and walletBar appears at the same place by toggling the switch off/on
2. Set the toggle to on
3. Make sure every button in titleBar and walletBar works
4. Make sure height of the fund select box and account balance box is equal
5. Make sure the loading message and the question mark is aligned center
6. Make sure no button label is wrapped

Test Plan 2: make sure the row of the ledger table on about:payments is aligned horizontally

Test Plan 3:
1. Disable Coinbase via VPN
2. Make sure every button on the dialog on about:preferences#payments works

Test Plan 4:
1. Disable Coinbase via VPN
2. Make sure the grey footer no longer appears on the Add funds dialog

Test Plan 5:
1. Make sure the top right button on the modal dialog works
Fixes #5951
(was broke with 46ee335)

Auditors: @luixxiul

Test Plan:
1. Window 1: run `npm run watch-all`
2. Window 2: run `npm run uitest -- --grep="Payment Panel"
3. Watch tests pass
@bsclifton
Copy link
Member

LGTM! 😄

@jkup, I know you're in the ledger code now- did you want to try this out too? If so (and it looks good), let's merge it 😄

@bsclifton
Copy link
Member

@luixxiul if you do fix the button alignment for #6039 (comment), can you please do as a follow-up (in a new PR)? thanks 😄

@luixxiul
Copy link
Contributor Author

luixxiul commented Dec 6, 2016

@bsclifton thanks for reviewing! I will address it with the next PR (here is the plan: #6009 (comment))

@bsclifton
Copy link
Member

Merging! Thanks, Suguru! 😄

@bsclifton bsclifton merged commit 6545307 into brave:master Dec 6, 2016
@luixxiul luixxiul deleted the refactoring-payment branch December 7, 2016 08:47
@luixxiul luixxiul changed the title Refactor about:preferences#payments (part 1) Refactor about:preferences#payments Dec 14, 2016
luixxiul referenced this pull request Mar 25, 2017
Resolves #7501 #7380 #6364

Auditors: @bsclifton @cezaraugusto

Test plan:
- everything should work the same as was before the chage
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants