-
Notifications
You must be signed in to change notification settings - Fork 903
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
[Brave News] Look for missing favicons in the FaviconService #15667
Conversation
A Storybook has been deployed to preview UI for the latest push |
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 haven't finished reviewing and testing, but just wanted to give initial feedback first
components/brave_new_tab_ui/components/default/braveToday/useVisible.ts
Outdated
Show resolved
Hide resolved
22270e1
to
37e3d83
Compare
A Storybook has been deployed to preview UI for the latest push |
@petemill how does this look to you? |
37e3d83
to
368dc76
Compare
368dc76
to
ec62fd1
Compare
A Storybook has been deployed to preview UI for the latest push |
components/brave_new_tab_ui/components/default/braveToday/useUnpaddedImageUrl.ts
Outdated
Show resolved
Hide resolved
@@ -16,6 +18,46 @@ interface Options { | |||
} | |||
|
|||
const cache: { [url: string]: string } = {} | |||
function useFavicon (publisherId: string | undefined) { | |||
const [url, setUrl] = React.useState<string>() |
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.
nit: I wonder if it avoids a re-render for subsequent (different) calls to useFavicon
with the same publisherId
if we initialize this state variable to the potential cache version, i.e. ... = React.useState(cache[publisherId])
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.
++ 👍🏼
A Storybook has been deployed to preview UI for the latest push |
Verification's on Nightly were completed via #15820 (comment) before uplifting the above into |
Resolves brave/brave-browser#26266
Brave News Direct sources, with favicons
Submitter Checklist:
QA/Yes
orQA/No
;release-notes/include
orrelease-notes/exclude
;OS/...
) to the associated issuenpm run test -- brave_browser_tests
,npm run test -- brave_unit_tests
,npm run lint
,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan: