-
Notifications
You must be signed in to change notification settings - Fork 974
Conversation
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.
I love this one
SUPERSIZE: 'supersize' | ||
} | ||
|
||
let zoomLevel = {} |
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.
Shouldn't here be array and not object?
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.
Object makes sense IMO- I use the array style syntax for accessing the object since the dot notation is not available with a variable. ex: zoomLevel.SUPERSIZE won't work, hence zoomLevel[SUPERSIZE]
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.
make sense
value={getSetting(settings.TOOLBAR_UI_SCALE, this.props.settings)} | ||
onChange={changeSetting.bind(null, this.props.onChangeSetting, settings.TOOLBAR_UI_SCALE)}> | ||
data-type='float'> | ||
<option value={scaleSize.SMALLER}>Smaller</option> |
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.
Please translate this values
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.
GREAT catch!! 😄
|
||
moreInfo: { | ||
display: 'flex', | ||
flex: '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.
You don't need string here
const React = require('react') | ||
const ImmutableComponent = require('../immutableComponent') | ||
|
||
const {SettingsList, SettingItem, SettingCheckbox} = require('../settings') |
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.
Can you please reorder imports in something like this: https://github.com/brave/browser-laptop/blob/master/js/components/main.js or https://github.com/brave/browser-laptop/pull/8225/files#diff-169b96dac6a9688438a29c5013735bda
This way it's really easy to find if you are searching for something.
@@ -0,0 +1,61 @@ | |||
/* This Source Code Form is subject to the terms of the Mozilla Public |
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.
+++++ On splitting into a new file ❤️
|
||
const {SettingsList, SettingItem, SettingCheckbox} = require('../settings') | ||
const {SettingDropdown} = require('../dropdown') | ||
const {StyleSheet, css} = require('aphrodite') |
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.
Let's add no-important
to it. CC @cezaraugusto
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.
++ no-important pls
const {StyleSheet, css} = require('aphrodite/no-important')
</SettingItem> | ||
</main> | ||
<footer className={css(styles.moreInfo)}> | ||
<div data-l10n-id='requiresRestart' className='requiresRestart' /> |
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.
can we put requiresRestart
inside commonStyles.js
?
35175ce
to
cef0d2a
Compare
@bradleyrichter, @NejcZdovc, @cezaraugusto, @luixxiul Feedback incorporated! Give it a spin, re-review, let me know what you think 😄 |
@bsclifton There are some conflicts in |
cef0d2a
to
046af3f
Compare
@liunkae thanks for the heads up- rebased 😄 |
|
||
class AdvancedTab extends ImmutableComponent { | ||
render () { | ||
return <div> |
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.
Can you please redo this page so it will be aligned with this new approach that was added in this PR #8237
render () { | ||
return <div> | ||
<main className={css(styles.advancedTabMain)}> | ||
<div className='sectionTitle' data-l10n-id='contentSettings' /> |
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.
Basically you need to change this line in the same was @luixxiul did it https://github.com/brave/browser-laptop/pull/8237/files#diff-e3eeb751016b2ce9f8278efce585a461L659
<SettingCheckbox dataL10nId='sendUsageStatistics' prefKey={settings.SEND_USAGE_STATISTICS} settings={this.props.settings} onChangeSetting={this.props.onChangeSetting} /> | ||
</SettingsList> | ||
|
||
<div className='sectionTitle' data-l10n-id='toolbarUserInterfaceScale' /> |
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.
ditto
…etting there Auditors: @cezaraugusto, @NejcZdovc Test Plan: 1. Open preferences and visit the `Advanced` tab 2. Settings should work as expected; there should be no console errors Add configurable UI scaling. This doesn't affect page size; scaling is only for the browser UI elements Fixes #1937 Auditors: @bradleyrichter, @alexwykoff, @NejcZdovc Test Plan: 1. Open preferences and visit the `Advanced` tab 2. Change the new `Toolbar and UI elements scale` setting. - verify default is `Normal` - choose a smaller size and verify URL bar, nav buttons, etc get smaller - choose a larger size and verify URL bar, nav buttons, etc get larger - verify size of page content does not change This commit incorporates feedback from PR - organize imports - translations for the new drop down values - moved "requires restart" style to commonStyles - switch advancedTab to use aphrodite/no-important - updated zoom values per convo w/ @bradleyrichter - use new `DefaultSectionTitle` tag for the new AdvancedTab component
046af3f
to
6527c55
Compare
@NejcZdovc updated! 😄 |
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 now
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.
this PR is in a higher ground ♫ of quality ++
🎹 |
Break
Preferences > Advanced
into its own fileAuditors: @cezaraugusto, @NejcZdovc
Test Plan:
Advanced
tabAdd configurable UI scaling
NOTE: This doesn't affect page size; scaling is only for the browser UI elements
Fixes #1937
Fixes #4050
Auditors: @bradleyrichter, @alexwykoff, @NejcZdovc
Test Plan:
Advanced
tabToolbar and UI elements scale
setting.Normal
git rebase -i
to squash commits (if needed).Screenshots
New preference (under advanced)
The setting in action