-
Notifications
You must be signed in to change notification settings - Fork 877
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add brave theme option to settings page #361
Conversation
ad6f91c
to
3828ccc
Compare
6e122a8
to
d0d1e1c
Compare
index c75464dc66ecedd8dbfac47b0dbdb4b6c68fd969..fd62faf174909c5c385277c08bb782bd4127d442 100644 | ||
--- a/chrome/browser/resources/settings/appearance_page/appearance_browser_proxy.js | ||
+++ b/chrome/browser/resources/settings/appearance_page/appearance_browser_proxy.js | ||
@@ -45,6 +45,17 @@ cr.define('settings', function() { |
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 don't understand why we're using this at all if we have our own webui?
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.
brave_appearance_browser_proxy.js is introduced.
</template> | ||
</select> | ||
</div> | ||
+<if expr="not _google_chrome"> |
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.
same with this. Maybe it makes more sense to keep this separate from chrome webstore theme prefs? If we want to keep it under the same heading, seems like we should be able to use the templating engine to insert an html snippet here without patching the whole thing in?
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.
something like {{brave_theme_settings}}
that contains all of this? Not sure if that is possible or not
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.
settings-brave-apperance-page
module is only added.
], | ||
}, | ||
|
||
+ // <if expr="not _google_chrome"> |
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 think we can include another js file here to do this. Talk to @yrliou because she did something similar
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.
example here 45c8a93
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.
brave_appearance_page.js is introduced.
One more thing is remained to remove
@bbondy , can you advice howto add above items to settings_resources.grd? |
@simonhong See script/chromium-rebase-l10n.py for adding entries, you can see brave_page_visibility.js as an example. |
This option is still present when the user has installed a theme extension? The intention is for this toggle to still be present as there are some UI elements that are non-extension-themeable so we will still want the option for those items. |
</template> | ||
</select> | ||
</div> | ||
+ <settings-brave-appearance-page></settings-brave-appearance-page> |
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 can we put this at the top of the appearance section? So that it is next to the extension theme item.
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.
done.
@petemill Yes, our theme option is always effective regardless of user theme extension is installed or not. |
app/brave_generated_resources.grd
Outdated
@@ -138,6 +138,10 @@ By installing this extension, you are agreeing to the Google Widevine Terms of U | |||
<message name="IDS_BLOCKED_AUTOPLAY_NO_ACTION" desc="Radio button choice to continue blocking a site from autoplay media, displayed in bubble when a page tries to autoplay media."> | |||
Continue blocking autoplay | |||
</message> | |||
<!-- Appearance --> | |||
<message name="IDS_SETTINGS_APPEARANCE_SETTINGS_BRAVE_THEMES" desc="The label for brave theme change setting options"> | |||
Brave Themes |
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 had a talk to the design team, please change this string value to Brave colors
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.
done.
90a1f33
to
c2fd3fc
Compare
Removed wip label. I think this is ready to review again! |
c2fd3fc
to
7caab82
Compare
Kindly ping |
With this module, we can simply our apperance options to settings page.
With this, four web resources are added for brave theme options. * brave_appearance_browser_proxy.html * brave_appearance_browser_proxy.js * brave_appearance_page.html * brave_appearance_page.js
7caab82
to
1bd7ce5
Compare
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
Close brave/brave-browser#789
Submitter Checklist:
git rebase -i
to squash commits (if needed).Test Plan:
Open settings page and check theme is changed when brave color option changes.
Reviewer Checklist: