-
-
Notifications
You must be signed in to change notification settings - Fork 220
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] Restructure #2082
[docs] Restructure #2082
Conversation
Updated arcade (with lesser steps) that I recorded at 1440X796 DPR 2.0. It is still coming with the vertical scrollbar.
…d into fix-docs-images
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.
Thanks, Bharat, this is a lot!
A few things I've noticed in the preview:
- I can't preview / zoom into images in the preview
- There seems to be no footer at the bottom of the docs pages, or even any padding at all? We used to have a footer there.
- Maybe our tutorials section will be mixing up too many unrelated topics. Could we somehow have a
Deployment
section somewhere with subsections on different services we can deploy to? - Not sure what we agreed on about "display mode" - maybe it could be under "Embedding a Toolpad page?"
The image open interaction on https://www.lennysnewsletter.com/p/how-figma-builds-product feels quite nice, with the complementary hover icon on the corner: |
You're right, I'll do another pass on all the images to fix the aspect ratio/blurry GIF issues |
|
||
This corresponds to a function that you create on your file system, inside the `toolpad/resources` folder. For example, in `toolpad/resources/functions.ts` | ||
|
||
```tsx |
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.
```tsx | |
```jsx |
@bharatkashyap The docs does not support tsx
yet, so better go with jsx
to get the proper color for the tokens.
Here is the jsx
version:
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.
Thanks Jun! Changed it
- `@mui/icons-material` | ||
|
||
:::warning | ||
Support for importing any `npm` package is not implemented yet. It's coming. |
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.
Is it true that a user can't install any npm package?
Is this also true for custom functions?
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.
This isn't true for custom functions.
About the custom components, I borrowed from the existing docs https://mui.com/toolpad/building-ui/custom-components/#supported-features but I think this shouldn't be true anymore either. I'll change it
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've added a new how-to guide showcasing this feature for custom components
|
||
Each property of component that may be bound to data present on the page is surrounded by a **Binding** button, which you can click to initiate data binding. | ||
|
||
{{"component": "modules/components/DocsImage.tsx", "src": "/static/toolpad/docs/concepts/managing-state/binding-button.png", "alt": "Binding button", "caption": "The binding button", "zoom": false }} |
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.
Images of a section of Toolpad should be small. We should maintain the same scale.
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.
Do you mean that the image should show the full tab even when talking about a specific section?
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.
No, I mean this image should be smaller. Like the first image in: https://mui.com/toolpad/data-binding/binding-state/
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.
Adding a width
override to DocsImage
so that custom widths can be set to images in cases like this. Capping the width to 300px
in this case.
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.
Other than the blurry gifs it looks good, but if you don't want to block the PR because of the GIFs or there are other issues I guess we can merge and fix after, not sure.
<p class="description">Toolpad apps allow for a display mode configurable per-page</p> | ||
|
||
{{"component": "modules/components/DocsImage.tsx", "src": "/static/toolpad/docs/concepts/display-mode/display-mode.png", "alt": "Display mode property ", "caption": "Display mode page property", "zoom": false }} | ||
|
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.
This image is big too.
1. Find the **rows** property in the inspector. Notice that there's a small **Bind** button to its right. Properties with this button next to them can be bound to state available on the page: | ||
|
||
{{"component": "modules/components/DocsImage.tsx", "src": "/static/toolpad/docs/getting-started/first-app/step-5.png", "alt": "Bind data", "caption": "The bindable rows property", "zoom": false, "indent": 1 }} | ||
|
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.
This image needs to be scaled down.
Shall we center the images in the page? |
Which ones do you mean? |
I've centred the uncentered images and replaced all blurred GIFs |
Preview: https://deploy-preview-2082--mui-toolpad-docs.netlify.app/toolpad/getting-started/first-app/
Closes Visually improve docs images #1981
Closes [docs] Restructure #2052
This PR attempts to:
data
folderDeviations from the structure in #2052 have been made in two places: