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

Favicon and color fixes for Shields v2 #12994

Merged
merged 2 commits into from
Apr 13, 2022
Merged

Favicon and color fixes for Shields v2 #12994

merged 2 commits into from
Apr 13, 2022

Conversation

nullhook
Copy link
Contributor

@nullhook nullhook commented Apr 12, 2022

Resolves brave/brave-browser#22214
Resolves brave/brave-browser#22161
Resolves brave/brave-browser#22217
Resolves brave/brave-browser#22284
Resolves brave/brave-browser#22283

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:

@nullhook nullhook requested a review from simonhong April 12, 2022 19:58
@github-actions github-actions bot added the CI/storybook-url Deploy storybook and provide a unique URL for each build label Apr 12, 2022
@brave-builds
Copy link
Collaborator

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

@@ -38,6 +38,7 @@ function App () {
const onVisibilityChange = () => {
if (document.visibilityState === 'visible') {
getPanelBrowserAPI().panelHandler.showUI()
getPanelBrowserAPI().dataHandler.updateFavicon()
Copy link
Member

Choose a reason for hiding this comment

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

Curious only needs explicit favicon update?

Copy link
Contributor Author

@nullhook nullhook Apr 13, 2022

Choose a reason for hiding this comment

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

yes, internally i'm sending favicon url as site_block_info_.favicon_url - on an active tab it will send the right url but sometimes resources take time to load and favicon hasn't been downloaded to the disk so OnFavIconUpdate() the favicon_url will update by cache busting.

However, when opening the panel while it's cached on a new webcontents (tab) it doesn't trigger an update, so dataHandler.updateFavicon() here helps do that. A non-cached panel can easily get the updated url from site_block_info_

@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

@nullhook nullhook merged commit 3449500 into master Apr 13, 2022
@nullhook nullhook deleted the shields_v2_bugs branch April 13, 2022 22:59
@nullhook nullhook added this to the 1.39.x - Nightly milestone Apr 14, 2022
@stephendonner
Copy link
Contributor

Verified PASSED using

Brave 1.39.68 Chromium: 101.0.4951.34 (Official Build) nightly (x86_64)
Revision 8f93af5d759634c5256b65997dedd138ed60992f-refs/branch-heads/4951@{#710}
OS macOS Version 12.4 (Build 21F5048e)

Checked:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment