Skip to content
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

Updates to shields panel v2 #12523

Merged
merged 1 commit into from
Mar 15, 2022
Merged

Updates to shields panel v2 #12523

merged 1 commit into from
Mar 15, 2022

Conversation

nullhook
Copy link
Contributor

@nullhook nullhook commented Mar 8, 2022

  • Added favicon observer
  • Added "Report site" window
  • Added web component button
  • Modified a specified text color on light theme
  • Don't trigger shields bubble on internal scheme pages
  • Overflow scroll to auto
  • Copy fixes
  • External links should work
  • Added pref boolean check to show/hide block count on icon
  • Added tooltip on the new shields icon

Resolves brave/brave-browser#21416
Resolves brave/brave-browser#21559
Resolves brave/brave-browser#21572
Resolves brave/brave-browser#21570
Resolves brave/brave-browser#21583
Resolves brave/brave-browser#21613
Resolves brave/brave-browser#17369
Resolves brave/brave-browser#21581

Submitter Checklist:

  • I confirm that no security/privacy review is needed, or that I have requested one
  • There is a ticket for my issue
  • Used Github auto-closing keywords in the PR description above
  • Wrote a good PR/commit description
  • Squashed any review feedback or "fixup" commits before merge, so that history is a record of what happened in the repo, not your PR
  • Added appropriate labels (QA/Yes or QA/No; release-notes/include or release-notes/exclude; OS/...) to the associated issue
  • Checked the PR locally: npm run test -- brave_browser_tests, npm run test -- brave_unit_tests, npm run lint, npm run gn_check, npm run tslint
  • Ran git rebase master (if needed)

Reviewer Checklist:

  • A security review is not needed, or a link to one is included in the PR description
  • New files have MPL-2.0 license header
  • Adequate test coverage exists to prevent regressions
  • Major classes, functions and non-trivial code blocks are well-commented
  • Changes in component dependencies are properly reflected in gn
  • Code follows the style guide
  • Test plan is specified in PR before merging

After-merge Checklist:

Test Plan:

@github-actions github-actions bot added the CI/storybook-url Deploy storybook and provide a unique URL for each build label Mar 8, 2022
@nullhook nullhook requested a review from simonhong March 8, 2022 10:01
@simonhong
Copy link
Member

Need to check unit test & storybook failures.

[2022-03-08T10:33:21.066Z]     BraveShieldsDataControllerTest.GetAdBlockMode_ForOrigin (../../brave/browser/ui/brave_shields_data_controller_unittest.cc:299)
[2022-03-08T10:33:21.066Z]     BraveShieldsDataControllerTest.SetAdBlockMode_ForOrigin_1 (../../brave/browser/ui/brave_shields_data_controller_unittest.cc:107)
[2022-03-08T10:33:21.066Z]     BraveShieldsDataControllerTest.SetAdBlockMode_ForOrigin_2 (../../brave/browser/ui/brave_shields_data_controller_unittest.cc:171)
[2022-03-08T10:33:21.066Z]     BraveShieldsDataControllerTest.SetAdBlockMode_ForOrigin_3 (../../brave/browser/ui/brave_shields_data_controller_unittest.cc:235)

@nullhook
Copy link
Contributor Author

nullhook commented Mar 9, 2022

@simonhong Fixed all crashes

@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

Copy link
Member

@simonhong simonhong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't have more comments for c++ side.
I'll pass webui changes review to @petemill

test/BUILD.gn Outdated Show resolved Hide resolved
@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

- Added favicon observer
- Added web component button
@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

Copy link
Member

@petemill petemill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice polish 👍

Just a couple nits or follow-ups

@@ -64,14 +70,13 @@ function TreeList (props: Props) {
</div>
</S.TreeBox>
<S.Footer>
<S.BackButton
type="button"
<Button
aria-label="Back to previous screen"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

follow-up: should be translated

@@ -18,7 +18,7 @@

<message name="IDS_BRAVE_SHIELDS_BROKEN" desc="A footnote below the main Shields switch button.">
If this site seems broken, try Shields down.
<ph name="LINK_BEFORE">$1</ph>Note: this may reduce Brave privacy protections.<ph name="LINK_AFTER">$2</ph>
<ph name="LINK_BEFORE">$1</ph>Note: this may reduce Brave's privacy protections.<ph name="LINK_AFTER">$2</ph>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't really a link is it? Just styling differently for the second line? Also I'm not sure how translations will handle or preserve the line-break (and whether we should rely on that anyway).
I suggest we split in to 2 strings to be simpler.

@petemill
Copy link
Member

Also it feels to me like the buttons which link to the detailed tree lists should have a cursor: pointer since the rest of our buttons seem to

image

@nullhook nullhook merged commit cb120f1 into master Mar 15, 2022
@nullhook nullhook deleted the shields_follow_ups branch March 15, 2022 08:10
@nullhook
Copy link
Contributor Author

merged, will do follow ups on a separate PR

@nullhook nullhook added this to the 1.38.x - Nightly milestone Mar 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment