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

[Joy] Add template UIs & first look blog post #32791

Merged
merged 178 commits into from
Jun 7, 2022

Conversation

danilo-leal
Copy link
Contributor

@danilo-leal danilo-leal commented May 17, 2022

Artifacts from this PR:

@danilo-leal danilo-leal added package: joy-ui Specific to @mui/joy blog labels May 17, 2022
@danilo-leal danilo-leal self-assigned this May 17, 2022
@mui-bot
Copy link

mui-bot commented May 17, 2022

Details of bundle changes

@mui/joy: parsed: +1.54% , gzip: +0.58%

Generated by 🚫 dangerJS against e8c2875

@danilo-leal danilo-leal marked this pull request as draft May 17, 2022 04:27
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Jun 6, 2022
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Jun 6, 2022
Copy link
Member

@siriwatknp siriwatknp left a comment

Choose a reason for hiding this comment

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

😆 I am so excited about the blog post!

@siriwatknp siriwatknp mentioned this pull request Jun 7, 2022
@danilo-leal danilo-leal merged commit 8b451fa into mui:master Jun 7, 2022
@danilo-leal danilo-leal deleted the joy-example-uis branch June 7, 2022 12:33
@danilo-leal danilo-leal restored the joy-example-uis branch June 7, 2022 16:29
Copy link
Member

@oliviertassinari oliviertassinari left a comment

Choose a reason for hiding this comment

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

It looks great, one aspect that we might have missed is talking about MUI Base and MUI System, about how the components are built.


### Dribbble shot

{{"demo": "DribbbleShot.js", "bg": true}}
{{"demo": "DribbbleShot.js" }}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
{{"demo": "DribbbleShot.js" }}
{{"demo": "DribbbleShot.js"}}

x the other instances

@@ -160,6 +161,7 @@
"prettier": "^2.6.2",
"process": "^0.11.10",
"prop-types": "^15.8.1",
"raw-loader": "4.0.2",
Copy link
Member

Choose a reason for hiding this comment

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

<AspectRatio ratio="2" variant="outlined">
<Box
sx={{
background: `center/cover no-repeat url(/static/screenshots/joy-ui/getting-started/templates/${name}${
Copy link
Member

Choose a reason for hiding this comment

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

Why not use an <img> primitive with loading="lazy"?

import * as React from 'react';
import LZString from 'lz-string';
import startCase from 'lodash/startCase';
import NextLink from 'next/link';
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't we import from?

Suggested change
import NextLink from 'next/link';
import Link from 'docs/src/modules/components/Link';

https://mui.com/material-ui/guides/routing/#next-js

Comment on lines +24 to +37
function compress(object) {
return LZString.compressToBase64(JSON.stringify(object))
.replace(/\+/g, '-') // Convert '+' to '-'
.replace(/\//g, '_') // Convert '/' to '_'
.replace(/=+$/, ''); // Remove ending '='
}

function addHiddenInput(form, name, value) {
const input = document.createElement('input');
input.type = 'hidden';
input.name = name;
input.value = value;
form.appendChild(input);
}
Copy link
Member

Choose a reason for hiding this comment

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

Would it be better to create a shared abstraction for this? It's none trivial, and yet we duplicate it.

* - The name of the folder will be used as the url and title
*/

export default function TemplateCollection() {
Copy link
Member

@oliviertassinari oliviertassinari Jun 11, 2022

Choose a reason for hiding this comment

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

Each time I open the page, I try to open the template by clicking on the image, as in https://mui.com/material-ui/getting-started/templates/. I struggle to get used to needing to click on the "Live demo" link. I think that it would help to turn the image into a link.

@siriwatknp siriwatknp mentioned this pull request Jun 15, 2022
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blog package: joy-ui Specific to @mui/joy
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants