-
Notifications
You must be signed in to change notification settings - Fork 975
Fix BEM naming and align elements correctly on paymentsTab.js and ledgerTable.js #10913
Conversation
Codecov Report
@@ Coverage Diff @@
## master #10913 +/- ##
==========================================
- Coverage 53.47% 53.45% -0.02%
==========================================
Files 275 275
Lines 26042 26033 -9
Branches 4180 4180
==========================================
- Hits 13926 13916 -10
- Misses 12116 12117 +1
|
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 but delaying merge to be after #10953 which will land in master first. Setting as blocked for now
blocked as waiting for #10953 |
also please rebase |
Rebased on the recent BAT update
I tried something like this to align switches on macOS (en-US / en-UK). --- a/app/renderer/components/preferences/paymentsTab.js
+++ b/app/renderer/components/preferences/paymentsTab.js
@@ -39,6 +39,8 @@ const batIcon = require('../../../extensions/brave/img/ledger/cryptoIcons/BAT_ic
// other
const getSetting = require('../../../../js/settings').getSetting
const settings = require('../../../../js/constants/settings')
+const platformUtil = require('../../../common/lib/platformUtil')
+const isDarwin = platformUtil.isDarwin()
const {formatCurrentBalance, batToCurrencyString} = require('../../../common/lib/ledgerUtil')
class PaymentsTab extends ImmutableComponent {
@@ -107,6 +109,7 @@ class PaymentsTab extends ImmutableComponent {
render () {
const enabled = this.props.ledgerData.get('created')
+ const isEnglish = getSetting(settings.LANGUAGE, this.props.settings) === 'en_US' || 'en_UK'
return <div className={cx({
paymentsContainer: true,
@@ -218,11 +221,13 @@ class PaymentsTab extends ImmutableComponent {
switchClassName={css(styles.switch__switchControl)}
leftLabelClassName={css(
styles.switch__label,
+ (isDarwin && isEnglish) && [styles.switch__label_isDarwin_isEnglish, styles.switch__label_isDarwin_isEnglish_left], Could I know how to fix this one? |
re: #10913 (comment) why is that a thing in English only? or is the comment superseded by newer commits? |
@cezaraugusto to fix the issue here: #10482 (comment)
That modification is currently required only for en_US and en_UK on macOS. It might be required for Windows and Linux, if the switch label and the info button are not aligned properly there as well. |
- Disable line wrap on 'hideExcludedSites__settingCheckbox' - Fix BEM naming - Make only text of anchor links clickable Auditors: Test Plan: 1. Run `npm run add-simulated-synopsis-visits 100` 2. Restart the browser 3. Open about:preferences#payments 4. Make sure `Show only included sites` label is not wrapped 5. Make sure only site domains are clickable
- Fixes BEM naming - Indentation - Replace padding inside .walletBar with margin inside its elements Closes #10912 Auditors: Test Plan: 1. Run `npm run add-simulated-payment-history` 2. Restart the browser 3. Open about:preferences#payments 4. Make sure the layout is not broken
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.
++
Note: if this PR will be postponed to
0.22.x
or later, please do not forget to merge #11368 to0.21.x
. If not, the switch placement will regress.Closes #10912
hideExcludedSites__settingCheckbox
Auditors:
Test Plan:
npm run add-simulated-synopsis-visits 100
npm run add-simulated-payment-history
Show only included sites
label is not wrappedSubmitter Checklist:
git rebase -i
to squash commits (if needed).Test Plan:
Reviewer Checklist:
Tests