-
Notifications
You must be signed in to change notification settings - Fork 975
Add Auto-suggest sites option, to prefs and urlBar #6422
Add Auto-suggest sites option, to prefs and urlBar #6422
Conversation
@mrose17 I know you and @cezaraugusto have been working out the remaining work. As it stands now, what's left? |
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.
LGTM
} | ||
} | ||
|
||
.paymentsMessage { | ||
background-color: @lightGray; | ||
border-radius: @borderRadiusUIbox; | ||
margin: @walletBarMargin; | ||
margin-top: @walletBarMargin; |
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.
This fixes the regression I introduced with the former commit of the PR.
Test Plan:
- Disable payments
- Make sure the sidebar is not wrapped
@@ -745,6 +743,12 @@ | |||
min-height: @urlbarFormHeight; | |||
min-width: @urlbarFormHeight; | |||
-webkit-app-region: no-drag; |
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.
@cezaraugusto I added this here because I thought this is required for .addPublisherButtonContainer
too. Is it OK?
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.
ok, thanks!
@cezaraugusto I believe this is complete, right? Did you finish with tests? @jkup had some great examples you can check out here: |
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'm trying this out and just found a small issue... otherwise, it looks great
Here's the issue I found. If it's too large, we can create a new issue for it and resolve at a later date
|
@mrose17 @bradleyrichter the PR still needs some work, but in the meantime, I have pushed a copy of Cezar's fork into the main |
Needs some rebase and tests, but works as-is. Thanks @bsclifton |
@cezaraugusto I added tiny fixes. |
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.
As-is, we have a few problems
- The hostPattern in
navigationBar.js
only allows for HTTPS, so this logic doesn't work for HTTP sites - The first page load doesn't show the icon. To demo, visit https://en.wikipedia.org/wiki/Main_Page. If the icon shows for you, pick another language on the left (which you haven't viewed before). When doing the first load, you'll notice the bitcoin icon does NOT show
@bsclifton, actually for For first page load issue, I found that issue but was intermittent so thanks for describing STR. I did a push with a fix, lmk if that's was addressed. @luixxiul rebased and amended with your previous one, lmk if it's good now, thanks!! |
file changed count: 465?? @cezaraugusto |
display: flex; | ||
align-items: center; | ||
height: 25px; | ||
width: 25px; |
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.
Let's remove those added properties above in .addPublisherButtonContainer
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.
cf: 2075547
@cezaraugusto It seems that you're including other files on your local machine |
@@ -671,6 +671,7 @@ | |||
content: ' '; | |||
position: absolute; | |||
background: #fff; | |||
border: 1px solid @focusUrlbarOutline; |
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.
This needs removing too.
cf: https://github.com/cezaraugusto/browser-laptop/commit/7b4ab6ffc7a93385427a9424e1a1a74d6dd695f9
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.
updated, thanks!
I checked LESS files were updated, thanks for updating :-) |
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.
OK- just gave this a go... awesome work 😄
Almost everything works as expected. I only noticed one problem. Basically, if I have these conditions:
- fresh session (move the folder out of the way)
- Auto suggest sites disabled
And I visit a site which I had not been to before (ex: brianbondy.com), then I am properly shown the bitcoin icon in the URL bar. However, if I click it and then go into preferences > Payments, it doesn't immediately get added to the list. This is because the list is considering the advanced settings.
Is there a way to force the site through? If so and it's an easy fix, let's do it 😄 otherwise let's create an issue and we can follow up on this soon!
(otherwise approved! again- great job 😄)
@bsclifton we could create an action to force the publisher to be on ledger payments and skip settings rules (min visit/min timestamp). Currently it will be enabled once you hit the bitCoin icon but will not be included unless advanced settings' rules are fulfilled. Can't say however if we should delay this PR in favour of adding it, or it's ok to do that as a follow-up. @mrose17 what do you think? |
this.props.ledgerData.get('created') && this.enabled | ||
? <Button | ||
l10nId='advancedSettings' | ||
className='advancedSettings whiteButton' |
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.
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.
@cezaraugusto I talked with @mrose17 and created #6592 as a follow up. Approved! 😄
@cezaraugusto: Will you please not drop my 7ccae16 of this PR as the original one |
ok @cezaraugusto, because #6101 was merged into 0.13-branch, will you drop 3e791cb of this PR? As I've asked you, please do not drop 7ccae16. Thanks :-) |
PR updated with automated tests |
@cezaraugusto please drop 3339539 which has been already merged in |
I rebased and did a force update and for some reason, GitHub closed this?! |
ok I understand what I did wrong (this was completely my fault). I didn't set the tracking for your remote when I did the rebase Should be easy to fix though! @cezaraugusto, can you re-push your local branch to your fork? It should have the sha ecbadaa |
@bsclifton should I too? |
Otherwise please cherry-pick 7ccae16 Edit: Or I would by myself with another PR, which I think is better. Let me know :-) |
Auditors: @mrose17, @bsclifton
Fix #6261
PR adds a new "auto-suggest sites" option, and a "remote control" for that option on URL bar.
Screenshots:
Test plan
Automated tests:
Manual tests:
Case 1 (Publisher exists and is disabled)
Case 2 (Publisher exists and is enabled)
Case 3 (Publisher doesn't exist yet)
Edge Case 1 (User has both "auto-suggest sites" and "only show included sites" options enabled)
Edge Case 2 (User has Payments disabled)
Merge notes
Must be merged AFTER #6101