-
Notifications
You must be signed in to change notification settings - Fork 859
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
Load WDP on demand #22756
Load WDP on demand #22756
Conversation
7e6f835
to
8c15c10
Compare
@@ -2,13 +2,33 @@ | |||
// This Source Code Form is subject to the terms of the Mozilla Public | |||
// License, v. 2.0. If a copy of the MPL was not distributed with this file, | |||
// you can obtain one at https://mozilla.org/MPL/2.0/. | |||
export {} |
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.
Why is this needed?
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.
Otherwise declare let window: any;
hack doesn't work
// after user has opted in to WDP. This will be especially relevant | ||
// when all shields functionality is removed from this extension. | ||
import { App } from 'gen/brave/web-discovery-project' | ||
declare let window: any; |
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.
Shouldn’t this type exist already? We can extend its type to account for optional WDP attribute if needed.
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.
It's not my code ;)
I suppose it's a general hack to redeclare window
as any
. Of course, better to use https://www.jamestharpe.com/typescript-extend-window/, but it's out of the PR's scope.
My bad, I've occasionally added ;
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 missed that, all good then :)
A Storybook has been deployed to preview UI for the latest push |
// after user has opted in to WDP. This will be especially relevant | ||
// when all shields functionality is removed from this extension. | ||
import { App } from 'gen/brave/web-discovery-project' | ||
declare let window: any; |
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 missed that, all good then :)
8c15c10
to
2c6944c
Compare
A Storybook has been deployed to preview UI for the latest push |
For brave/brave-browser#35645
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
wikinpm run presubmit
wiki,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan:
Check that WDP can load correctly:
config?..
to https://collector.wdp.brave.com