Skip to content
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

Allow deep linking to default search engine dialogs #27223

Merged
merged 1 commit into from
Jan 14, 2025

Conversation

emerick
Copy link
Contributor

@emerick emerick commented Jan 14, 2025

Resolves brave/brave-browser#42999

Makes the dialogs to set the regular default search engine and the default search engine for private windows navigable via deep linking. The link for setting the regular default search engine is brave://settings/search/defaultSearch and the link for setting the default search engine for private windows is brave://settings/search/privateSearch.

Submitter Checklist:

  • I confirm that no security/privacy review is needed and no other type of reviews are needed, or that I have requested them
  • There is a ticket for my issue
  • Used Github auto-closing keywords in the PR description above
  • Wrote a good PR/commit description
  • Squashed any review feedback or "fixup" commits before merge, so that history is a record of what happened in the repo, not your PR
  • Added appropriate labels (QA/Yes or QA/No; release-notes/include or release-notes/exclude; OS/...) to the associated issue
  • Checked the PR locally:
    • npm run test -- brave_browser_tests, npm run test -- brave_unit_tests wiki
    • npm run presubmit wiki, npm run gn_check, npm run tslint
  • Ran git rebase master (if needed)

Reviewer Checklist:

  • A security review is not needed, or a link to one is included in the PR description
  • New files have MPL-2.0 license header
  • Adequate test coverage exists to prevent regressions
  • Major classes, functions and non-trivial code blocks are well-commented
  • Changes in component dependencies are properly reflected in gn
  • Code follows the style guide
  • Test plan is specified in PR before merging

After-merge Checklist:

Test Plan:

  • Clean profile
  • Visit brave://settings/search/defaultSearch
  • Ensure that default search dialog appears and works correctly
  • Ensure that URL bar shows brave://settings/search/defaultSearch
  • Ensure that accepting the new default search engine works
  • After accepting (or cancelling the dialog) the browser should automatically navigate to brave://settings/search
  • Test that the new default search engine works
  • Perform all of the same testing for the private search (brave://settings/search/privateSearch)

@emerick emerick self-assigned this Jan 14, 2025
@emerick emerick requested a review from a team as a code owner January 14, 2025 03:36
@github-actions github-actions bot added the CI/storybook-url Deploy storybook and provide a unique URL for each build label Jan 14, 2025
@emerick emerick force-pushed the emerick-settings-search-engine-deep-linking branch from 12780e7 to ee45669 Compare January 14, 2025 04:34
@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

Copy link
Member

@simonhong simonhong left a comment

Choose a reason for hiding this comment

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

👍🏼

@emerick emerick force-pushed the emerick-settings-search-engine-deep-linking branch from ee45669 to 99312f1 Compare January 14, 2025 12:26
Copy link
Contributor

@fallaciousreasoning fallaciousreasoning left a comment

Choose a reason for hiding this comment

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

nice work!

@emerick emerick merged commit b75abb7 into master Jan 14, 2025
18 checks passed
@emerick emerick deleted the emerick-settings-search-engine-deep-linking branch January 14, 2025 22:29
@github-actions github-actions bot added this to the 1.76.x - Nightly milestone Jan 14, 2025
@brave-builds
Copy link
Collaborator

Released in v1.76.15

emerick added a commit that referenced this pull request Jan 17, 2025
…eep-linking

Allow deep linking to default search engine dialogs
emerick added a commit that referenced this pull request Jan 17, 2025
…eep-linking

Allow deep linking to default search engine dialogs
@LaurenWags
Copy link
Member

LaurenWags commented Jan 20, 2025

Verified with

Brave | 1.76.23 Chromium: 132.0.6834.83 (Official Build) nightly (arm64)
-- | --
Revision | 8648b4550ee6f13d98522ea0437be7bbed94dba9
OS | macOS Version 15.3 (Build 24D5055b)

Using 1.74.48 Chromium: 132.0.6834.83 confirmed visiting brave://settings/search/defaultSearch and brave://settings/search/privateSearch redirected to brave://settings as the deep links don't exist in that version.

Verified test plan from #27223 (comment) for default search deep linking - PASSED

  1. Clean profile 1.76.x
  2. Close and relaunch to pull griffin
  3. Visit brave://settings/search/defaultSearch
  4. Ensure that default search dialog appears and works correctly
Screenshot 2025-01-20 at 11 13 37 AM
  1. Select "Cancel" on the search dialog and confirm you are navigated to brave://settings/search
Screen.Recording.2025-01-20.at.11.13.52.AM.mov
  1. Close this tab
  2. Open a new tab and navigate to brave://settings/search/defaultSearch again and that the search dialog appears again
  3. Ensure that URL bar shows brave://settings/search/defaultSearch
  4. Ensure that you are able to change the default SE from this dialog
Screenshot 2025-01-20 at 11 15 25 AM
  1. Confirm that after selecting "Set as Default" you are automatically navigated to brave://settings/search
  2. Confirm that the newly selected default search engine works
Screen.Recording.2025-01-20.at.11.15.34.AM.mov
  1. Close existing settings tab
  2. Open a new tab and navigate to brave://settings
  3. Use side navigation to get to Search section
  4. Click on "Change" button next to the default SE
  5. Confirm URL reads brave://settings/search/defaultSearch
  6. Cancel this dialog, confirm you are navigated to brave://settings/search
  7. Open a new tab and navigate to any site
  8. Highlight some text on a page and right click
  9. Confirm the context menu uses your chosen SE from previous step
Screenshot 2025-01-20 at 11 19 03 AM
  1. Close and reopen browser
  2. Open a new tab
  3. Confirm previously selected SE is retained for searching from URL bar
Example Example Example
Screenshot 2025-01-20 at 11 20 44 AM Screenshot 2025-01-20 at 11 21 01 AM Screenshot 2025-01-20 at 11 21 12 AM

Verified test plan from #27223 (comment) for private search deep linking - PASSED

  1. Clean profile 1.76.x
  2. Close and relaunch to pull griffin
  3. Visit brave://settings/search/privateSearch
  4. Ensure that default search dialog appears and works correctly
Screenshot 2025-01-20 at 11 40 29 AM
  1. Select "Cancel" on the search dialog and confirm you are navigated to brave://settings/search
Screen.Recording.2025-01-20.at.11.40.42.AM.mov
  1. Close this tab
  2. Open a new tab and navigate to brave://settings/search/privateSearch again and that the search dialog appears again
  3. Ensure that URL bar shows brave://settings/search/privateSearch
  4. Ensure that you are able to change the default SE from this dialog
Screenshot 2025-01-20 at 11 41 54 AM
  1. Confirm that after selecting "Set as Default" you are automatically navigated to brave://settings/search
  2. Confirm that the newly selected private search engine works in private window
Screen.Recording.2025-01-20.at.11.42.48.AM.mov
  1. Close private window and the existing settings tab in normal window
  2. Open a new tab and navigate to brave://settings
  3. Use side navigation to get to Search section
  4. Click on "Change" button next to the private SE
  5. Confirm URL reads brave://settings/search/privateSearch
  6. Cancel this dialog, confirm you are navigated to brave://settings/search
  7. Open a new private window and navigate to any site
  8. Highlight some text on a page and right click
  9. Confirm the context menu uses your chosen SE from previous step
Screenshot 2025-01-20 at 11 51 26 AM
  1. Close and reopen browser
  2. Open a new private window
  3. Confirm previously selected SE is retained for searching from URL bar
Example Example Example
Screenshot 2025-01-20 at 11 52 18 AM Screenshot 2025-01-20 at 11 52 28 AM Screenshot 2025-01-20 at 11 52 37 AM
  1. Confirm default SE is unaffected in normal window (retains default selection)
Screen.Recording.2025-01-20.at.11.53.46.AM.mov

kjozwiak pushed a commit that referenced this pull request Jan 21, 2025
#27273)

Merge pull request #27223 from brave/emerick-settings-search-engine-deep-linking

Allow deep linking to default search engine dialogs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/storybook-url Deploy storybook and provide a unique URL for each build
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add brave://path to support deep linking to Search Engine edit popup in settings
6 participants