Conversation
934c999 to
0f211a3
Compare
1f8f8ab to
117733b
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
903f230 to
64be764
Compare
64be764 to
84f53ea
Compare
84f53ea to
21e0af2
Compare
|
Released a few days ago: https://sandpack.codesandbox.io/ |
|
@material-ui/core: parsed: +Infinity% , gzip: +Infinity% |
yarn.lock
Outdated
| clsx "^1.1.1" | ||
| prop-types "^15.7.2" | ||
| react-is "^17.0.2" | ||
| version "0.0.0" |
There was a problem hiding this comment.
🤔 Not excatly sure what's going on here, this is what the lockfile ends up like after installing over the one that's on the master branch. (yarn v1.22.10)
There was a problem hiding this comment.
@siriwatknp @hbjORbj
Tagging you to ask if you have any ideas as to why this one particular test keeps failing for this PR. It'll be very helpful if you do!
There was a problem hiding this comment.
I think it is related to the new dependency, jarle. Won't you uninstall this anyways when you use Sandpack as Marija suggested?
There was a problem hiding this comment.
yeah, have you run yarn. I think the yarn.lock is not sync or updated.
There was a problem hiding this comment.
I've added jarle as a dependency manually to package.json and then runyarn (doing it via yarn add seems to break)
For Sandpack - I am exploring it currently, although it might be more long term and this option might still be the one to go with till that is implementable
I was going to ask whether we have considered https://www.npmjs.com/package/@codesandbox/sandpack-react too :) |
Makes sense, Marija. I can implement a version with Sandpack and then we can compare the performance, UX and bundle size changes across the two branches. |
0442bbd to
c885548
Compare
I get it for the first click on a code block on a page. Clicking on a subsequent demo doesn't have the same issue. |
4e9bb91 to
9b134e5
Compare
9b134e5 to
08f8aa0
Compare
|
The ComboBox demo fails in the editable version; it works only when the export default function ComboBox() {
return (
<Autocomplete
disablePortal
id="combo-box-demo"
options={top100Films}
sx={{ width: 300 }}
renderInput={(params) => <TextField {...params} label="Movie" />}
/>
);
}
// Top 100 films as rated by IMDb users. http://www.imdb.com/chart/top
const top100Films = [
{ label: 'The Shawshank Redemption', year: 1994 },
{ label: 'The Godfather', year: 1972 },
...
@siriwatknp Any thoughts on this? |
|
I am not sure, can you try with a function instead? export default function ComboBox() {
return (
<Autocomplete
disablePortal
id="combo-box-demo"
options={getTop100Films()}
sx={{ width: 300 }}
renderInput={(params) => <TextField {...params} label="Movie" />}
/>
);
}
const getTop100Films = () => [
{ label: 'The Shawshank Redemption', year: 1994 },
{ label: 'The Godfather', year: 1972 },
... |
1ebeba5 to
3da036e
Compare
Yes. Here's how it was done in the prior PR.
Whether by accident or design, the message seems to be gone |
I seem to be missing the rationale for this - why should the focus indicator not show up if clicked? |
@bharatkashyap I think that it's well explained in https://www.w3.org/TR/wai-aria-practices-1.1/#kbd_focus_discernable_predictable. TL:DR The focus indicator is distracting when the modality is a mouse but helpful when the modality is a keyboard. It's mostly a UX consideration, I wouldn't expect all the designers to agree on what is right. |
3970dc8 to
da53757
Compare
da53757 to
47ee023
Compare
The current state of the layout issue seems to be best one possible given a reasonable effort
The flash on first interaction is still occurring and is a production only issue, probably related
Since we are replacing one component with the other, this is highly unlikely to be able achievable with any reasonable approach. As an alternative, spent some time on this possibility: #30873 (load the editable demos by default, not requiring replacement) which fixes all of the above at a marginal cost to first load time. |
Would there be any benefit in loading the editor on page load, but only load the live preview when the editor is focused? Is there any bundle-size advantage to not having both? |
Comparing the network tab of preview deploys of both PRs (cache disabled), I seem to notice about a 90kB increase in downloaded resources (= +/- 5% increase). It's not nothing, but it's also not dramatic compared to the 1.8MB we already have. Bundle size checker doesn't seem to take the docs into account. We should include them in there. |
With which one? (I could run the same exercise, but since you already have...) |
|
Okay, so a hybrid of "load the editor by default, but don't load the preview until the editor is interacted with" could be the way to go. |
The "flicker" production-only issue would remain unsolved with that approach given that we would still need to replace a static component with a dynamic one on runtime. Are there any particular benefits to this hybrid approach over loading both by default (except the bundle size)? |
|
No, but bundle size is obviously important. What causes the "flicker"? |
What if Jarle was render on top of the "static" demo? |
|
Closing in favor of #32107 Great job for kicking off this effort @bharatkashyap |
<Cough>: #24640 😁 |



https://deploy-preview-29885--material-ui.netlify.app/components/buttons/
Description
Remaining issues:
yarn.lockissue on Circle CI.screen capture
propTypeswarning fordemoKeyresolveDemoImportsto all demo files