(feat) add repository metadata to repo match search result items#50567
Conversation
|
Codenotify: Notifying subscribers in CODENOTIFY files for diff c9ddb0d...68b9168.
|
camdencheek
left a comment
There was a problem hiding this comment.
Woot! Thanks for tackling this.
A couple of quick first impressions:
- It seems a little strange that we are adding this to all result types since they are logically associated only with the repos, not a file or a commit. I would expect these to only be displayed on repository result types.
- The added gap between the title line and the result card is a little visually jarring. Might be worth a design consultation here
- What does this look like with a null value? I don't see any screenshots with that case.
Bundle size report 📦
Look at the Statoscope report for a full comparison between the commits 68b9168 and 3f84c0f or learn more. Open explanation
|
|
This is a great addition! I agree with Camden's comments here. I recommend reconsidering the design to put these key/value pairs inside the box and only for repo results. I also recommend showing them in the repo page (eg. https://sourcegraph.com/github.com/sourcegraph/sourcegraph), but this can be a separate PR. |
|
Thanks for a quick review, @camdencheek.
I intentionally added to all result types except
Yep, already asked Rob Rhyne for help with designs.
Good point, I missed that values are nullable, will take a look at this scenario too. |
kopancek
left a comment
There was a problem hiding this comment.
Mostly naming and styling questions/suggestions
There was a problem hiding this comment.
If we call the feature repository metadata, why do we call everything that actually implements it key value pairs? Does not make sense to me to be honest.
There was a problem hiding this comment.
I believe metadata is implemented as simple key-value pairs for more flexibility.
3bec0e0 to
159c93c
Compare
style(ResultContainer.module.scss): rename .repo-kvps class to .repo-metadata
…alue classes feat(ResultContainer.tsx): replace key-value pairs with badges in RepoMetadata component
90f4e33 to
52c6bf9
Compare
sashaostrikov
left a comment
There was a problem hiding this comment.
Nice! LGTM after your changes and fixes.
I guess you'll move it as Juliana proposed in the next PR?
d344949 to
c0a148f
Compare
|
Thanks, everyone, for the reviews and feedback. So after thinking a bit,
Here is how it looks now: |
@limitedmage Follow-up PR adding repo metadata to repo root page. I would appreciate reviews. cc @camdencheek @camdencheek |


Part of https://github.com/sourcegraph/pr-faqs/issues/96.
This PR:
keyValuePairs) to search repo match result items ifrepository-metadatafeature flag is enabledTest plan
sg startrepository-metadatafeature flagaddRepoKeyValuePairAPIScreenshots
App preview:
Check out the client app preview documentation to learn more.