brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
17.05k stars 2.23k forks source link

Enable rich version of Brave Search suggestions #29997

Closed rebron closed 1 month ago

rebron commented 1 year ago

Description

Brave Search provides a richer version of autocomplete suggestions and should be supported in the address bar.

Expected result

  1. Type in a keyword such as bicycle
  2. Compare autocomplete in Brave Search https://search.brave.com with the address bar.
  3. Richer autocomplete which displays thumbnail preview should display with the address bar autocomplete.
Screenshot 2023-04-25 at 8 45 18 PM Screenshot 2023-04-25 at 8 46 21 PM

Reproduces how often:

Easily

Desktop Brave version:

Tbd.

Android Device details:

Version/Channel Information:

Other Additional Information:

Miscellaneous Information:

Related issue: https://github.com/brave/brave-browser/issues/29517

sangwoo108 commented 1 month ago

As our rich suggest and Google's have different format, we need to duck type our return type or make our own suggest parser.

Ours

[
    "hel",
    [
        {
            "is_entity": true,
            "q": "helldivers 2",
            "name": "Helldivers 2",
            "desc": "2024 video game developed by Arrowhead Game Studios",
            "category": "game",
            "img": "https://imgs.search.brave.com/To3SrgqTzUM9ADdXKrWxzAhplxPLgTggBSsPrF61GFo/rs:fit:60:60:1/g:ce/aHR0cHM6Ly91cGxv/YWQud2lraW1lZGlh/Lm9yZy93aWtpcGVk/aWEvZW4vZS9lNy9I/ZWxsZGl2ZXJzMmNv/dmVyLnBuZw",
            "logo": false
        },
        {
            "is_entity": true,
            "q": "hellblade 2",
            "name": "Senua's Saga: Hellblade 2",
            "desc": "2024 video game developed by Ninja Theory",
            "category": "game",
            "img": "https://imgs.search.brave.com/nrs9c-V5TYx2nqREOO7ujz1AKnkSDcZOisGnGRemfh8/rs:fit:60:60:1/g:ce/aHR0cHM6Ly91cGxv/YWQud2lraW1lZGlh/Lm9yZy93aWtpcGVk/aWEvZW4vZS9lZC9T/ZW51YSUyN3NfU2Fn/YV9IZWxsYmxhZGVf/SUlfY292ZXJfYXJ0/LnBuZw",
            "logo": false
        },
        {
            "is_entity": true,
            "q": "hellblade",
            "name": "Hellblade: Senua's Sacrifice",
            "desc": "2017 action-adventure video game developed by Ninja Theory",
            "category": "game",
            "img": "https://imgs.search.brave.com/0UUsGydIw7LeJLMczBnYuZTtW84D9v2WfOxF_a-B7lU/rs:fit:60:60:1/g:ce/aHR0cHM6Ly91cGxv/YWQud2lraW1lZGlh/Lm9yZy93aWtpcGVk/aWEvZW4vZC9kNC9I/ZWxsYmxhZGVfLV9T/ZW51YSUyN3NfU2Fj/cmlmaWNlLmpwZw",
            "logo": false
        },
        {
            "is_entity": true,
            "q": "hello",
            "name": "Hello (Adele song)",
            "desc": "original song written and composed by Adele and Greg Kurstin",
            "category": "music",
            "img": "https://imgs.search.brave.com/QTG3_ROHWwda_t_5YJtViIQJVQ1WZeOj_czqWj_KiJU/rs:fit:60:60:1/g:ce/aHR0cHM6Ly91cGxv/YWQud2lraW1lZGlh/Lm9yZy93aWtpcGVk/aWEvZW4vOC84NS9B/ZGVsZV8tX0hlbGxv/XyUyOE9mZmljaWFs/X1NpbmdsZV9Db3Zl/ciUyOS5wbmc",
            "logo": false
        },
        {
            "is_entity": true,
            "q": "helldivers",
            "name": "Helldivers",
            "desc": "2015 video game",
            "category": "game",
            "img": "https://imgs.search.brave.com/y0tgKST0YN55NY3XvN8FAMmDdabdqlzVqXRUA9jFwa4/rs:fit:60:60:1/g:ce/aHR0cHM6Ly91cGxv/YWQud2lraW1lZGlh/Lm9yZy93aWtpcGVk/aWEvZW4vYy9jNy9I/ZWxsZGl2ZXJzX2Fy/dC5qcGc",
            "logo": false
        },
        {
            "is_entity": true,
            "q": "hello fresh",
            "name": "Hello Fresh",
            "desc": "HelloFresh. German meal-kit provider",
            "category": "company",
            "img": "https://imgs.search.brave.com/42psJ4N1MYrwuq3edk_4dFJW2eLhbxhmy8_fpeTanQk/rs:fit:60:60:1/g:ce/aHR0cHM6Ly91cGxv/YWQud2lraW1lZGlh/Lm9yZy93aWtpcGVk/aWEvZW4vMy8zZC9I/ZWxsb0ZyZXNoLnBu/Zw",
            "logo": false
        },
        {
            "is_entity": true,
            "q": "helena bonham carter",
            "name": "Helena Bonham Carter",
            "desc": "English-born British actress",
            "category": "person",
            "img": "https://imgs.search.brave.com/EzLBSQs0wTXS6ZarraSkaRrj2YqX6VN-8zWT5Kx_FSk/rs:fit:60:60:1/g:ce/aHR0cHM6Ly91cGxv/YWQud2lraW1lZGlh/Lm9yZy93aWtpcGVk/aWEvY29tbW9ucy82/LzZlL0hlbGVuYV9C/b25oYW1fQ2FydGVy/XzIwMTFfQUEuanBn",
            "logo": false
        },
        {
            "is_entity": true,
            "q": "helsinki",
            "name": "Helsinki",
            "desc": "capital and most populous city of Finland",
            "category": "city",
            "img": "https://imgs.search.brave.com/sX947530LWxJr11TQnQoNcLCEo9b6W5_GuorNTcJYQ4/rs:fit:60:60:1/g:ce/aHR0cHM6Ly91cGxv/YWQud2lraW1lZGlh/Lm9yZy93aWtpcGVk/aWEvY29tbW9ucy9i/L2IyL0NpdHlfQnJh/bmRpbmdfb2ZfSGVs/c2lua2kuc3Zn.svg",
            "logo": true
        }
    ]
]

Google's

[
    "hel",
    [
        "hello",
        "hello",
        "helldivers",
        "helltide",
        "helm",
        "helldivers 2",
        "hello lms",
        "hello world",
        "hello world",
        "help"
    ],
    [
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        ""
    ],
    [],
    {
        "google:clientdata": {
            "bpc": false,
            "tlw": false
        },
        "google:suggestdetail": [
            {},
            {
                "google:entityinfo": "Cg0vZy8xMWJ3bmg3ODBiEhvtl6zroZwg4oCUIOyVhOuNuOydmCDrhbjrnpgyZGh0dHBzOi8vZW5jcnlwdGVkLXRibjAuZ3N0YXRpYy5jb20vaW1hZ2VzP3E9dGJuOkFOZDlHY1NRVklxRE1NWE13aHBTbnFRV3JFc3pWV2RySlBPSmlJMnlDcUNkYmhFJnM9MTA6BWhlbGxvSgcjNDI0MjQyUjJnc19zc3A9ZUp6ajR0VlAxemMwVENyUHl6QzNNRWd5WVBSaXpVak55Y2tIQUVqWEJvTXAC"
            },
            {
                "google:entityinfo": "CgovbS8wd3h5djlnEiTtl6zri6TsnbTrsoTspogg4oCUIOu5hOuUlOyYpCDqsozsnoQyZGh0dHBzOi8vZW5jcnlwdGVkLXRibjAuZ3N0YXRpYy5jb20vaW1hZ2VzP3E9dGJuOkFOZDlHY1RoY0h0Vmg1OHZfc2ltbjlQdlFteWJkRmZGRlcxLVQ3NlNKeGxOTnprJnM9MTA6C0hFTEwgRElWRVJTSgcjODk3NjFlUjVnc19zc3A9ZUp6ajR0TFAxVGNvcjZnc3MwdzNZUFRpeWtqTnlVbkpMRXN0S2dZQVliRUlSUXAE"
            },
            {},
            {},
            {
                "google:entityinfo": "Cg0vZy8xMXN0XzdzX3dfEibtl6zri6TsnbTrsoTspoggMiDigJQg67mE65SU7JikIOqyjOyehDJkaHR0cHM6Ly9lbmNyeXB0ZWQtdGJuMC5nc3RhdGljLmNvbS9pbWFnZXM/cT10Ym46QU5kOUdjVGhjSHRWaDU4dl9zaW1uOVB2UW15YmRGZkZGVzEtVDc2U0p4bE5Oemsmcz0xMDoMaGVsbGRpdmVycyAySgcjODk3NjFlUjtnc19zc3A9ZUp6ajR0VlAxemMwTEM2Sk55LU9MNDgzWVBUaXlVak55VW5KTEVzdEtsWXdBZ0NLQWdsdnAE"
            },
            {},
            {
                "google:entityinfo": "Cg0vZy8xMWgwX2gxYzRjEg4yMDE564WEIOyYge2ZlDJ0aHR0cHM6Ly9lbmNyeXB0ZWQtdGJuMC5nc3RhdGljLmNvbS9pbWFnZXM/cT10Ym46QU5kOUdjUW5JR29FUTU2X3o4ZTdFTlVHVjdPb1pZcUVFN1lIQ25kV1RVMlF5UU1jZmZfUkRmQXlPZ2dIUlZnJnM9MTA6C0hFTExPIFdPUkxESgcjOTc2ZjNjUjpnc19zc3A9ZUp6ajR0VlAxemMwekRDSXp6Qk1Oa2syWVBUaXprak55Y2xYS004dnlra0JBSE92Q0tzcBQ\u003d"
            },
            {},
            {}
        ],
        "google:suggestrelevance": [
            601,
            600,
            557,
            556,
            555,
            554,
            553,
            552,
            551,
            550
        ],
        "google:suggestsubtypes": [
            [
                512,
                433,
                131,
                355
            ],
            [
                512,
                433,
                131
            ],
            [
                512
            ],
            [
                512,
                433,
                131
            ],
            [
                512,
                433,
                131
            ],
            [
                512,
                433
            ],
            [
                512
            ],
            [
                512,
                433,
                131,
                340
            ],
            [
                512,
                433,
                131
            ],
            [
                512,
                433,
                131
            ]
        ],
        "google:suggesttype": [
            "QUERY",
            "ENTITY",
            "ENTITY",
            "QUERY",
            "QUERY",
            "ENTITY",
            "QUERY",
            "ENTITY",
            "QUERY",
            "QUERY"
        ],
        "google:verbatimrelevance": 851
    }
]
MadhaviSeelam commented 1 month ago

Verification PASSED using

Brave | 1.68.84 Chromium: 126.0.6478.40 (Official Build) beta (64-bit)
-- | --
Revision | c5a3b2ff9dcc938c32b2c1b3a66847661db5d005
OS | Windows 11 Version 23H2 (Build 22631.3672)
  1. Installed 1.68.84
  2. launched Brave
  3. opened brave://settings/search in a new tab
  4. enabled Improve search suggestions
  5. entered few letters in the omnibox (Worl, Ire, bic)

Confirmed entities with image and description shown as below

brave://settings/search Worl Ire bic hel
image image image image image
stephendonner commented 1 month ago

Verification PASSED using

Brave | 1.68.86 Chromium: 126.0.6478.56 (Official Build) beta (x86_64)
-- | --
Revision | b4eadb4942277a3eb455fc7c3c8569185bd745af
OS | macOS Version 11.7.10 (Build 20G1427)
  1. Installed 1.68.84
  2. launched Brave
  3. opened brave://settings/search in a new tab
  4. enabled Improve search suggestions
  5. entered a few terms/letters in the omnibox (coca, links, Doctor Who, manga)

Confirmed entities with image and description shown as below

brave://settings/search coca links doctor manga
Screen Shot 2024-06-12 at 3 52 01 PM Screen Shot 2024-06-12 at 4 04 12 PM Screen Shot 2024-06-12 at 4 09 13 PM Screen Shot 2024-06-12 at 4 10 43 PM Screen Shot 2024-06-12 at 4 13 21 PM
stephendonner commented 1 month ago

Verification PASSED using

Brave   1.68.87 Chromium: 126.0.6478.56 (Official Build) beta (64-bit) 
Revision    786b6b66ebe624e5c4ef760b3fe3047ea61932de
OS  Linux

Steps:

  1. installed 1.68.87
  2. launched Brave
  3. opened brave://settings/search in a new tab
  4. enabled Improve search suggestions
  5. entered a few terms/letters in the omnibox (fur, balls, fort, tank)

Confirmed entities with image and description shown as below

fur --> furiosa and mad max: fury road images and descriptions returned balls --> Balls of Furty and Ballston Spa, NY images and descriptions returned fort --> Fortnight and Fort Lauderale, FL images and descriptions returned tank --> tank, Tank Abbott, and Tank Girl images and descriptions returned

brave://settings/search fur balls fort tank
Screen Shot 2024-06-13 at 3 03 09 PM Screen Shot 2024-06-13 at 3 03 21 PM Screen Shot 2024-06-13 at 3 03 38 PM Screen Shot 2024-06-13 at 3 04 58 PM Screen Shot 2024-06-13 at 3 10 15 PM
hffvld commented 2 weeks ago

Verified on Galaxy Tab S8 and Pixel 7 using version(s):

Device/OS: 
- Galaxy Tab S8 / gts8wifixx-user 14 UP1A.231005.007 release-keys
- Pixel 7 / panther_beta-user 15 AP31.240517.031 release-keys
Brave build: 1.68.101
Chromium: 126.0.6478.126 (Official Build) beta (64-bit) 

STEPS:

  1. Launch Brave
  2. Settings > Brave Shields & privacy > Enable Improve search suggestions
  3. Go back and tap in a URL search bar
  4. Type:
    • tiger > Verify that thumbnails for Tiger and Tiger Woods are shown
    • brave > Verify that thumbnails for Brave search and Atlanta Braves are shown
    • car > Verify that thumbnails for CarMax and Carvana are shown
    • cat > Verify that thumbnails for Cathay Pacific and Cate Blanchett are shown
    • wall > Verify that thumbnails for Wallpaper Engine is shown
    • iron > Verify that thumbnails for Iron, Ironmouse, Iron Man and The Iron Claw (film) are shown

ACTUAL RESULTS:


Improve search suggestions is OFF Improve search suggestions is ON
1 2
1 2
1 2
1 2

Pixel 7

Improve search suggestions is OFF Improve search suggestions is ON
1 2
1 2
1 2
1 2