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

Normalize modal overlay dialogs #8666

Merged
merged 10 commits into from May 4, 2017
Merged

Normalize modal overlay dialogs #8666

merged 10 commits into from May 4, 2017
Commits on May 3, 2017
  1. Refactor modalOverlay.js with Aphrodite, polish Sync and Payments stuff

    Suguru Hirahara
    Suguru Hirahara committed May 3, 2017
    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)
  2. payment modal dialog - bitcoinDashboard.js - move footer to modal

    cezaraugusto authored and Suguru Hirahara committed May 3, 2017
  3. payment modal dialog cleanup 2 - advancedSettings.js

    Suguru Hirahara
    Suguru Hirahara committed May 3, 2017
  4. payment modal dialog cleanup 3

    Suguru Hirahara
    Suguru Hirahara committed May 3, 2017
    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'
  5. payment modal dialog - refactor bitcoinDashboard.js

    Suguru Hirahara
    Suguru Hirahara committed May 3, 2017
    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
  6. payment modal dialog - replace divs with sections

    Suguru Hirahara
    Suguru Hirahara committed May 3, 2017
    - advancedSettings.js
    - bitcoinDashboard.js
    - disabledContent.js
    - enabledContent.js
    - history.js
    - ledgerBackup.js
    - ledgerRecovery.js
    - ledgerTable.js
  7. Polish modal dialog - syncTab.js

    Suguru Hirahara
    Suguru Hirahara committed May 3, 2017
    - 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
  8. Polish modalOverlay.js

    Suguru Hirahara
    Suguru Hirahara committed May 3, 2017
    Addresses #8054
    
    - Replace let with const
    - Replace 50px with a variable
    - Replace divs with header, section, and footer
    - Add registerMock
  9. modal dialog - preferences.less

    Suguru Hirahara
    Suguru Hirahara committed May 3, 2017
    Addresses #8661
    
    Remove leftover styles under .board
    Remove leftover styles under .modal
You can’t perform that action at this time.