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] Add a collapsible list & table views to the API content display #38265

Merged
merged 65 commits into from
Oct 12, 2023

Conversation

alexfauquette
Copy link
Member

@alexfauquette alexfauquette commented Aug 1, 2023

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

mui-bot commented Aug 1, 2023

Netlify deploy preview

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

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against e8bdb3f

@danilo-leal danilo-leal changed the title [docs-infra] Experiment collapsible API pages [docs-infra] Experiment collapsible API prop/slots heading Aug 1, 2023
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Aug 2, 2023
@oliviertassinari
Copy link
Member

oliviertassinari commented Aug 3, 2023

I chatted a bit with @alexfauquette, it could be really great to run an A/B on this. We could have 3 implementations:

  1. Current
  2. This PR
  3. Blueprint/Stripe way https://blueprintjs.com/docs/#datetime/date-input.props-interface. For very long props, we could break them in two lines, we shouldn't have very long props anyway.

and see which one the developers pick the most as their default.

Personally, as a developer, I would definitely put 2. last, too much effort to click, scrolling is easier. I would have to try 1 and 3 long enough to really know for sure, maybe a slight preference for 3.

@danilo-leal
Copy link
Contributor

@oliviertassinari I recently wrote a doc about the API content display and the A/B test idea could maybe be discussed more in-depth there! I personally don't see a lot of value in testing something close to Blueprint but happy to further discuss on Notion considering what Alex & I discussed that's documented there! 😃

@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Aug 7, 2023
@joserodolfofreitas
Copy link
Member

joserodolfofreitas commented Aug 7, 2023

Blueprint/Stripe way https://blueprintjs.com/docs/#datetime/date-input.props-interface. For very long props, we could break them in two lines, we shouldn't have very long props anyway.

I like the UX on this one, it solves the main problem with the current design (which mixes secondary with primary information on the same vertical space and breaks quick skimming). Overall I think the card design is good, I'd bet we just need to keep the primary information quickly scannable.
Also, to consider: We could collapse options by default only if they cross a max size threshold.

@alexfauquette
Copy link
Member Author

alexfauquette commented Aug 7, 2023

To simplify experimentation, I added a page with data grid premium API docs such that we can see in live the impact on big API page https://deploy-preview-38265--material-ui.netlify.app/experiments/docs/data-grid-premium/

Screenshot 2023-08-14 at 19 21 29

Based on the comments "I want to easily scan the props or description", I moved to a table layout with props/description column

I allow a first column of up to 200px. If the props overflow, their name is cut in two (mainly for data grid unstable props)

Props now have a check box on top of it to enable/disable collapsed rows

Todo

  • Adapt other sections to collapse
  • Setup the localstorage for saving preference
  • Improve the UI for selection between collapsable or not
  • Setup Google Analytics to track UI preferences
  • Bring back the table rendering

@oliviertassinari
Copy link
Member

oliviertassinari commented Aug 14, 2023

@alexfauquette The plan sounds great. Let's 🔬, see how developers behave.

I think this is a viable implementation to test 3. in #38265 (comment). I have added a screenshot to illustrate it. I would only raise that the prop description font is wrong, it uses theme.typography.fontFamilyCode rather than theme.typography.fontFamily.

@alexfauquette
Copy link
Member Author

🎉🎉 Celebration time 🎉🎉

I just need to review my own code to make sure the data are correctly sent to Google Analytics, such that we can do something with them. Should be ready for the next release 🚀

@alexfauquette alexfauquette merged commit eee35de into mui:master Oct 12, 2023
19 checks passed
mnajdova pushed a commit to mnajdova/material-ui that referenced this pull request Oct 13, 2023
…display (mui#38265)

Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
mnajdova pushed a commit to mnajdova/material-ui that referenced this pull request Oct 13, 2023
…display (mui#38265)

Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
mnajdova pushed a commit to mnajdova/material-ui that referenced this pull request Oct 13, 2023
…display (mui#38265)

Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
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
Status: Recently completed
Development

Successfully merging this pull request may close these issues.

5 participants