This repository has been archived by the owner on Dec 11, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 974
Normalize modal overlay dialogs #8666
Merged
bsclifton
merged 10 commits into
brave:master
from
luixxiul:modalOverlay-refactoring-for-PR
May 4, 2017
Merged
Normalize modal overlay dialogs #8666
bsclifton
merged 10 commits into
brave:master
from
luixxiul:modalOverlay-refactoring-for-PR
May 4, 2017
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. advancedSettings.js - Remove commonStyles.modalOverlay__footer and commonStyles.modalOverlay__footerButton - Remove padding from advancedSettings thanks to modal dialog normalization 2. bitcoinDashboard.js - Add no-important to Aphrodite - Replace paymentCommon.panelFooter with styles.dashboardFooter with temp__displayNone - Replace qrcodeOverlay with modalOverlay__qrcodeOverlay 3. ledgerBackup.js - Remove commonStyles.modalOverlay__footer and commonStyles.modalOverlay__footerButton 4. ledgerRecovery.js - Remove commonStyles.modalOverlay__footer and commonStyles.modalOverlay__footerButton 5. paymentsTab.js - Add paymentHistoryOverlay__header - Add paymentHistoryOverlay__footer - Add paymentHistoryOverlay__body - Add temp__displayNone temporarily 6. syncTab.js - Rename overlayContent to newOverlayContent - Add newOverlayFooter - Remove syncOverlayBody__wrapper - Remove commonStyles.modalOverlay__footer and commonStyles.modalOverlay__footerButton - Remove commonStyles.modalOverlay__dialog and commonStyles.modalOverlay__title thanks to modal dialog normalization - Set user-select:none to syncOverlayBody__wrapper 7. commonStyles.js - Remove modalOverlay__* thanks to modal dialog normalization (Addresses #8054) 8. global.js - Add zindexModal 9. payment.js - Remove panelFooter thanks to modal dialog normalization 10. modalOverlay.js - Refactor with Aphrodite (Closes #8054) dialog |- dialog__wrapper_modal |- dialog__wrapper_last |- dialog__wrapper_transparentBackground |-- dialog__header |--- dialog__header__close |--- dialog__header__title |-- dialog__body__wrapper |--- dialog__body |-- dialog__footer 11. preferences.less - Remove obsolete code (Addresses #8661) 12. modalOverlay.less - Remove obsolete code (Addresses #8054)
Remove paymentCommon that become obsolete thanks to modal dialog normalization Also: - Cleanup styles - Add registerMock to paymentsTabTest.js Test Plan: 1. npm run test -- --grep='Payments'
Normalize Add funds modal dialog based on the refactored modalOverlay.js - Reorganize functions - Reorganize styles to make the dialog consistent with other dialogs Rename classnames on the BEM style panel |- panel__divider |-- panel__divider_left |--- panel__divider_left__titleWrapper |---- panel__divider_left__titleWrapper__iconWrapper |--- panel__divider_left__listTitleWrapper |---- panel__divider_left__listTitleWrapper__title |---- panel__divider_left__listTitleWrapper__subTitle |-- panel__divider_right |--- panel__divider_right__title |--- panel__divider_right__subTitle |--- panel__divider_right__bitcoinPanel__paymentURL |--- panel__divider_right__bitcoinPanel__walletLabelText |--- panel__divider_right__bitcoinPanel__walletAddressText modalOverlay__qrcodeOverlay |- modalOverlay__qrcodeOverlay__content |-- modalOverlay__qrcodeOverlay__content__bitcoinQR |- modalOverlay__qrcodeOverlay__footerWrapper |-- modalOverlay__qrcodeOverlay__footerWrapper__footer |--- modalOverlay__qrcodeOverlay__footerWrapper__footer__qrcodeLogo |--- modalOverlay__qrcodeOverlay__footerWrapper__footer__appstoreLogo |--- modalOverlay__qrcodeOverlay__footerWrapper__footer__playstoreLogo modalOverlay__coinbaseOverlay |- modalOverlay__coinbaseOverlay__header |- modalOverlay__coinbaseOverlay__bodyWrapper |-- modalOverlay__coinbaseOverlay__bodyWrapper__body |--- modalOverlay__coinbaseOverlay__bodyWrapper__body__iframe |- modalOverlay__coinbaseOverlay__footer dashboardFooter dashboardFooter_coinbaseFooter |- dashboardFooter_coinbaseFooter__coinbaseMessageWrapper |-- dashboardFooter_coinbaseFooter__coinbaseMessageWrapper__message Add bitcoinPanel Add iconWrapperWidth Remove modalOverlay.less (Addresses #8661) Remove data-l10n-id='bitcoinAddress' in favor of 'bitcoinPaymentURL' (Closes #8662) Remove styles.deviderFirst Remove styles.alignMiddle Remove styles.dialogInsideMargin__bottom Remove styles.disabledPanel Remove bitcoinDashboard class Remove unnecessary div Remove margin:0 from settingListTitle (panel__divider_left__listTitleWrapper__title) Also: - Refactor qrcodeOverlay - Edit qrcodeOverlayContent - Replace fa icons with functions - Replace padding magical number with `panelPadding` and `panelPaddingBody` - Fix done button height on Add funds dialog - Align done button if coinbase logo is displayed (Closes #6372) - Display title on Brave wallet QR code (Closes #8663) Test Plan: 1. Open about:preferences#payments 2. Click "Add funds" 3. Make sure the 3 icons inside the dialog body is aligned Test plan 1. Open about:preferences#payments 2. Click "Add funds" 3. Click "Fund with credit/debit" 4. Make sure the coinbase widget is displayed at the center Test Plan: 1. Add your country code to coinbaseCountries.js 2. Open about:preferences#payments 3. Click "Add funds" 4. Click "Display QR code" 5. Make sure the 3 icons appear on the footer Test Plan: 1. Open about:preferences#payments 2. Enable payments 3. Click "Add funds" 4. Click "Display QR Code" 5. Make sure both the QR image and the label is aligned at the center Test Plan: 1. Enable coinbase widget (via VPN) 2. Open about:preferences#payments 3. Click "Add funds" 4. Make sure "Done" button is aligned with the other buttons 5. Disable the coinbase widget 6. Make sure "Done button" is aligned to the right side Test Plan: 1. Open about:preferences#payments 2. Click "Add funds" 3. Click "Display QR code" 4. Hover on the QR code image 5. Make sure its title is displayed
- advancedSettings.js - bitcoinDashboard.js - disabledContent.js - enabledContent.js - history.js - ledgerBackup.js - ledgerRecovery.js - ledgerTable.js
- Add commonStyles.noMarginBottom to the last element of newOverlayContent - Remove syncOverlayBody__wrapper - Remove className='syncOverlay' - Fix sync passphrase selectability - Fix table width that doesn't make sense - Replace divs with sections Test Plan: 1. Open about:preferences#sync 2. Enable Sync 3. Click "Sync a new device" 4. Make sure just padding exists under "Show secret code words" 5. Click "Show secret code words" 6. Make sure the code is selectable
Addresses #8054 - Replace let with const - Replace 50px with a variable - Replace divs with header, section, and footer - Add registerMock
Addresses #8661 Remove leftover styles under .board Remove leftover styles under .modal
luixxiul
added
polish
Nice to have — usually related to front-end/visual tasks.
refactoring/aphrodite
labels
May 3, 2017
@cezaraugusto - asking for review the code. If you guys think it's good to go, I'll merge the commits. Thanks in advance 😄 |
cezaraugusto
approved these changes
May 4, 2017
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.
LGTM great job
bsclifton
added
QA/test-plan-specified
release-notes/include
and removed
PR/ready-for-merge
labels
May 4, 2017
This was referenced May 4, 2017
This was referenced May 5, 2017
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
polish
Nice to have — usually related to front-end/visual tasks.
QA/test-plan-specified
refactoring/aphrodite
release-notes/include
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TODO: add modal dialog to
about:styles
.Normalize modal overlay dialogs.
Follow up to #8042
Closes #6372
Closes #8054
Closes #8662
Closes #8663
Addresses #8661
Addresses #8054
Addresses #8661
Test Plan 1:
Test Plan 2:
Test plan 3:
Test Plan 4:
coinbaseCountries.js
Test Plan 5:
Test Plan 6:
Test Plan 7:
Test Plan 8:
git rebase -i
to squash commits (if needed).