-
-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show languages in the docs sidebar #2859
base: main
Are you sure you want to change the base?
Conversation
I don't think these pages are particularly helpful in their current form. I don't think we can expect users to know how to read these raw facet ids. We should probably organise them by scope, and then make the names easier to read / show descriptions. As it stands I think they'll be more confusing than useful |
I think my initial intent was to add them to the developer section of the docs. It's still really useful for a developer to be able to see what is missing from a particular language. It's hard in the source code to see which keys are missing since we have so many. Grouping them by scope and showing description shouldn't be any problems though. I can definitely do that. |
Yeah and maybe splitting on Also I'd prob hide the unknown ones in a details expander. And unsupported I wonder how useful to show to users. If we do we should probably make not too prominent and link to contributor docs if they wanna roll up their sleeves |
Sounds good. I start working on that. |
@pokey I have now updated the scope facets with expandable cards and grouped scopes. |
@@ -0,0 +1,3 @@ | |||
export function capitalize(str: string) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ludicrous that this is not part of the javascript standard.
@@ -28,3 +28,19 @@ | |||
.hidden { | |||
display: none; | |||
} | |||
|
|||
.card { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I could tell we don't have a css library for the docs page? I didn't want to add one for this simple use case.
function prettifyFacet(facet: ScopeSupportFacet): string { | ||
const parts = facet.split(".").map(camelCaseToAllDown); | ||
if (parts.length === 1) { | ||
return capitalize(parts[0]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would try to avoid extra css. I would just put the list of scopes directly under I would also rename And I wouldn't bother explaining what a facet is. I don't think it matters. We just want to list the scopes and the places they're supported |
So far our implementation of scope facets have been lacking and therefore we made the decision to hide languages in the docs sidebar. Now our support for scope facets in the most common languages is quite good so I would like to show languages.