Skip to content

Commit

Permalink
[RHOAIENG-11447]: Identify and replace style overrides with MUI tokens (
Browse files Browse the repository at this point in the history
#14)

* bump to mui v6 betas, update css values with MUI tokens, WIP

* use theme vars

* [WIP]: bump MUI v6 version, identify MUI tokens, declare other overrides at top of file

* add tabs tokens (#15)

* Add table tokens (#16)

* add table tokens, fix tests

* fix tests

* fix tests

* remove unused import
  • Loading branch information
jenny-s51 authored Sep 13, 2024
1 parent 3337730 commit 5d8a189
Show file tree
Hide file tree
Showing 13 changed files with 269 additions and 199 deletions.
2 changes: 2 additions & 0 deletions env.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
OC_PROJECT=opendatahub
NAMESPACE=jenny
136 changes: 70 additions & 66 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 @@ -99,9 +99,9 @@
"@babel/core": "^7.21.0",
"@cypress/code-coverage": "^3.12.34",
"@jsdevtools/coverage-istanbul-loader": "^3.0.5",
"@mui/material": "^5.16.4",
"@mui/icons-material": "^5.16.5",
"@mui/types": "^7.2.15",
"@mui/material": "6.0.0-rc.0",
"@mui/icons-material": "6.0.0-rc.0",
"@mui/types": "7.2.15",
"@testing-library/cypress": "^10.0.1",
"@testing-library/dom": "^9.3.4",
"@testing-library/jest-dom": "^6.3.0",
Expand Down
1 change: 0 additions & 1 deletion frontend/src/app/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
MastheadMain,
MastheadToggle,
PageToggleButton,
Switch,
} from '@patternfly/react-core';
import { BarsIcon } from '@patternfly/react-icons';
import { Link } from 'react-router-dom';
Expand Down
16 changes: 8 additions & 8 deletions frontend/src/app/HeaderTools.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const HeaderTools: React.FC<HeaderToolsProps> = ({ onNotificationsClick }) => {

React.useEffect(() => {
window.isSwitched = !isChecked;
}, [window.isSwitched]);
}, [isChecked]);

const handleChange = (_event: React.FormEvent<HTMLInputElement>, checked: boolean) => {
setIsChecked(!checked);
Expand Down Expand Up @@ -147,13 +147,13 @@ const HeaderTools: React.FC<HeaderToolsProps> = ({ onNotificationsClick }) => {
<Toolbar isFullHeight>
<ToolbarContent>
<ToolbarItem>
<Switch
id="simple-switch"
label="Toggle MUI Theme"
isChecked={!isChecked}
onChange={handleChange}
ouiaId="BasicSwitch"
/>
<Switch
id="simple-switch"
label="Toggle MUI Theme"
isChecked={!isChecked}
onChange={handleChange}
ouiaId="BasicSwitch"
/>
</ToolbarItem>
<ToolbarGroup variant="action-group-plain" align={{ default: 'alignEnd' }}>
{!dashboardConfig.spec.dashboardConfig.disableAppLauncher ? (
Expand Down
4 changes: 3 additions & 1 deletion frontend/src/components/DashboardDescriptionListGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ const DashboardDescriptionListGroup: React.FC<DashboardDescriptionListGroupProps
) : (
<DescriptionListTerm>{title}</DescriptionListTerm>
)}
<DescriptionListDescription className={isEmpty && !isEditing ? text.textColorDisabledOnMd : ''}>
<DescriptionListDescription
className={isEmpty && !isEditing ? text.textColorDisabledOnMd : ''}
>
{isEditing ? contentWhenEditing : isEmpty ? contentWhenEmpty : children}
</DescriptionListDescription>
</DescriptionListGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import * as React from 'react';
import { DrawerPanelBody, Tab, TabContent, Tabs } from '@patternfly/react-core';
import SelectedNodeDetailsTab from '~/concepts/pipelines/content/pipelinesDetails/pipelineRun/SelectedNodeDetailsTab';
import SelectedNodeInputOutputTab from '~/concepts/pipelines/content/pipelinesDetails/pipelineRun/SelectedNodeInputOutputTab';
import LogsTab from '~/concepts/pipelines/content/pipelinesDetails/pipelineRun/runLogs/LogsTab';
import './PipelineRunDrawer.scss';
import { PipelineTask } from '~/concepts/pipelines/topology';
import { Execution } from '~/third_party/mlmd';
Expand Down Expand Up @@ -53,7 +52,7 @@ const PipelineRunDrawerRightTabs: React.FC<PipelineRunDrawerRightTabsProps> = ({
title: 'Logs',
isDisabled: !task.status?.podName,
// content: <LogsTab task={task} />,
content: <></>
content: <></>,
},
};

Expand Down
Loading

0 comments on commit 5d8a189

Please sign in to comment.