-
Notifications
You must be signed in to change notification settings - Fork 921
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
New welcome flow for default search #2479
Conversation
ce90d21
to
d098410
Compare
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.
left comments regarding locale
thanks @imptrx! front-end is good to go |
Will start checking out the back end parts today 😄 |
0d7b6d0
to
0e87b15
Compare
searchProviders: Array<any> | ||
} | ||
|
||
interface SearchEngineEntry { |
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.
Example entry (returned from the SearchEnginesHandler
):
{
"canBeDefault": true,
"canBeEdited": true,
"canBeRemoved": true,
"default": false,
"displayName": "DuckDuckGo",
"iconURL": "https://duckduckgo.com/favicon.ico",
"id": 3,
"isOmniboxExtension": false,
"keyword": ":d",
"modelIndex": 1,
"name": "DuckDuckGo",
"url": "https://duckduckgo.com/?q=%s&t=brave",
"urlLocked": true
}
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.
@imptrx could you move this interface to welcome.d.ts file?
@rebron @imptrx @cezaraugusto let's meet up on this one 😄 Because of how I implemented the back-end (it sets it immediately), the button next to the drop down likely isn't needed (at the moment, it does the same thing as hitting next, but that's all it does) |
@rossmoody thoughts on #2479 (comment)? |
I built this branch and I actually quite like the functionality we have going on here. I think it's important we keep the button, though. Both cause it signals to the user to make a decision by being disabled but also because it gives them a place to feel like they "confirmed" the choice (even if technically the setting is in place already) instead of advancing what might seem abruptly. |
78c8597
to
8b0be62
Compare
Awesome, thanks @rossmoody 😄I guess this is ready for official review! Did you want to be one of the lucky people to hit the review button? edit: fixing lint... |
@bsclifton there was a more detailed spec that got posted in the sister PR: brave/brave-ui#472 (comment). I can address those details as well as the changes requested |
@imptrx awesome, sounds great! 😄 Thanks |
4ffcdda
to
b0a3483
Compare
@bsclifton @cezaraugusto I think this PR is good for another review 😄I've moved the majority of the chrome API logic into redux and added some tests around those. Once everything checks out I'll clean up/squash the commits into chunks |
components/test/brave_welcome_ui/actions/welcome_actions_test.ts
Outdated
Show resolved
Hide resolved
592f684
to
b002307
Compare
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.
Code changes look great! Nice and clean. Code also works as expected. Great job with squashing on this one. 😻
Don't forget to add closing keywords to the commit! For example:
Fixes https://github.com/brave/brave-browser/issues/1548
(so that GitHub will auto-close the issue when this is merged)
Quick note- I did see this in the console - not sure if it's a show-stopper (I compiled release mode)
|
c6d88ab
to
db09fd8
Compare
@bsclifton @cezaraugusto @rebron It looks like when we initially load the welcome(with a blank profile) here is the current behavior:
So I believe the issue as mentioned earlier is that Brave needs to set a search engine list (along with the current partner default provider for the region) before we try to load any pages. Would that be something we can do on the C++ side? |
@imptrx checking it out now... |
@imptrx I pushed a fix and verified it works with fresh profiles. I believe a race condition was happening
With this updated logic, it'll render twice. Once before the request finishes and once after 👍 |
784c711
to
91dde78
Compare
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.
++ great work here! clean code, manual test pass, unit tests cover key features. nice work @imptrx @bsclifton! I'd approve this 10x
waiting on Jenkins before merge |
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.
😎👌
Submitter Checklist:
npm test brave_unit_tests && npm test brave_browser_tests && npm run test-security
) onnpm run lint
)git rebase master
(if needed).git rebase -i
to squash commits (if needed).Test Plan:
Reviewer Checklist:
After-merge Checklist:
changes has landed on.