Skip to content

Commit

Permalink
frontend: upgrade storybook
Browse files Browse the repository at this point in the history
Older storybook was giving webpack wearnings
  • Loading branch information
ErvinRacz committed Dec 13, 2024
1 parent c676731 commit 662b072
Show file tree
Hide file tree
Showing 16 changed files with 99 additions and 83 deletions.
139 changes: 76 additions & 63 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@types/dompurify": "^2.2.1",
"@types/node": "^14.17.4",
"@types/pubsub-js": "^1.8.2",
"@types/react": "^17.0.13",
"@types/react": "^18.3.16",
"@types/react-color": "^3.0.4",
"@types/react-dom": "^17.0.8",
"@types/react-window": "^1.8.2",
Expand All @@ -35,9 +35,9 @@
"moment-timezone": "^0.5.38",
"prop-types": "^15.7.2",
"pubsub-js": "^1.9.3",
"react": "^17.0.2",
"react": "^18.3.1",
"react-color": "^2.17.3",
"react-dom": "^17.0.2",
"react-dom": "^18.3.1",
"react-i18next": "^11.11.0",
"react-redux": "^7.2.4",
"react-router-dom": "^5.1.2",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meta, Story } from '@storybook/react/types-6-0';
import type { Meta } from '@storybook/react';
import { MemoryRouter } from 'react-router-dom';
import { activityStore } from '../../stores/Stores';
import ActivityContainer, { ActivityContainerProps } from './ActivityContainer';
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Channels/ChannelAvatar.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Theme } from '@material-ui/core';
import Avatar from '@material-ui/core/Avatar';
import makeStyles from '@material-ui/styles/makeStyles';
import { makeStyles } from '@material-ui/core/styles';

export interface ChannelAvatarProps {
backgroundColor?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { Theme } from '@material-ui/core';
import Box from '@material-ui/core/Box';
import Chip from '@material-ui/core/Chip';
import Grid from '@material-ui/core/Grid';
import { useTheme } from '@material-ui/core/styles';
import Typography from '@material-ui/core/Typography';
import { useTheme } from '@material-ui/styles';
import React from 'react';
import _ from 'underscore';
import { Group } from '../../../api/apiDataTypes';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { Theme } from '@material-ui/core';
import Box from '@material-ui/core/Box';
import Chip from '@material-ui/core/Chip';
import Grid from '@material-ui/core/Grid';
import { useTheme } from '@material-ui/core/styles';
import Typography from '@material-ui/core/Typography';
import { useTheme } from '@material-ui/styles';
import React from 'react';
import semver from 'semver';
import { Group } from '../../../api/apiDataTypes';
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Instances/Charts.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { IconifyIcon, InlineIcon } from '@iconify/react';
import { Theme } from '@material-ui/core';
import Grid from '@material-ui/core/Grid';
import { makeStyles, useTheme } from '@material-ui/core/styles';
import Typography from '@material-ui/core/Typography';
import { makeStyles, useTheme } from '@material-ui/styles';
import React from 'react';
import { Trans, useTranslation } from 'react-i18next';
import { Cell, Label, Pie, PieChart } from 'recharts';
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/components/Instances/Common.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { Box, Link, Theme } from '@material-ui/core';
import Grid from '@material-ui/core/Grid';
import { makeStyles } from '@material-ui/core/styles';
import Typography from '@material-ui/core/Typography';
import { makeStyles } from '@material-ui/styles';
import React from 'react';
import { useTranslation } from 'react-i18next';
import { Link as RouterLink } from 'react-router-dom';

Expand Down
6 changes: 5 additions & 1 deletion frontend/src/components/Instances/Details.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ import Divider from '@material-ui/core/Divider';
import Grid from '@material-ui/core/Grid';
import Link from '@material-ui/core/Link';
import Paper from '@material-ui/core/Paper';
import { makeStyles, useTheme } from '@material-ui/core/styles';
import Table from '@material-ui/core/Table';
import TableBody from '@material-ui/core/TableBody';
import TableCell from '@material-ui/core/TableCell';
import TableHead from '@material-ui/core/TableHead';
import TableRow from '@material-ui/core/TableRow';
import Typography from '@material-ui/core/Typography';
import { makeStyles, useTheme } from '@material-ui/styles';
import { Field, Form, Formik, FormikHelpers, FormikProps } from 'formik';
import { TextField } from 'formik-material-ui';
import React from 'react';
Expand Down Expand Up @@ -97,6 +97,10 @@ function StatusLabel(props: StatusLabelProps) {
const { status, activated } = props;
const { label = t('frequent|Unknown') } = (status && statusDefs[status.type]) || {};

if (typeof label === 'object' && label !== null) {
throw new Error('Translation key returned an object, which is not supported.');
}

return (
<span>
{/* If there is no onClick passed to it, then we're not a button */}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Instances/List.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import InputLabel from '@material-ui/core/InputLabel';
import MenuItem from '@material-ui/core/MenuItem';
import Paper from '@material-ui/core/Paper';
import Select from '@material-ui/core/Select';
import { useTheme } from '@material-ui/core/styles';
import TablePagination from '@material-ui/core/TablePagination';
import { useTheme } from '@material-ui/styles';
import PropTypes from 'prop-types';
import React, { ChangeEvent } from 'react';
import { useTranslation } from 'react-i18next';
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/components/Instances/StatusHistoryList.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { makeStyles } from '@material-ui/core';
import { makeStyles } from '@material-ui/core/styles';
import Table from '@material-ui/core/Table';
import TableBody from '@material-ui/core/TableBody';
import TableCell from '@material-ui/core/TableCell';
import TableHead from '@material-ui/core/TableHead';
import TableRow from '@material-ui/core/TableRow';
import React from 'react';
import { useTranslation } from 'react-i18next';
import { InstanceStatusHistory } from '../../api/apiDataTypes';
import StatusHistoryItem from './StatusHistoryItem';
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/components/Packages/Item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ import ListItem from '@material-ui/core/ListItem';
import ListItemIcon from '@material-ui/core/ListItemIcon';
import ListItemSecondaryAction from '@material-ui/core/ListItemSecondaryAction';
import ListItemText from '@material-ui/core/ListItemText';
import { makeStyles } from '@material-ui/core/styles';
import Typography from '@material-ui/core/Typography';
import makeStyles from '@material-ui/styles/makeStyles';
import PropTypes from 'prop-types';
import React from 'react';
import { useTranslation } from 'react-i18next';
import _ from 'underscore';
import { Channel, Package } from '../../api/apiDataTypes';
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/common/ColorPicker/ColorPicker.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import IconButton from '@material-ui/core/IconButton';
import Popover from '@material-ui/core/Popover';
import { makeStyles } from '@material-ui/styles';
import { makeStyles } from '@material-ui/core/styles';
import React from 'react';
import { TwitterPicker } from 'react-color';
import ChannelAvatar from '../../Channels/ChannelAvatar';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Paper from '@material-ui/core/Paper';
import { styled } from '@material-ui/styles';
import { styled } from '@material-ui/core/styles';

const SectionPaper = styled(Paper)({
padding: '1em',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import Paper from '@material-ui/core/Paper';
import { makeStyles, Theme } from '@material-ui/core/styles';
import { useTheme } from '@material-ui/core/styles';
import Table from '@material-ui/core/Table';
import TableBody from '@material-ui/core/TableBody';
import TableCell from '@material-ui/core/TableCell';
import TableRow from '@material-ui/core/TableRow';
import { useTheme } from '@material-ui/styles';
import React from 'react';
import { useTranslation } from 'react-i18next';
import { Bar, BarChart, ResponsiveContainer, Tooltip, XAxis, YAxis } from 'recharts';
Expand Down
Loading

0 comments on commit 662b072

Please sign in to comment.