Skip to content
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

[docs-infra] Refine the API page design #39520

Merged
merged 3 commits into from
Oct 24, 2023

Conversation

alexfauquette
Copy link
Member

@alexfauquette alexfauquette commented Oct 19, 2023

Some fixes are from lukas feedback that color were wrong on table layout, and that we supressed the <code> in warnings

Some are just classes renaming

Another one is from slack message

Oh yeah, this is way better.

One thing I did notice is that long types are all on one line, which make them hard to read. Example here on api/popper is the modifiers prop:

Type:Array<{ data?: object, effect?: func, enabled?: bool, fn?: func, name?: any, options?: object, phase?: 'afterMain' | 'afterRead' | 'afterWrite' | 'beforeMain' | 'beforeRead' | 'beforeWrite' | 'main' | 'read' | 'write', requires?: Array, requiresIfExists?: Array }>
sent from https://mui.com/material-ui/api/popper/ (from section <|New API content design)>

Before / After

image

image

image

The next should show no change even if <span> got replaced by <code>

image

@alexfauquette alexfauquette added the scope: docs-infra Specific to the docs-infra product label Oct 19, 2023
@mui-bot
Copy link

mui-bot commented Oct 19, 2023

Netlify deploy preview

https://deploy-preview-39520--material-ui.netlify.app/

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against a5199ff

@danilo-leal danilo-leal added the design This is about UI or UX design, please involve a designer label Oct 19, 2023
Copy link
Contributor

@danilo-leal danilo-leal left a comment

Choose a reason for hiding this comment

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

Looks good! 🎉 Although I don't (visually) love these big code blocks now that the enum info is stacked vertically (preferred them spanning the entire width), I guess it does help with readability 😆 😅 — thanks for working on it, nonetheless!

@alexfauquette
Copy link
Member Author

preferred them spanning the entire width

Maybe we could put a threshold

@danilo-leal
Copy link
Contributor

That's a good idea! But honestly, I wouldn't know an objective number to point out at the moment.
We can feel it out... it'll probably be more of a feel thing!

@alexfauquette alexfauquette merged commit a8dbeed into mui:master Oct 24, 2023
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design This is about UI or UX design, please involve a designer scope: docs-infra Specific to the docs-infra product
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants