sourcegraph / sourcegraph-public-snapshot

Code AI platform with Code Search & Cody
https://sourcegraph.com
Other
10.1k stars 1.27k forks source link

Edits to search examples pages #12057

Closed LaureenH closed 4 years ago

LaureenH commented 4 years ago

https://sourcegraph.com/search

https://sourcegraph.com/refactor-python2-to-3

https://sourcegraph.com/react-hooks

https://sourcegraph.com/kubernetes

https://sourcegraph.com/golang

https://sourcegr12aph.com/android

rvantonder commented 4 years ago

:tada: thanks!! We had some back and forth on the language around:

"Search the most starred Android repositories on GitHub. Explore with search examples below." to "Use these search suggestions to explore popular Android repositories on GitHub."

I suggested "starred" because if we only say "popular" it's not clear what that means (what's the measure for 'popular'?). In the context of a typical GH user reading this, 'stars' is immediately obvious what we mean and correlates with popularity. To be more precise we could say "popular Android repositories by GitHub stars" or "popular Android repositories (by stars) on GH" but that feels long.

poojaj-tech commented 4 years ago

Agree with @rvantonder, there's often a lot of code that isn't really popular, that's an important concern for developers. GitHub has multiple ways it measures popularity like stars or “Trending” or “Topics”. Besides stars, the other ways popularity is measured is often not reliable or inaccurate.

For these pages, some pages have only top starred repos and for others it’s a mix of top starred repos and top starred repos in "Trending" (that’s why some descriptions say “trending and most starred”) @LaureenH how would you suggest best capturing this here?

LaureenH commented 4 years ago

here's why I don't like the "starred" term -- it's because it doesn't necessarily mean anything either: https://opensource.stackexchange.com/questions/5110/github-stars-is-a-very-useful-metric-but-for-what. I genuinely don't want to get in the habit of trading one ambiguous term for another, and stars may be a measure of popularity but they may also just be someone's bookmark, in which case, "popular" is a better term for what we're trying to imply on the page, which is that repos with a lot of traffic are included in these searches we're trying to show people how to do.

I don't have the context to know for sure which option is the more technically correct; if we're literally sorting repos by stars, then "starred" is correct, but we shouldn't use that with "popular", because "star" doesn't necessarily mean that. Does that make sense?

christinaforney commented 4 years ago

on all pages, please render code terms in code font

The current implementation does not let us render in this way. I think it's a fairly straightforward fix to change the page title and the search titles to take an element or to handle markdown rendering, it's just out of scope of a change I can make.

I'm not happy with the "Search a language" section. If the languages listed are the search terms, they should be all lowercase. If they're the names of the languages, they need to be properly capitalized (JavaScript, GraphQL, HTML, JSON, TypeScript)

It doesn't appear that we have proper formatting of the names of the languages easily available to us in the code here, so I made the decision to use the search term and lowercase them all. This feels consistent with the monospace font styling they have. @LaureenH - are you happy with this as a solution? Here's what it looks like:

image

LaureenH commented 4 years ago

@christinaforney totally happy with that. =) Thank you so much! Is code render a thing we're going to have on a roadmap at some point?

christinaforney commented 4 years ago

Is code render a thing we're going to have on a roadmap at some point?

This is just a hard coded implementation to quickly validate the idea, so we will definitely be iterating on this. I will make sure that rendering code is part of the next iteration requirements!