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

Upgrade MUI #829

Merged
merged 24 commits into from
Jun 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
5af76da
upgrade @mui/styles @mui/icons-material @mui/material @emotion/styled…
L4Ph May 29, 2024
44e7271
remove @mui/lab
L4Ph May 29, 2024
5709a61
Removed the code that called @mui/lab.
L4Ph May 29, 2024
00d41ea
fix type check for LayerPagination.tsx
L4Ph May 29, 2024
5a5573a
fix type check for AutocompleteKeys.tsx
L4Ph May 29, 2024
8245a7d
upgrade @mui/styles @mui/icons-material @mui/material @emotion/styled…
L4Ph May 29, 2024
cc08123
Upgrade the following dependencies to the latest versions.
L4Ph May 30, 2024
01e91d4
Introduce Vite.
yoichiro May 30, 2024
3bcc022
Move the index.html file to the /src directory.
yoichiro May 30, 2024
dbfd654
Replace each `process.env` with `import.env`.
yoichiro May 30, 2024
dbf35f8
Divide Firebase configuration values to the new file to avoid the tes…
yoichiro May 30, 2024
b21d1cb
Introduce ESLint and modify the configuration file to solve some issues.
yoichiro May 30, 2024
eb6b005
ci: Increment the build number to 257
May 30, 2024
6d7b499
Revert "Migrate a module bundler from webpack to vite"
yoichiro May 30, 2024
6829bff
ci: Increment the build number to 258
May 30, 2024
85b7abd
Revert "Revert "Migrate a module bundler from webpack to vite""
yoichiro May 31, 2024
99c8b3f
ci: Increment the build number to 259
May 31, 2024
31f7d80
Revert "[Redeploy] Migrate a module bundler from webpack to vite"
yoichiro May 31, 2024
f104a11
ci: Increment the build number to 260
May 31, 2024
0de5b40
Revert "Revert "[Redeploy] Migrate a module bundler from webpack to v…
yoichiro May 31, 2024
373ad61
Fix the error "Buffer is not defined".
yoichiro May 31, 2024
3bcac4a
ci: Increment the build number to 261
May 31, 2024
da51f3c
Merge branch 'main' into upgrade-mui-latest
L4Ph Jun 1, 2024
b540b76
fix lockfile
L4Ph Jun 1, 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
11 changes: 5 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
"version": "0.2.3",
"private": true,
"dependencies": {
"@emotion/react": "^11.7.1",
"@emotion/styled": "^11.6.0",
"@mui/icons-material": "^5.2.5",
"@mui/lab": "^5.0.0-alpha.64",
"@mui/material": "^5.2.8",
"@mui/styles": "^5.2.3",
"@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.5",
"@mui/icons-material": "^5.15.19",
"@mui/material": "^5.15.19",
"@mui/styles": "^5.15.19",
"@pdf-lib/fontkit": "^1.1.1",
"@types/react-helmet-async": "^1.0.3",
"@types/react-image-gallery": "^1.0.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
CircularProgress,
Typography,
} from '@mui/material';
import { Alert, AlertTitle } from '@mui/lab';
import { Alert, AlertTitle } from '@mui/material';
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
import './KeyboardDefinitionFormPart.scss';
import { IKeyboardDefinitionDocument } from '../../../services/storage/Storage';
Expand Down
8 changes: 4 additions & 4 deletions src/components/common/layer/LayerPagination.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Badge, Chip, IconButton } from '@mui/material';
import { makeStyles, withStyles } from '@mui/styles';
import { usePagination } from '@mui/lab';
import usePagination from '@mui/material/usePagination';
import {
KeyboardArrowDown,
KeyboardArrowLeft,
Expand Down Expand Up @@ -43,7 +43,7 @@ type LayerPaginationOrientation = 'horizontal' | 'vertical';
type LayerPaginationProps = {
count: number;
invisiblePages: boolean[];
page: number;
page: number | null;
// eslint-disable-next-line no-unused-vars
onClickPage: (page: number) => void;
orientation: LayerPaginationOrientation;
Expand All @@ -61,7 +61,7 @@ export default function LayerPagination(props: LayerPaginationProps) {
const classes = useLayerPaginationStyles();
const { items } = usePagination({
count: props.count,
page: props.page,
page: props.page !== null ? props.page : 1,
onChange: (event, page) => {
props.onClickPage(page);
},
Expand All @@ -77,7 +77,7 @@ export default function LayerPagination(props: LayerPaginationProps) {
>
{items.map(({ page, type, selected, ...item }, index) => {
let children = null;
if (type === 'page') {
if (type === 'page' && page !== null) {
children = (
<StyledBadge
color="primary"
Expand Down
5 changes: 4 additions & 1 deletion src/components/configure/customkey/AutocompleteKeys.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import './AutocompleteKeys.scss';
import Autocomplete from '@mui/lab/Autocomplete';
import Autocomplete from '@mui/material/Autocomplete';
import { TextField } from '@mui/material';
import { IKeymap } from '../../../services/hid/Hid';
import { KeymapCategory } from '../../../services/hid/KeycodeList';
Expand Down Expand Up @@ -89,6 +89,9 @@ export default class AutocompleteKeys extends React.Component<
this.setInputValue(newInputValue.split('::')[0]);
}}
getOptionLabel={(option) => {
if (typeof option === 'string') {
return option;
}
return `${option.keycodeInfo!.label}::${option.kinds.join('::')}`;
}}
renderOption={(props, option) => (
Expand Down
2 changes: 1 addition & 1 deletion src/components/configure/importDef/ImportDefDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
import { Button, Dialog, DialogContent, DialogTitle } from '@mui/material';
import CloseIcon from '@mui/icons-material/Close';
import Paper, { PaperProps } from '@mui/material/Paper';
import { Alert, AlertTitle } from '@mui/lab';
import { Alert, AlertTitle } from '@mui/material';

import { KeyboardDefinitionSchema } from '../../../gen/types/KeyboardDefinition';
import { KeyboardDefinitionFormPart } from '../../common/keyboarddefformpart/KeyboardDefinitionFormPart';
Expand Down
Loading
Loading