Skip to content

Commit

Permalink
Azure DevOps - Revert MUI v5 Migration (#2095)
Browse files Browse the repository at this point in the history
* Revert "Azure DevOps - Migrated to MUI v5 (#1805)"

This reverts commit c5283ca.

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

* Revert "fix(azure-devops): corrected api report (#1871)"

This reverts commit 1fbf57e.

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

* Added changeset

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

---------

Signed-off-by: Andre Wanlin <awanlin@spotify.com>
  • Loading branch information
awanlin authored Nov 29, 2024
1 parent 57d34dc commit d71fade
Show file tree
Hide file tree
Showing 19 changed files with 56 additions and 103 deletions.
5 changes: 5 additions & 0 deletions workspaces/azure-devops/.changeset/dirty-pens-argue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@backstage-community/plugin-azure-devops': patch
---

Reverted the MUI v5 migration
5 changes: 2 additions & 3 deletions workspaces/azure-devops/plugins/azure-devops/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,8 @@
"@backstage/frontend-plugin-api": "^0.9.0",
"@backstage/plugin-catalog-react": "^1.14.0",
"@backstage/plugin-permission-react": "^0.4.27",
"@mui/icons-material": "^5.16.7",
"@mui/material": "^5.16.7",
"@mui/styles": "^5.16.7",
"@material-ui/core": "^4.12.2",
"@material-ui/icons": "^4.9.1",
"@types/react": "^16.13.1 || ^17.0.0 || ^18.0.0",
"humanize-duration": "^3.27.0",
"luxon": "^3.0.0",
Expand Down
2 changes: 1 addition & 1 deletion workspaces/azure-devops/plugins/azure-devops/report.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { Readme } from '@backstage-community/plugin-azure-devops-common';
import { ReadmeConfig } from '@backstage-community/plugin-azure-devops-common';
import { RepoBuild } from '@backstage-community/plugin-azure-devops-common';
import { RepoBuildOptions } from '@backstage-community/plugin-azure-devops-common';
import { SvgIconProps } from '@mui/material/SvgIcon';
import { SvgIconProps } from '@material-ui/core/SvgIcon';
import { Team } from '@backstage-community/plugin-azure-devops-common';

// @public (undocumented)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon';
import SvgIcon, { SvgIconProps } from '@material-ui/core/SvgIcon';

import React from 'react';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon';
import SvgIcon, { SvgIconProps } from '@material-ui/core/SvgIcon';

import React from 'react';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

import React from 'react';
import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon';
import SvgIcon, { SvgIconProps } from '@material-ui/core/SvgIcon';

/** @public */
export const AzurePullRequestsIcon = (props: SvgIconProps) => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* limitations under the License.
*/

import Box from '@mui/material/Box';
import Typography from '@mui/material/Typography';
import Box from '@material-ui/core/Box';
import Typography from '@material-ui/core/Typography';
import {
BuildResult,
BuildRun,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import Box from '@mui/material/Box';
import Box from '@material-ui/core/Box';
import {
Link,
ResponseErrorPanel,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* limitations under the License.
*/

import Button from '@mui/material/Button';
import ButtonGroup from '@mui/material/ButtonGroup';
import Button from '@material-ui/core/Button';
import ButtonGroup from '@material-ui/core/ButtonGroup';

import { PullRequestStatus } from '@backstage-community/plugin-azure-devops-common';
import React from 'react';
Expand All @@ -30,23 +30,23 @@ export const PullRequestStatusButtonGroup = ({
return (
<ButtonGroup aria-label="outlined button group">
<Button
color={status === PullRequestStatus.Active ? 'secondary' : 'primary'}
color={status === PullRequestStatus.Active ? 'primary' : 'default'}
onClick={() => {
setStatus(PullRequestStatus.Active);
}}
>
Active
</Button>
<Button
color={status === PullRequestStatus.Completed ? 'secondary' : 'primary'}
color={status === PullRequestStatus.Completed ? 'primary' : 'default'}
onClick={() => {
setStatus(PullRequestStatus.Completed);
}}
>
Completed
</Button>
<Button
color={status === PullRequestStatus.Abandoned ? 'secondary' : 'primary'}
color={status === PullRequestStatus.Abandoned ? 'primary' : 'default'}
onClick={() => {
setStatus(PullRequestStatus.Abandoned);
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* limitations under the License.
*/

import Box from '@mui/material/Box';
import Chip from '@mui/material/Chip';
import Box from '@material-ui/core/Box';
import Chip from '@material-ui/core/Chip';
import {
Link,
ResponseErrorPanel,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
* limitations under the License.
*/

import DoneAllIcon from '@mui/icons-material/DoneAll';
import DoneAllIcon from '@material-ui/icons/DoneAll';
import React from 'react';
import makeStyles from '@mui/styles/makeStyles';
import { makeStyles } from '@material-ui/core/styles';

const useStyles = makeStyles(theme => ({
root: (props: { hasAutoComplete: boolean }) => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,24 @@
*/

import { Avatar, Link } from '@backstage/core-components';
import Card from '@mui/material/Card';
import CardContent from '@mui/material/CardContent';
import CardHeader from '@mui/material/CardHeader';
import Typography from '@mui/material/Typography';
import Card from '@material-ui/core/Card';
import CardContent from '@material-ui/core/CardContent';
import CardHeader from '@material-ui/core/CardHeader';
import Typography from '@material-ui/core/Typography';

import { AutoCompleteIcon } from '../AutoCompleteIcon';
import { DashboardPullRequest } from '@backstage-community/plugin-azure-devops-common';
import { DateTime } from 'luxon';
import { PullRequestCardPolicies } from './PullRequestCardPolicies';
import { PullRequestCardReviewers } from './PullRequestCardReviewers';
import React from 'react';
import makeStyles from '@mui/styles/makeStyles';
import { makeStyles } from '@material-ui/core/styles';

const useStyles = makeStyles(
theme => ({
card: {
backgroundColor:
theme.palette.mode === 'dark'
theme.palette.type === 'dark'
? theme.palette.grey[700]
: theme.palette.common.white,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,13 @@ import {
PolicyEvaluationStatus,
PolicyType,
} from '@backstage-community/plugin-azure-devops-common';
import { styled } from '@mui/material/styles';
import withStyles from '@mui/styles/withStyles';
import Typography from '@mui/material/Typography';
import { styled, withStyles } from '@material-ui/core/styles';
import Typography from '@material-ui/core/Typography';

import CancelIcon from '@mui/icons-material/Cancel';
import GroupWorkIcon from '@mui/icons-material/GroupWork';
import CancelIcon from '@material-ui/icons/Cancel';
import GroupWorkIcon from '@material-ui/icons/GroupWork';
import React from 'react';
import WatchLaterIcon from '@mui/icons-material/WatchLater';
import WatchLaterIcon from '@material-ui/icons/WatchLater';

const PolicyRequiredIcon = withStyles(
theme => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import { Avatar } from '@backstage/core-components';
import React from 'react';
import { Reviewer } from '@backstage-community/plugin-azure-devops-common';
import makeStyles from '@mui/styles/makeStyles';
import { makeStyles } from '@material-ui/core/styles';

type PullRequestCardReviewerProps = {
reviewer: Reviewer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { PullRequestCardReviewer } from './PullRequestCardReviewer';
import React from 'react';
import { Reviewer } from '@backstage-community/plugin-azure-devops-common';
import { reviewerFilter } from '../utils';
import { styled } from '@mui/material/styles';
import { styled } from '@material-ui/core/styles';

const PullRequestCardReviewersContainer = styled('div')({
'& > *': {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import { PullRequestGridColumn } from '../PullRequestGridColumn';
import { PullRequestGroup } from '../types';
import React from 'react';
import { styled } from '@mui/material/styles';
import { styled } from '@material-ui/core/styles';

const GridDiv = styled('div')(({ theme }) => ({
display: 'flex',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,9 @@
* limitations under the License.
*/

import Paper from '@mui/material/Paper';
import Typography from '@mui/material/Typography';
import { styled } from '@mui/material/styles';

import withStyles from '@mui/styles/withStyles';
import Paper from '@material-ui/core/Paper';
import Typography from '@material-ui/core/Typography';
import { styled, withStyles } from '@material-ui/core/styles';

import { PullRequestCard } from '../PullRequestCard';
import { PullRequestGroup } from '../types';
Expand All @@ -31,7 +29,7 @@ const ColumnPaper = withStyles(theme => ({
flex: 1,
padding: theme.spacing(2),
backgroundColor:
theme.palette.mode === 'dark'
theme.palette.type === 'dark'
? theme.palette.grey[800]
: theme.palette.grey[300],
height: '100%',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
* limitations under the License.
*/

import Box from '@mui/material/Box';
import Button from '@mui/material/Button';
import makeStyles from '@mui/styles/makeStyles';
import Box from '@material-ui/core/Box';
import Button from '@material-ui/core/Button';
import { makeStyles } from '@material-ui/core/styles';
import {
InfoCard,
Progress,
Expand Down
Loading

0 comments on commit d71fade

Please sign in to comment.