Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Add option to disable top site suggestions #9063

Merged
merged 1 commit into from
Jun 2, 2017
Merged

Add option to disable top site suggestions #9063

merged 1 commit into from
Jun 2, 2017

Conversation

luixxiul
Copy link
Contributor

@luixxiul luixxiul commented May 26, 2017

Closes #4977

Auditors:

Test Plan 1:

  1. Open about:preferences#search
  2. Disable Show top site matches
  3. Open a new tab
  4. Input face
  5. Make sure that there does not appear the suggestions list

Test Plan 2:

  1. Open about:preferences#search
  2. Enable Show top site matches
  3. Open a new tab
  4. Input face
  5. Make sure there appears the suggestions list, which has facebook.com

Submitter Checklist:

  • Submitted a ticket for my issue if one did not already exist.
  • Used Github auto-closing keywords in the commit message.
  • Added/updated tests for this change (for new code or code which already has tests).
  • Ran git rebase -i to squash commits (if needed).

Reviewer Checklist:

Tests

  • Adequate test coverage exists to prevent regressions
  • Tests should be independent and work correctly when run individually or as a suite ref
  • New files have MPL2 license header

@luixxiul
Copy link
Contributor Author

luixxiul commented May 26, 2017

Help wanted:

  1. Clear the profile
  2. Open about:preferences#search
  3. Disable all of the options
  4. Input ja on the URL bar

Actual result: java.com is autocompleted.

Expected result: nothing should be autocompleted.

@@ -540,12 +540,15 @@ const getSearchSuggestions = (state, tabId, urlLocationLower) => {

const getAlexaSuggestions = (state, urlLocationLower) => {
return new Promise((resolve, reject) => {
const options = {
Copy link
Member

Choose a reason for hiding this comment

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

Please follow the same pattern as here:
https://github.com/luixxiul/browser-laptop/blob/dd9ad5fe6077165d5d15df2428c5770a235f04d1/app/common/lib/suggestion.js#L504

Basically you resolve with an empty immutable list if the setting is not on.

@bbondy
Copy link
Member

bbondy commented May 26, 2017

We're past the freeze for 0.16.100 so moving this to 0.16.200. Only critical things and regressions are allowed past the freeze, thanks!

@bbondy bbondy modified the milestones: 0.16.200, 0.16.100 May 26, 2017
@luixxiul luixxiul added PR/needs-QA-attention ☕ and removed help wanted The PR/issue opener needs help to complete/report the task. labels May 26, 2017
showHistoryMatches=Show history matches
showBookmarkMatches=Show bookmark matches
showOpenedTabMatches=Show tab matches
showTopsiteMatches=Show top site matches
Copy link
Contributor

Choose a reason for hiding this comment

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

while it follows this prefs pattern, wouldn't be better to say "show top site suggestions" instead?

Copy link
Contributor Author

@luixxiul luixxiul Jun 2, 2017

Choose a reason for hiding this comment

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

It looks reasonable. I'm addressing it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed with 4844a15

Copy link
Contributor

@cezaraugusto cezaraugusto left a comment

Choose a reason for hiding this comment

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

left a comment, but just my opinion. lgtm

Closes #4977

Auditors:

Test Plan 1:
1. Open about:preferences#search
2. Disable 'Show top site matches'
3. Open a new tab
4. Input 'face'
5. Make sure that there does not appear the suggestions list

Test Plan 2:
1. Open about:preferences#search
2. Enable 'Show top site matches'
3. Open a new tab
4. Input 'face'
5. Make sure there appears the suggestions list, which has facebook.com
@luixxiul
Copy link
Contributor Author

luixxiul commented Jun 2, 2017

@cezaraugusto the two commits were squashed and rebased.

I'm going to replace the label with ready-for-merge.

Copy link
Contributor

@cezaraugusto cezaraugusto left a comment

Choose a reason for hiding this comment

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

changes look great, no regression in tests. Travis shows one suspicious test failing (ref: https://travis-ci.org/brave/browser-laptop/jobs/238833472#L3308) but I tested locally and it passes. Nice work ++

@cezaraugusto cezaraugusto merged commit a87307f into brave:master Jun 2, 2017
Copy link
Member

@bsclifton bsclifton left a comment

Choose a reason for hiding this comment

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

Great job on this one! ++ 😄 👍

@luixxiul luixxiul deleted the topsite-suggestions-option branch June 3, 2017 01:53
@luixxiul
Copy link
Contributor Author

luixxiul commented Jun 3, 2017

thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants