Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

search input: Only insert type:symbol when necessary#50183

Merged
fkling merged 2 commits into
mainfrom
fkling/search-input-symbol-completion-type
Apr 17, 2023
Merged

search input: Only insert type:symbol when necessary#50183
fkling merged 2 commits into
mainfrom
fkling/search-input-symbol-completion-type

Conversation

@fkling

@fkling fkling commented Mar 30, 2023

Copy link
Copy Markdown
Contributor

At the moment symbol suggestions will always insert 'type:symbol', which can produce incorrect queries if the current query already contains a 'type:' filter. This PR builds on top of #50554 and only inserts a 'type:' filter if the relevant branch of the query doesn't already contain one.

sg-search-input-symbol-type.mp4

Test plan

  • Enter a query into the search input that triggers symbols suggestions and select a symbol suggestions -> the suggestion is inserted with type:symbol
  • Like above but also include e.g. type:diff in the query -> only the symbol name (not type:symbol) is inserted into the input

App preview:

Check out the client app preview documentation to learn more.

@cla-bot cla-bot Bot added the cla-signed label Mar 30, 2023
@fkling fkling changed the title WIP query parsing: Simplify parser and extract analysis function search input: Only insert type:symbol when necessary Apr 12, 2023
@fkling fkling changed the base branch from main to fkling/refactor-query-parser April 12, 2023 16:06
@fkling fkling requested a review from a team April 12, 2023 16:06
@fkling fkling marked this pull request as ready for review April 12, 2023 16:06
@sourcegraph-bot

sourcegraph-bot commented Apr 12, 2023

Copy link
Copy Markdown
Contributor

Codenotify: Notifying subscribers in CODENOTIFY files for diff 1d4e0c5...86a6d29.

Notify File(s)
@limitedmage client/web/src/search/input/suggestions.ts

@fkling fkling force-pushed the fkling/refactor-query-parser branch from 643739d to a99f681 Compare April 17, 2023 10:04
Base automatically changed from fkling/refactor-query-parser to main April 17, 2023 11:54
@fkling fkling force-pushed the fkling/search-input-symbol-completion-type branch from a2c6197 to 62b61c6 Compare April 17, 2023 11:56
@sg-e2e-regression-test-bob

sg-e2e-regression-test-bob commented Apr 17, 2023

Copy link
Copy Markdown

Bundle size report 📦

Initial size Total size Async size Modules
0.00% (0.00 kb) 0.00% (+0.14 kb) 0.00% (+0.14 kb) 0.00% (0)

Look at the Statoscope report for a full comparison between the commits 86a6d29 and 1d4e0c5 or learn more.

Open explanation
  • Initial size is the size of the initial bundle (the one that is loaded when you open the page)
  • Total size is the size of the initial bundle + all the async loaded chunks
  • Async size is the size of all the async loaded chunks
  • Modules is the number of modules in the initial bundle

fkling added 2 commits April 17, 2023 15:02
At the moment symbol suggestions will always insert 'type:symbol',
which can produce incorrect queries if the current query already
contains a 'type:' filter.

This PR builds on top of #50554 and only inserts a 'type:' filter if the
relevant branch of the query doesn't already contain one.
@fkling fkling force-pushed the fkling/search-input-symbol-completion-type branch from 51e90e2 to 86a6d29 Compare April 17, 2023 13:03
@fkling fkling merged commit 68e620c into main Apr 17, 2023
@fkling fkling deleted the fkling/search-input-symbol-completion-type branch April 17, 2023 14:18
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.

4 participants