This repository was archived by the owner on Sep 30, 2024. It is now read-only.
search ui: ResultContainer component refactor#42483
Merged
Merged
Conversation
added 2 commits
October 4, 2022 10:21
…separate component.
Contributor
|
Codenotify: Notifying subscribers in CODENOTIFY files for diff 39147a4...a46e742.
|
limitedmage
approved these changes
Oct 4, 2022
limitedmage
left a comment
Contributor
There was a problem hiding this comment.
Looks great, left non-blocking suggestions.
Comment on lines
+191
to
+199
| <PrefetchableFile | ||
| isPrefetchEnabled={prefetchFileEnabled} | ||
| prefetch={prefetchFile} | ||
| filePath={result.path} | ||
| revision={getRevision(result.branches, result.commit)} | ||
| repoName={result.repository} | ||
| className={resultContainerStyles.resultContainer} | ||
| as="li" | ||
| > |
Contributor
There was a problem hiding this comment.
Same comment as here: https://github.com/sourcegraph/sourcegraph/pull/42500#discussion_r987149904
Comment on lines
14
to
+16
| title: React.ReactNode | ||
|
|
||
| /** | ||
| * CSS class name to apply to the title element. | ||
| */ | ||
| titleClassName?: string | ||
|
|
||
| /** The content to display next to the title. */ | ||
| description?: React.ReactNode | ||
|
|
||
| /** | ||
| * The content of the result displayed underneath the result container's | ||
| * header when collapsed. | ||
| */ | ||
| collapsedChildren?: React.ReactNode | ||
| /** | ||
| * The content of the result displayed underneath the result container's | ||
| * header when expanded. | ||
| */ | ||
| expandedChildren?: React.ReactNode | ||
| /** | ||
| * The label to display next to the collapse button | ||
| */ | ||
| collapseLabel?: string | ||
|
|
||
| /** | ||
| * The label to display next to the expand button | ||
| */ | ||
| expandLabel?: string | ||
|
|
||
| /** | ||
| * The total number of matches to display | ||
| */ | ||
| matchCountLabel?: string | ||
|
|
||
| /** | ||
| * This component does not accept children. | ||
| */ | ||
| children?: never | ||
|
|
||
| /** | ||
| * The result type | ||
| */ | ||
| repoStars?: number |
Contributor
There was a problem hiding this comment.
This can probably be moved to another component (ResultTitle?) that this component can compose.
Contributor
Author
There was a problem hiding this comment.
I did consider that, but since it's going to be used in only one place, I didn't want to fragment the components too much.
fkling
approved these changes
Oct 5, 2022
novoselrok
pushed a commit
that referenced
this pull request
Oct 14, 2022
…)" This reverts commit 7c2e624.
novoselrok
pushed a commit
that referenced
this pull request
Oct 14, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #42159
Summary
ResultContainertoLegacyResultContainerResultContainercomponentRepoSearchResultandCommitSearchResultto use the simplifiedResultContainerPathMatchfromFileSearchResultinto a separate componentTest plan
App preview:
Check out the client app preview documentation to learn more.