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] Add Toolpad Core template link #44415

Merged
merged 38 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
a7cde8b
wip: Add Toolpad Core template
bharatkashyap Nov 15, 2024
60300ff
fix: No dark mode on sign in page
bharatkashyap Nov 15, 2024
7f35451
Merge branch 'master' into docs/toolpad-core-template
bharatkashyap Nov 15, 2024
acb11e4
fix: Incorrect
bharatkashyap Nov 15, 2024
84fe467
Merge branch 'docs/toolpad-core-template' of github.com:bharatkashyap…
bharatkashyap Nov 15, 2024
94b22ed
fix: add `pnpm template:screenshot toolpad` output
bharatkashyap Nov 15, 2024
2f7a1e1
fix: Move back to original section
bharatkashyap Nov 19, 2024
885ef1d
fix: CI
bharatkashyap Nov 19, 2024
7dc4267
Merge branch 'master' of github.com:mui-org/material-ui into docs/too…
bharatkashyap Nov 19, 2024
62f3aff
fix: CI again
bharatkashyap Nov 19, 2024
6245ac8
Merge branch 'master' of github.com:mui-org/material-ui into docs/too…
bharatkashyap Nov 22, 2024
a231e38
Merge branch 'master' into docs/toolpad-core-template
bharatkashyap Nov 22, 2024
2f65933
fix: Olivier review, Vale
bharatkashyap Nov 22, 2024
56a0626
Merge branch 'docs/toolpad-core-template' of github.com:bharatkashyap…
bharatkashyap Nov 22, 2024
50ac8ae
fix: Link, add template redirects
bharatkashyap Nov 25, 2024
72a85d8
Merge branch 'master' of github.com:mui-org/material-ui into docs/too…
bharatkashyap Nov 25, 2024
c015dea
fix: Add image, callout from examples page
bharatkashyap Nov 28, 2024
050eade
fix: CI
bharatkashyap Nov 28, 2024
e0e443a
Merge branch 'master' into docs/toolpad-core-template
bharatkashyap Nov 28, 2024
c0dc8bd
Merge branch 'master' into docs/toolpad-core-template
bharatkashyap Nov 28, 2024
dc6ce80
fix: CI
bharatkashyap Nov 28, 2024
5856a7e
Merge branch 'docs/toolpad-core-template' of github.com:bharatkashyap…
bharatkashyap Nov 28, 2024
fdd86f9
fix: CI
bharatkashyap Nov 28, 2024
cd7f3c8
fix: Missed removing
bharatkashyap Nov 28, 2024
1a4db18
Merge branch 'master' into docs/toolpad-core-template
bharatkashyap Nov 29, 2024
6a2202c
Merge branch 'master' of github.com:mui-org/material-ui into docs/too…
bharatkashyap Dec 2, 2024
b1c8367
fix: image borders
bharatkashyap Dec 2, 2024
3a1b516
Merge branch 'docs/toolpad-core-template' of github.com:bharatkashyap…
bharatkashyap Dec 2, 2024
6839785
Merge branch 'master' into docs/toolpad-core-template
bharatkashyap Dec 2, 2024
0ee61aa
fix: Images, copy on examples page
bharatkashyap Dec 3, 2024
80ae9a8
Merge branch 'docs/toolpad-core-template' of github.com:bharatkashyap…
bharatkashyap Dec 3, 2024
b4bc25d
Merge branch 'master' into docs/toolpad-core-template
bharatkashyap Dec 3, 2024
991de3e
Merge branch 'master' into docs/toolpad-core-template
bharatkashyap Dec 3, 2024
fddfce7
Merge branch 'master' into docs/toolpad-core-template
bharatkashyap Dec 3, 2024
47478bb
Merge branch 'master' into docs/toolpad-core-template
bharatkashyap Dec 3, 2024
56a50fc
Olivier's feedback
prakhargupta1 Dec 4, 2024
ae61db3
missed
prakhargupta1 Dec 4, 2024
951e298
missed
prakhargupta1 Dec 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions docs/data/material/getting-started/templates/templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ You can toggle through each of these style options in the top right corner of th
Sections of each layout are defined either by comments or use of separate files, so you can extract parts of a page (such as a hero unit or a footer) for reuse in other pages.
These templates can be combined with one of the [example projects](/material-ui/getting-started/example-projects/) to form a complete starter app.

:::info
If you're looking to build internal tools and dashboards quickly, head to [Toolpad Core examples](http://mui.com/toolpad/core/introduction/examples/#featured-examples) for functional apps with authentication, routing and theming already integrated.
Copy link
Member

Choose a reason for hiding this comment

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

http, we should use https. Added to mui/toolpad#4543

:::

If you see any room for improvement, please feel free to open an [issue](https://github.com/mui/material-ui/issues/new/choose) or a [pull request](https://github.com/mui/material-ui/pulls) on GitHub.

{{"component": "modules/components/MaterialFreeTemplatesCollection.js"}}
Expand All @@ -40,9 +44,13 @@ You can find complete templates and themes like those shown below in the <a href

## Toolpad Core (beta)

[Toolpad Core](https://mui.com/toolpad/core/introduction/) is a set of components designed for assembling dashboards and internal tools more efficiently.
It builds on top of Material UI to provide sophisticated UI components with full-stack functionality, such as the [Dashboard Layout](https://mui.com/toolpad/core/react-dashboard-layout/) shown below.

This is a great option if you don't want to start building from scratch but don't need a prebuilt template.
If you're looking to build internal tools and dashboards fast, but don't want to start building from scratch, you can find examples of functional dashboards – with authentication, routing, and theming already integrated – in the [featured examples](http://mui.com/toolpad/core/introduction/examples/#featured-examples) section of the Toolpad Core docs.
Copy link
Member

Choose a reason for hiding this comment

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

http, we should use https. Added to mui/toolpad#4543


{{"demo": "../../components/app-bar/DashboardLayoutBasic.js", "height": 400, "iframe": true, "defaultExpanded": false, "bg": "inline"}}
<a href="https://mui.com/toolpad/core/introduction/examples/#featured-examples">
<span class="only-light-mode">
<img src="/static/images/toolpad-core-template-light.png" alt="The Toolpad Core template comes with authentication, navigation and theming integrated" width="2280" height="1200" style="display: block;" />
Copy link
Member

Choose a reason for hiding this comment

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

The width and height are wrong. It says width="2280" height="1200" but the actual image is 2400x1362. This is not the same aspect ratio. This leads to layout shifts.

</span>
<span class="only-dark-mode">
<img src="/static/images/toolpad-core-template-dark.png" alt="The Toolpad Core template comes with authentication, navigation and theming integrated" width="2280" height="1200" style="display: block;"/>
Copy link
Member

Choose a reason for hiding this comment

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

We have to set this as loading lazy, right now this starves other assets that are in the critical rendering path https://www.webpagetest.org/result/250102_BiDcKD_4G/1/details/#waterfall_view_step1

SCR-20250102-ceok

</span>
</a>
2 changes: 2 additions & 0 deletions docs/public/_redirects
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,8 @@ https://v4.material-ui.com/* https://v4.mui.com/:splat 301!
/:lang/x/* https://material-ui-x.netlify.app/:lang/x/:splat 200

## Toolpad
/toolpad/core/templates/nextjs-dashboard/_next/* https://toolpad-core-nextjs-themed.vercel.app/_next/:splat 200
/toolpad/core/templates/nextjs-dashboard/* https://toolpad-core-nextjs-themed.vercel.app/:splat 200
Copy link
Member

Choose a reason for hiding this comment

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

Point 5. added to mui/toolpad#4543, this is currently not hosted under the MUI vercel workspace.

/static/toolpad/* https://mui-toolpad-docs.netlify.app/static/toolpad/:splat 200
/toolpad/_next/* https://mui-toolpad-docs.netlify.app/_next/:splat 200
/toolpad/* https://mui-toolpad-docs.netlify.app/toolpad/:splat 200
Expand Down
Copy link
Member

Choose a reason for hiding this comment

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

983 KB for an image of this size. This is way too large. For example, the first dark image on the same page is 121 KB.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Copy link
Member

Choose a reason for hiding this comment

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

Side note, the "low stock" chip inverted light and dark mode colors.

Copy link
Member Author

Choose a reason for hiding this comment

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

👍🏻 Addressed in mui/toolpad@e45cd86

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 17 additions & 17 deletions docs/src/modules/components/MaterialFreeTemplatesCollection.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,53 +20,53 @@ import stackBlitz from 'docs/src/modules/sandbox/StackBlitz';

const sourcePrefix = `${process.env.SOURCE_CODE_REPO}/tree/v${process.env.LIB_VERSION}`;

function layouts(translatation) {
function layouts(translation) {
return [
{
title: translatation('dashboardTitle'),
description: translatation('dashboardDescr'),
title: translation('dashboardTitle'),
description: translation('dashboardDescr'),
href: '/material-ui/getting-started/templates/dashboard/',
source: `${sourcePrefix}/docs/data/material/getting-started/templates/dashboard`,
hasDarkMode: true,
},
{
title: translatation('marketingPageTitle'),
description: translatation('marketingPageDescr'),
title: translation('marketingPageTitle'),
description: translation('marketingPageDescr'),
href: '/material-ui/getting-started/templates/marketing-page/',
source: `${sourcePrefix}/docs/data/material/getting-started/templates/marketing-page`,
hasDarkMode: true,
},
{
title: translatation('checkoutTitle'),
description: translatation('checkoutDescr'),
title: translation('checkoutTitle'),
description: translation('checkoutDescr'),
href: '/material-ui/getting-started/templates/checkout/',
source: `${sourcePrefix}/docs/data/material/getting-started/templates/checkout`,
hasDarkMode: true,
},
{
title: translatation('signInTitle'),
description: translatation('signInDescr'),
title: translation('signInTitle'),
description: translation('signInDescr'),
href: '/material-ui/getting-started/templates/sign-in/',
source: `${sourcePrefix}/docs/data/material/getting-started/templates/sign-in`,
hasDarkMode: true,
},
{
title: translatation('signInSideTitle'),
description: translatation('signInSideDescr'),
title: translation('signInSideTitle'),
description: translation('signInSideDescr'),
href: '/material-ui/getting-started/templates/sign-in-side/',
source: `${sourcePrefix}/docs/data/material/getting-started/templates/sign-in-side`,
hasDarkMode: true,
},
{
title: translatation('signUpTitle'),
description: translatation('signUpDescr'),
title: translation('signUpTitle'),
description: translation('signUpDescr'),
href: '/material-ui/getting-started/templates/sign-up/',
source: `${sourcePrefix}/docs/data/material/getting-started/templates/sign-up`,
hasDarkMode: true,
},
{
title: translatation('blogTitle'),
description: translatation('blogDescr'),
title: translation('blogTitle'),
description: translation('blogDescr'),
href: '/material-ui/getting-started/templates/blog/',
source: `${sourcePrefix}/docs/data/material/getting-started/templates/blog`,
hasDarkMode: true,
Expand All @@ -75,11 +75,11 @@ function layouts(translatation) {
}

export default function MaterialFreeTemplatesCollection() {
const translatation = useTranslate();
const translation = useTranslate();
const materialTemplates = sourceMaterialTemplates();
return (
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 4, mb: 4 }}>
{layouts(translatation).map((layout, index) => {
{layouts(translation).map((layout, index) => {
const templateId = layout.source.split('/').pop();
const templateName = pascalCase(templateId);
const item = materialTemplates.map.get(templateId);
Expand Down
Loading