Skip to content

Responsive Docs Menu API "Types and values" #799

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

Merged
merged 3 commits into from
Feb 1, 2024

Conversation

aspeddro
Copy link
Collaborator

@aspeddro aspeddro commented Jan 14, 2024

Add a submenu with a link to the value/type in each module:

image

I didn't really like how it turned out, so any suggestions are welcome.

src/ApiDocs.res Outdated
module RightSidebar = {
@react.component
let make = (~items: array<item>) => {
switch items->Js.Array2.length === 0 {
Copy link
Member

Choose a reason for hiding this comment

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

redundant length check, you have them as well in both places where you use <RightSidebar />

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I checked because I don't want to show the "Types and Values" text when it is empty.

Copy link
Member

Choose a reason for hiding this comment

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

Everywhere where you use the RightSidebar component, you already ensure that the items are not empty. That's why I suggested to remove the one in RightSidebar.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oh right. Removed 5062cd8

@fhammerschmidt
Copy link
Member

I just tested it and am not sure why you do not like it.

Copy link

vercel bot commented Jan 26, 2024

@aspeddro is attempting to deploy a commit to the ReScript Association Team on Vercel.

A member of the Team first needs to authorize it.

@aspeddro aspeddro changed the title Fix API docs UI Responsive Docs Menu API "Types and values" Jan 29, 2024
@fhammerschmidt fhammerschmidt requested a review from ryyppy January 31, 2024 09:43
Copy link

vercel bot commented Jan 31, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
rescript-lang.org ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 31, 2024 7:48pm

@fhammerschmidt fhammerschmidt merged commit 8f4d7a3 into rescript-lang:master Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants