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

search ui: highlight path matches for files in root directory#43275

Merged
tbliu98 merged 1 commit into
mainfrom
tl/filename-highlight-fix
Oct 21, 2022
Merged

search ui: highlight path matches for files in root directory#43275
tbliu98 merged 1 commit into
mainfrom
tl/filename-highlight-fix

Conversation

@tbliu98

@tbliu98 tbliu98 commented Oct 21, 2022

Copy link
Copy Markdown
Contributor

Fixes a bug where path matches on files in the root directory of a repository were not highlighted.
fileBase is empty for file paths in the root directory and so the if condition in useEffect() would evaluate to false and highlighting would not happen.

Test plan

Manual testing

Before:
file_highlight_fix_before

After:
file_highlight_fix_after

App preview:

Check out the client app preview documentation to learn more.

@sourcegraph-bot

Copy link
Copy Markdown
Contributor

Codenotify: Notifying subscribers in CODENOTIFY files for diff 558139b...966e481.

Notify File(s)
@fkling client/search-ui/src/components/RepoFileLink.tsx
@limitedmage client/search-ui/src/components/RepoFileLink.tsx

@sg-e2e-regression-test-bob

Copy link
Copy Markdown

Bundle size report 📦

Initial size Total size Async size Modules
-0.00% (-0.00 kb) -0.00% (-0.01 kb) -0.00% (-0.00 kb) 0.00% (0)

Look at the Statoscope report for a full comparison between the commits 966e481 and 0a58068 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

@tbliu98 tbliu98 merged commit 04185b1 into main Oct 21, 2022
@tbliu98 tbliu98 deleted the tl/filename-highlight-fix branch October 21, 2022 14:33

@limitedmage limitedmage left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice! Should we add a changelog entry for this?

@tbliu98 tbliu98 mentioned this pull request Oct 21, 2022
@tbliu98

tbliu98 commented Oct 21, 2022

Copy link
Copy Markdown
Contributor Author

@limitedmage Probably yeah: https://github.com/sourcegraph/sourcegraph/pull/43311

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