Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
3afc777
TT-7441 Add custom headerbackground color
nghtctrl Jun 18, 2026
f449254
TT-7441 Adjust AppHead and PassageDetailMobileLayout background color
nghtctrl Jun 18, 2026
d8c4576
TT-7441 Remove the shadow at the bottom of the AppBar
nghtctrl Jun 18, 2026
e7fc829
TT-7441 Use different contrasting colors for the parallelograms
nghtctrl Jun 18, 2026
bf952c5
TT-7441 Lock document scroll on mobile so that MobileWorkflowSteps wo…
nghtctrl Jun 18, 2026
96064aa
TT-7441 Make sure that the content under the header is a default back…
nghtctrl Jun 18, 2026
39c2a9a
TT-7441 The tip should be accessible inside the dropdown menu button
nghtctrl Jun 18, 2026
4ce29da
TT-7441 Add button theme
nghtctrl Jun 18, 2026
81ae2cf
TT-7441 Use the theming typography
nghtctrl Jun 18, 2026
6969267
TT-7441 Use consistent hex codes for colors
nghtctrl Jun 18, 2026
2e68a76
TT-7441 Position the tip icon on the right hand side of the buttom label
nghtctrl Jun 18, 2026
65a4be6
TT-7441 Disable gutters and don't add padding around the back button
nghtctrl Jun 18, 2026
14dd5a3
TT-7441 Disable gutters for the desktop toolbar too
nghtctrl Jun 18, 2026
6233a07
TT-7441 Use primary.light color for tip icons
nghtctrl Jun 18, 2026
93d5f56
TT-7441 Make sure that that AppBar is also padded consistently with t…
nghtctrl Jun 18, 2026
ed29501
TT-7441 Revert to default MUI icon button padding size
nghtctrl Jun 18, 2026
a1405b6
TT-7441 Use different icon style and don't make it in primary color
nghtctrl Jun 18, 2026
ffb840b
TT-7441 Turn it into an icon button rather than a regular button so t…
nghtctrl Jun 18, 2026
268c47b
TT-7441 Footer should also use the custom background color
nghtctrl Jun 18, 2026
60e31e0
TT-7441 Make the next/previous footer buttons sized consistently (rat…
nghtctrl Jun 18, 2026
87fc1a2
TT-7441 Make step complete into a button
nghtctrl Jun 18, 2026
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
73 changes: 67 additions & 6 deletions src/renderer/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,21 @@ import { getDataGridLocale } from './utils/dataGridLocale';
import { useMemo } from 'react';
export { HeadHeight } from './layout';

declare module '@mui/material/styles' {
interface Palette {
custom: {
currentRegion: string;
headerBackground: string;
};
}
interface PaletteOptions {
custom?: {
currentRegion: string;
headerBackground: string;
};
}
}

function App(): React.JSX.Element {
const lang = useSelector((state: IState) => state.strings.lang, shallowEqual);

Expand All @@ -19,19 +34,65 @@ function App(): React.JSX.Element {
{
palette: {
primary: {
main: '#135CB9', //Original: 135CB9, Better color: 1D9F90
main: '#135CB9',
},
secondary: {
main: '#00A7E1', //Original: 00A7E1, Better color: 25CBB8
main: '#00A7E1',
},
// Custom colors - simple key-value pairs
custom: {
currentRegion: 'rgb(102, 255, 0, .5)',
currentRegion: '#66FF0080',
headerBackground: '#EEEEEE',
},
} as any,
},
typography: {
button: {
textTransform: 'capitalize',
textTransform: 'none',
},
},
components: {
MuiAppBar: {
styleOverrides: {
root: {
boxShadow: 'none',
},
},
},
MuiButton: {
defaultProps: {
disableElevation: true,
},
styleOverrides: {
root: {
borderRadius: '8px',
padding: '8px 16px',
boxShadow: '1px 1px 3px #0000001F',
color: '#000000',
height: 36,
background: '#FFFFFF',
'&:hover': {
background: '#E2E2E2',
},
'&:disabled': {
background: '#F0F0F0',
},
},
},
variants: [
{
// Contained buttons are primary buttons
props: { variant: 'contained' },
style: {
background: '#333333',
color: '#FFFFFF',
'&:hover': {
background: '#555555',
},
'&:disabled': {
background: '#F0F0F0',
},
},
},
],
},
},
},
Expand Down
13 changes: 7 additions & 6 deletions src/renderer/src/components/App/AppHead.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@ import { useGetGlobal, useGlobal } from '../../context/useGlobal';
import { useLocation } from 'react-router-dom';
import { IState, IViewModeStrings } from '../../model';
import { shallowEqual, useSelector } from 'react-redux';
import {
AppBar,
LinearProgress,
Box,
} from '@mui/material';
import { AppBar, LinearProgress, Box } from '@mui/material';
import { isElectron } from '../../../api-variable';
import { TokenContext } from '../../context/TokenProvider';
import { UnsavedContext } from '../../context/UnsavedContext';
Expand Down Expand Up @@ -285,7 +281,12 @@ export const AppHead = (props: IProps) => {
return (
<AppBar
position="fixed"
sx={{ width: '100%', display: 'flex' }}
sx={{
width: '100%',
display: 'flex',
px: 1.5,
backgroundColor: 'custom.headerBackground',
}}
color="inherit"
>
<>
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/src/components/App/DesktopToolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export const DesktopToolbar = ({
tv,
}: DesktopToolbarProps) => {
return (
<Toolbar>
<Toolbar disableGutters>
{!home && orgRole && (
<>
<ProjectName switchTo={switchTo ?? false} />
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/src/components/App/MobileToolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ export const MobileToolbar = ({
handleUserMenu,
}: MobileToolbarProps) => {
return (
<Toolbar>
<Toolbar disableGutters>
{!isDetail ? (
<IconButton onClick={() => navigate('/team')} sx={{ p: 0 }}>
<IconButton onClick={() => navigate('/team')}>
<ApmLogo sx={{ width: '24px', height: '24px' }} />
</IconButton>
) : (
Expand Down
9 changes: 4 additions & 5 deletions src/renderer/src/components/HelpMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import ReportIcon from '@mui/icons-material/Report';
import NotesIcon from '@mui/icons-material/SpeakerNotes';
import BooksIcon from '@mui/icons-material/LibraryBooks';
import TrainingIcon from '@mui/icons-material/FlightClass';
import HelpIcon from '@mui/icons-material/Help';
import HelpOutlineIcon from '@mui/icons-material/HelpOutline';
import InfoIcon from '@mui/icons-material/Info';
import DownloadIcon from '@mui/icons-material/CloudDownload';
import FolderIcon from '@mui/icons-material/Folder';
Expand Down Expand Up @@ -178,10 +178,9 @@ export function HelpMenu(props: IProps) {
<IconButton
aria-controls="customized-menu"
aria-haspopup="true"
color="primary"
onClick={handleClick}
>
<HelpIcon />
<HelpOutlineIcon />
</IconButton>
<StyledMenu
id="helpClose"
Expand All @@ -193,14 +192,14 @@ export function HelpMenu(props: IProps) {
>
<StyledMenuItem id="helpHelp" onClick={handleHelp('')}>
<ListItemIcon>
<HelpIcon />
<HelpOutlineIcon />
</ListItemIcon>
<ListItemText primary={t.helpCenter} />
</StyledMenuItem>
{planRec && (
<StyledMenuItem id="helpSheet" onClick={handleHelp(spreadsheetTopic)}>
<ListItemIcon>
<HelpIcon />
<HelpOutlineIcon />
</ListItemIcon>
<ListItemText primary={t.helpSpreadsheet} />
</StyledMenuItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default function PassageDetailMobileLayout({
>
<Box
sx={{
backgroundColor: 'background.default',
backgroundColor: 'custom.headerBackground',
borderBottom: '1px solid',
borderColor: 'divider',
}}
Expand All @@ -42,6 +42,7 @@ export default function PassageDetailMobileLayout({
</Box>
<Box
sx={{
backgroundColor: 'background.default',
px: 1.5,
pt: 1.5,
pb: 1.5,
Expand All @@ -67,12 +68,11 @@ export default function PassageDetailMobileLayout({
)}
<Box
sx={{
backgroundColor: 'background.default',
backgroundColor: 'custom.headerBackground',
borderTop: '1px solid',
borderColor: 'divider',
px: 1,
pt: '4px',
pb: 'calc(2px + env(safe-area-inset-bottom, 0px))',
px: 1.5,
py: 1,
}}
>
{footer}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useCallback, useContext, useMemo, useState } from 'react';
import { useGlobal } from '../../../context/useGlobal';
import { Box, IconButton, Typography } from '@mui/material';
import CompleteIcon from '@mui/icons-material/CheckBoxOutlined';
import { Box, Button } from '@mui/material';
import CompleteIcon from '@mui/icons-material/CheckBox';
import NotCompleteIcon from '@mui/icons-material/CheckBoxOutlineBlank';
import usePassageDetailContext from '../../../context/usePassageDetailContext';
import { IPassageDetailStepCompleteStrings } from '../../../model';
Expand Down Expand Up @@ -78,37 +78,43 @@ export default function MobileStepComplete() {
if (isBoldWorkflow) return null;

return (
<Box
<Button
id="mobile-complete"
size="small"
title={t.title}
onClick={handleToggleComplete}
disabled={
!hasPermission || view !== '' || recording || busy || importexportBusy
}
startIcon={
complete ? (
<CompleteIcon
id="step-yes"
fontSize="small"
sx={{ color: 'black' }}
/>
) : (
<NotCompleteIcon id="step-no" fontSize="small" />
)
}
sx={{
display: 'flex',
alignItems: 'center',
gap: 0.25,
minHeight: 0,
flexShrink: 0,
minWidth: 0,
maxWidth: '100%',
}}
>
<IconButton
id="mobile-complete"
size="small"
title={t.title}
onClick={handleToggleComplete}
disabled={
!hasPermission || view !== '' || recording || busy || importexportBusy
}
>
{complete ? (
<CompleteIcon id="step-yes" fontSize="small" />
) : (
<NotCompleteIcon id="step-no" fontSize="small" />
)}
</IconButton>
<Typography
variant="body2"
sx={{ lineHeight: 1.2, whiteSpace: 'nowrap' }}
<Box
component="span"
sx={{
display: 'block',
minWidth: 0,
maxWidth: '100%',
overflow: 'hidden',
textOverflow: 'ellipsis',
whiteSpace: 'nowrap',
}}
>
{t.title}
</Typography>
</Box>
</Box>
</Button>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@ import {
DialogActions,
DialogContent,
DialogTitle,
IconButton,
Menu,
MenuItem,
Typography,
useTheme,
} from '@mui/material';
import InfoIcon from '@mui/icons-material/Info';
import ArrowDropDownIcon from '@mui/icons-material/ArrowDropDown';
Expand Down Expand Up @@ -58,7 +56,6 @@ export default function MobileWorkflowSteps() {
const getGlobal = useGetGlobal();
const { showMessage } = useSnackBar();
const ts = useSelector(sharedSelector, shallowEqual);
const theme = useTheme();
const getWfLabel = useWfLabel();
const { getOrgDefault } = useOrgDefaults();
const isStepProgression =
Expand Down Expand Up @@ -210,23 +207,25 @@ export default function MobileWorkflowSteps() {
alignItems: 'center',
}}
>
{!isStepProgression && currentTip && (
<IconButton
size="small"
onClick={() => setTipOpen(true)}
data-cy="workflow-step-tip"
aria-label={currentTip}
color="info"
>
<InfoIcon fontSize="small" />
</IconButton>
)}
<Button
size="small"
startIcon={
!isStepProgression && currentTip ? (
<InfoIcon
sx={{ color: 'primary.light' }}
fontSize="small"
data-cy="workflow-step-tip"
aria-label={currentTip}
onClick={(e) => {
e.stopPropagation();
setTipOpen(true);
}}
/>
) : undefined
}
endIcon={hasMultipleOptions ? <ArrowDropDownIcon /> : undefined}
sx={{
minWidth: 'auto',
textTransform: 'none',
// These per-breakpoint widths are fine-tuned to constrain the dropdown so
// its label truncates before it can overlap the parallelograms
maxWidth: { xs: '45vw', md: '20vw', lg: '25vw' },
Expand Down Expand Up @@ -318,10 +317,10 @@ export default function MobileWorkflowSteps() {
>
{steps.map((step) => {
const color = step.isCurrent
? theme.palette.grey[700]
? '#111'
: step.isComplete
? theme.palette.grey[400]
: theme.palette.grey[200];
? '#888'
: '#ccc';
return (
<Box
key={step.id}
Expand Down Expand Up @@ -366,7 +365,7 @@ export default function MobileWorkflowSteps() {
aria-label={currentTip}
>
{getWfLabel(currentLabel) + '\u00A0'}
<InfoIcon color="info" fontSize="small" />
<InfoIcon sx={{ color: 'primary.light' }} fontSize="small" />
</ButtonBase>
) : (
getWfLabel(currentLabel)
Expand Down
Loading
Loading