-
Notifications
You must be signed in to change notification settings - Fork 900
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
set shields interface views as a global default in settings #2973
Conversation
d8a4161
to
6c471e3
Compare
browser/resources/settings/default_brave_shields_page/default_brave_shields_page.html
Outdated
Show resolved
Hide resolved
53ce545
to
3b52ba4
Compare
IMO, using webui message seems more proper than extension api for this. WDYT? cc: @petemill |
@simonhong This is using the existing |
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.
👍 🤜 🤛 💯 Pushed a successful rebase on master. Ran through some manual tests and I updated the PR description with more detailed test case of what I ran through (observing both settings page and shields popup reflects the setting value). Settings page addition looks great 🎨.
Let's see what CI has to say...
@petemill |
browser/resources/settings/default_brave_shields_page/default_brave_shields_page.html
Outdated
Show resolved
Hide resolved
browser/resources/settings/default_brave_shields_page/default_brave_shields_page.html
Outdated
Show resolved
Hide resolved
I pushed a change to use the |
2025e6c
to
bded845
Compare
"whitelist": [ | ||
"63ED55E43214C211F82122ED56407FF1A807F2A3", // Media Router Dev | ||
"226CF815E39A363090A1E547D53063472B8279FA" // Media Router Release | ||
+ , "A321D47A2B4CA86898167A55CA8B2E02385EA7CD" // Brave Shields |
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.
@bridiver there's a few ways to approach this:
- Keep this .patch of _permission_features.json
- Overwrite the settingsPrivate entry in _api_features.json using the same technique we're doing for other APIs. Disadvantage: requires duplicating security-focused chromium code and is a risk IMO.
- Overwrite _permission_features.json in the same way we overwrite _api_features.json. Comes with same risk as 2)?.
- Invent a new way to inject additions to the JSON of _api_features.json or _permission_features.json without overwriting the chromium source.
(Preferrably as a follow-up to unblock @cezaraugusto 's feature in this PR).
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.
see brave/common/extensions/api/_api_features.json
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.
oh, this is permissions, but easy to copy it
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 is pretty trivial change so I think we should fix before merging
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.
@bridiver added _api_permissions.json, please review
components/brave_extension/extension/brave_extension/braveShieldsPanel.tsx
Show resolved
Hide resolved
Fixed the unit tests by mocking chrome.settingsPrivate here: https://github.com/brave/brave-core/pull/2973/files#diff-af22ed52c8ebf2799010b2d6e01b7107R113 |
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 - CI looks like it had passed apart from a lint warning, which I pushed a fix for
…eShields.{get,set}ViewPreferences API
Please make sure that the PR's and associated issues are moved into milestones once completed 👍 |
@cezaraugusto does this need to go to 0.69.x also? I tried to cherry-pick, but ran into some merge conflicts in |
set shields interface views as a global default in settings
@cezaraugusto created #3187 - can you help me make sure this looks good? 😄 |
set shields interface views as a global default in settings
close brave/brave-browser#4784
Submitter Checklist:
Test Plan:
Settings --> Shields
Go to
brave://settings/shields
Select Simple View
Go to a website
Open Shields
--> Expected: Chceck shields view is Simple
Go to
brave://settings/shields
againSelect Advanced View
Go to a website
Open shields
--> Expected: Chceck shields view is Advanced (larger)
Shields --> Settings
Clean profile
Go to a website
Open shields
--> Expected: Shields opens in Simple view (clean profile defaults to "simple")
Toggle option to "Advanced view" inside shields popup
Visit
brave://settings/shields
in another window or tab--> Expected: "Default view" has 'Advanced view' selected
Visit website again
Open Shields
Click 'Simple View' inside shields popup
Switch back to Settings tab / window
--> Expected: "Default view" has 'Simple view' selected
Reviewer Checklist:
After-merge Checklist:
changes has landed on.