feat(search): remove keyword toggle#63584
Conversation
740abb6 to
d5fdbf4
Compare
d5fdbf4 to
49d6ed1
Compare
49d6ed1 to
209b0dd
Compare
| */ | ||
| export function defaultSearchModeFromSettings(settingsCascade: SettingsCascadeOrError): SearchMode | undefined { | ||
| // When the 'keyword search' language update is enabled, make sure to disable smart search | ||
| if (isKeywordSearchEnabled(settingsCascade)) { |
There was a problem hiding this comment.
Before, we were force overriding the default search mode when keyword search was enabled. This doesn't seem correct, so I simplified and removed this. This required updating the default to SearchMode.Precise in some other places.
Soon it won't even be relevant, since we plan to remove smart search completely.
There was a problem hiding this comment.
Are we planning to remove smart sort before the upcoming release? If not, I would feel better if we disabled smart search if keyword search is active.
There was a problem hiding this comment.
@stefanhengl and I discussed this offline. He highlighted an important risk: maybe we told a customer to enable search.defaultSearchMode: smart many releases ago, now they upgrade, and all searches start to fail.
Instead, we will continue to ignore this setting when keyword search is enabled (always using precise), and explicitly deprecate it.
Good point, I hadn't realized the existing feedback was so noisy. I will remove this. We can revisit this in the future, through a better design that encourages users to give more context. |

This PR removes the keyword search toggle as part of making the feature GA. It
removes the keyword search toggle and popover, but keeps the "call to action"
on the search landing page,
Main changes:
experimentalFeatures.keywordSearch. (Instead, users shouldset
search.defaultPatternType: standard)LegacyTogglesand all references. This duplicatedTogglesand isno longer needed since we unified the implementations.
Closes SPLF-111
Test plan
Added new unit test on patterntype + smart search interactions. Manually tested, including
patterntype=standardto URL, to check we surface it explicitlysearch.defaultPatternTypetoregexpandstandardChangelog
The keyword search toggle has been removed from the search results page. Keyword search is now enabled by default for all searches in the Sourcegraph web app.