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] Add introduction Base component demos & general uplift #33896
Conversation
I love this!! Can't wait to see it in action in the docs! Really makes a huge improvement to the overall UX. |
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.
Looks much much better 👍 If it is up to me, I would ship it :D I especially like the grid texture
Not related to this PR, but we probably want to tweak the styles for the initial focus element on the demos at least on the base pages (probably on Joy UI too). I am talking about this hidden focusable button in the upper left corner:
That's a huge improvement over the previous demos! Why don't we have the *Introduction demos in TypeScript? |
@michaldudak just turned them all into TypeScript but I'm now getting what seems to be augmentation errors?! |
@danilo-leal There were some type definitions missing from function parameters. I fixed them. For the future - it's best to copy a TS demo, modify it, and then run There are errors in regression tests of UnstyledBadge and UnstyledBadgeIntroduction demos. |
@michaldudak cool, thanks for helping out! It seems the regression check is still failing, any idea how to turn it green? |
This comment was marked as resolved.
This comment was marked as resolved.
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.
It looks great!
transform: translate(50%, -50%); | ||
transform-origin: 100% 0; | ||
transform-origin: 100% 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.
transform-origin: 100% 0; | |
transform-origin: 100% 0; |
docs/data/base/components/button/UnstyledButtonIntroduction.tsx
Outdated
Show resolved
Hide resolved
theme.palette.primaryDark[500], | ||
0.8, | ||
)} 0px, transparent 50%), | ||
url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%23003A75' fill-opacity='0.15'%3E%3Cpath opacity='.5' d='M96 95h4v1h-4v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h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9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9z'/%3E%3Cpath d='M6 5V0H5v5H0v1h5v94h1V6h94V5H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");` |
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 wonder if using an SVG file would help with bundle size. For example, want we don't have introduction demos on MUI X docs pages.
docs/data/base/components/select/UnstyledSelectIntroduction.tsx
Outdated
Show resolved
Hide resolved
@@ -14,6 +14,8 @@ githubLabel: 'component: input' | |||
An input is a UI element that accepts text data from the user. | |||
The `InputUnstyled` component replaces the native HTML `<input>` tag, and can also be transformed into a `<textarea>` as needed. | |||
|
|||
{{"demo": "UnstyledInputIntroduction.tsx", "defaultCodeOpen": false, "bg": "gradient"}} |
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.
@danilo-leal Did you consider rendering this demo before everything else and a bit smaller in height? I had a quick try at it, here is what the difference looks like:
Current:
https://deploy-preview-33896--material-ui.netlify.app/base/react-input/
With the diff
@danilo-leal It seems to be an issue with the theme. I'm pushing a fix. I'm actually surprised that the correct error message isn't reported by CircleCI. I thought I had made a fix for this a year ago, unless it was only applied on MUI X 🤔 |
Co-authored-by: Olivier Tassinari <olivier.tassinari@gmail.com>
I applied the majority of Olivier's suggestions so we can close this PR and iterate on improvements in another one after Danilo is back. |
I'm experimenting with a way to present the Base components visually more interestingly above the fold. I've created a new
DemoRootMaterial
variant calledgradient
where I'm playing around with a mesh gradient and might try textures too. I've been enjoying this direction and feel like it has potential! Here's a sneak peek:Deploy preview: https://deploy-preview-33896--material-ui.netlify.app/base/react-button/