-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
[docs-infra] Remove codesandbox #47046
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
Open
Janpot
wants to merge
14
commits into
mui:master
Choose a base branch
from
Janpot:remove-codesandbox
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 10 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
1ecfc91
[docs-infra] Remove codesandbox
Janpot 538bd5a
eslint
Janpot 9b77d4c
Update tsconfig.json
Janpot f9ba22d
Missing file
Janpot bd09cdf
Update dataGrid.ts
Janpot 474d177
fix formatting
Janpot 653bc34
Update Dependencies.ts
Janpot 7355010
Update Dependencies.test.js
Janpot fa4d87b
Merge branch 'master' into remove-codesandbox
Janpot c8a79b9
centralize edit icon
Janpot d2db978
Update TemplateCollection.js
Janpot 969b79d
Update SandboxIcon.ts
Janpot 50eec88
Update TemplateCollection.js
Janpot b9d226c
Merge branch 'master' into remove-codesandbox
Janpot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,10 +10,10 @@ import Link from '@mui/joy/Link'; | |
| import List from '@mui/joy/List'; | ||
| import Button from '@mui/joy/Button'; | ||
| import Typography from '@mui/joy/Typography'; | ||
| import SvgIcon from '@mui/joy/SvgIcon'; | ||
| import Visibility from '@mui/icons-material/Visibility'; | ||
| import CodeRoundedIcon from '@mui/icons-material/CodeRounded'; | ||
| import codeSandbox from 'docs/src/modules/sandbox/CodeSandbox'; | ||
| import Edit from '@mui/icons-material/Edit'; | ||
|
||
| import stackBlitz from 'docs/src/modules/sandbox/StackBlitz'; | ||
| import sourceJoyTemplates from 'docs/src/modules/joy/sourceJoyTemplates'; | ||
|
|
||
| /** | ||
|
|
@@ -269,17 +269,13 @@ export default function TemplateCollection() { | |
| variant="outlined" | ||
| color="neutral" | ||
| fullWidth | ||
| startDecorator={ | ||
| <SvgIcon viewBox="0 0 1080 1080"> | ||
| <path d="M755 140.3l0.5-0.3h0.3L512 0 268.3 140h-0.3l0.8 0.4L68.6 256v512L512 1024l443.4-256V256L755 140.3z m-30 506.4v171.2L548 920.1V534.7L883.4 341v215.7l-158.4 90z m-584.4-90.6V340.8L476 534.4v385.7L300 818.5V646.7l-159.4-90.6zM511.7 280l171.1-98.3 166.3 96-336.9 194.5-337-194.6 165.7-95.7L511.7 280z" /> | ||
| </SvgIcon> | ||
| } | ||
| aria-label="CodeSandbox playground" | ||
| startDecorator={<Edit />} | ||
| aria-label="Open sandbox" | ||
| data-ga-event-category="joy-template" | ||
| data-ga-event-label={template.name} | ||
| data-ga-event-action="codesandbox" | ||
| data-ga-event-action="stackblitz" | ||
| onClick={() => | ||
| codeSandbox | ||
| stackBlitz | ||
| .createJoyTemplate({ | ||
| ...item, | ||
| title: `${startCase(template.name)} Template - Joy UI`, | ||
|
|
@@ -289,11 +285,11 @@ export default function TemplateCollection() { | |
| item.codeVariant === 'TS' ? 'tsx' : 'js' | ||
| }`, | ||
| }) | ||
| .openSandbox() | ||
| .openStackBlitz() | ||
| } | ||
| sx={{ fontFamily: 'IBM Plex Sans' }} | ||
| > | ||
| CodeSandbox | ||
| Open sandbox | ||
| </Button> | ||
| </Box> | ||
| </CardContent> | ||
|
|
||
2 changes: 1 addition & 1 deletion
2
docs/data/material/getting-started/templates/dashboard/theme/customizations/dataGrid.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
142 changes: 142 additions & 0 deletions
142
docs/data/material/getting-started/templates/dashboard/theme/customizations/dataGrid.ts
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The dashboard template is broken because this file was missing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,142 @@ | ||
| import { paperClasses } from '@mui/material/Paper'; | ||
| import { alpha } from '@mui/material/styles'; | ||
| import { menuItemClasses } from '@mui/material/MenuItem'; | ||
| import { listItemIconClasses } from '@mui/material/ListItemIcon'; | ||
| import { iconButtonClasses } from '@mui/material/IconButton'; | ||
| import { checkboxClasses } from '@mui/material/Checkbox'; | ||
| import { listClasses } from '@mui/material/List'; | ||
| import { gridClasses } from '@mui/x-data-grid'; | ||
| import { tablePaginationClasses } from '@mui/material/TablePagination'; | ||
| import type { ComponentsOverrides, ComponentsProps, Theme } from '@mui/material/styles'; | ||
|
|
||
| import { gray } from '../../../shared-theme/themePrimitives'; | ||
|
|
||
| interface DataGridComponents<MuiTheme = unknown> { | ||
| MuiDataGrid?: { | ||
| defaultProps?: ComponentsProps['MuiDataGrid']; | ||
| styleOverrides?: ComponentsOverrides<MuiTheme>['MuiDataGrid']; | ||
| }; | ||
| } | ||
|
|
||
| /* eslint-disable import/prefer-default-export */ | ||
| export const dataGridCustomizations: DataGridComponents<Theme> = { | ||
| MuiDataGrid: { | ||
| styleOverrides: { | ||
| root: ({ theme }) => ({ | ||
| '--DataGrid-overlayHeight': '300px', | ||
| overflow: 'clip', | ||
| borderColor: (theme.vars || theme).palette.divider, | ||
| backgroundColor: (theme.vars || theme).palette.background.default, | ||
| [`& .${gridClasses.columnHeader}`]: { | ||
| backgroundColor: (theme.vars || theme).palette.background.paper, | ||
| }, | ||
| [`& .${gridClasses.footerContainer}`]: { | ||
| backgroundColor: (theme.vars || theme).palette.background.paper, | ||
| }, | ||
| [`& .${checkboxClasses.root}`]: { | ||
| padding: theme.spacing(0.5), | ||
| '& > svg': { | ||
| fontSize: '1rem', | ||
| }, | ||
| }, | ||
| [`& .${tablePaginationClasses.root}`]: { | ||
| marginRight: theme.spacing(1), | ||
| '& .MuiIconButton-root': { | ||
| maxHeight: 32, | ||
| maxWidth: 32, | ||
| '& > svg': { | ||
| fontSize: '1rem', | ||
| }, | ||
| }, | ||
| }, | ||
| }), | ||
| cell: ({ theme }) => ({ | ||
| borderTopColor: (theme.vars || theme).palette.divider, | ||
| }), | ||
| menu: ({ theme }) => ({ | ||
| borderRadius: theme.shape.borderRadius, | ||
| backgroundImage: 'none', | ||
| [`& .${paperClasses.root}`]: { | ||
| border: `1px solid ${(theme.vars || theme).palette.divider}`, | ||
| }, | ||
| [`& .${menuItemClasses.root}`]: { | ||
| margin: '0 4px', | ||
| }, | ||
| [`& .${listItemIconClasses.root}`]: { | ||
| marginRight: 0, | ||
| }, | ||
| [`& .${listClasses.root}`]: { | ||
| paddingLeft: 0, | ||
| paddingRight: 0, | ||
| }, | ||
| }), | ||
| row: ({ theme }) => ({ | ||
| '&:last-of-type': { | ||
| borderBottom: `1px solid ${(theme.vars || theme).palette.divider}`, | ||
| }, | ||
| '&:hover': { | ||
| backgroundColor: (theme.vars || theme).palette.action.hover, | ||
| }, | ||
| '&.Mui-selected': { | ||
| background: (theme.vars || theme).palette.action.selected, | ||
| '&:hover': { | ||
| backgroundColor: (theme.vars || theme).palette.action.hover, | ||
| }, | ||
| }, | ||
| }), | ||
| iconButtonContainer: ({ theme }) => ({ | ||
| [`& .${iconButtonClasses.root}`]: { | ||
| border: 'none', | ||
| backgroundColor: 'transparent', | ||
| '&:hover': { | ||
| backgroundColor: alpha(theme.palette.action.selected, 0.3), | ||
| }, | ||
| '&:active': { | ||
| backgroundColor: gray[200], | ||
| }, | ||
| ...theme.applyStyles('dark', { | ||
| color: gray[50], | ||
| '&:hover': { | ||
| backgroundColor: gray[800], | ||
| }, | ||
| '&:active': { | ||
| backgroundColor: gray[900], | ||
| }, | ||
| }), | ||
| }, | ||
| }), | ||
| menuIconButton: ({ theme }) => ({ | ||
| border: 'none', | ||
| backgroundColor: 'transparent', | ||
| '&:hover': { | ||
| backgroundColor: gray[100], | ||
| }, | ||
| '&:active': { | ||
| backgroundColor: gray[200], | ||
| }, | ||
| ...theme.applyStyles('dark', { | ||
| color: gray[50], | ||
| '&:hover': { | ||
| backgroundColor: gray[800], | ||
| }, | ||
| '&:active': { | ||
| backgroundColor: gray[900], | ||
| }, | ||
| }), | ||
| }), | ||
| filterForm: ({ theme }) => ({ | ||
| gap: theme.spacing(1), | ||
| alignItems: 'flex-end', | ||
| }), | ||
| columnsManagementHeader: ({ theme }) => ({ | ||
| paddingRight: theme.spacing(3), | ||
| paddingLeft: theme.spacing(3), | ||
| }), | ||
| columnHeaderTitleContainer: { | ||
| flexGrow: 1, | ||
| justifyContent: 'space-between', | ||
| }, | ||
| columnHeaderDraggableContainer: { paddingRight: 2 }, | ||
| }, | ||
| }, | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 think a different icon would be better suited for this. The pencil makes me think it would start editing inline (like how GitHub works)
What do you think of
Terminal,Code,Biotech,PrecisionManufacturing,Construction,DisplaySettings, orOpenInBrowserUh oh!
There was an error while loading. Please reload this page.
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.
Sure,
terminalcould also make sense. In the templates pageCodeis already used for linking to the code on github.The other options
ViewInAr:Personally I still find the pencil most intuitive, but I don't have a strong opinion on this. Which do you think is best?
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 like
Terminalthe most since seeing the logs is the most noticeable difference between inline live-edit and StackBlitz. Another reason I dislike the pencil is that if we add live editing to Base UI, I think it would make sense to need to press the pencil to start live editing within the page. It would be interesting to hear what others think too.Uh oh!
There was an error while loading. Please reload this page.
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.
Another option
Launch: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 also prefer
LaunchIn isolation, I like
ViewInAr, but I find it too similar to the focus icon, which is two places to the side.