Skip to content

Commit e61af59

Browse files
JudyLipinskiclaudenetomi
authored
fix: make error dialog link visible on white background (#1712)
* fix: make error dialog link visible on white background ErrorLink was using `theme.palette.primary.contrastText` (white), which is invisible on the dialog's white background. Changed to `theme.palette.primary.main` so the link is visible. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Judy Lipinski <judy@karmoxie.com> * use error color from theme * add changelog entry --------- Signed-off-by: Judy Lipinski <judy@karmoxie.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: Thomas Neidhart <thomas.neidhart@eclipse-foundation.org>
1 parent d14035d commit e61af59

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

webui/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ This change log covers only the frontend library (webui) of Open VSX.
1818

1919
- Check `Retry-After` http header when receiving `429` responses from the server ([#1637](https://github.com/eclipse/openvsx/pull/1637))
2020
- Menu items link clicks now capture the whole menu item area ([#1598](https://github.com/eclipse/openvsx/pull/1598))
21+
- Fix color of error links in `ErrorDialog` to make them visible ([#1712](https://github.com/eclipse/openvsx/pull/1712))
2122

2223
### Dependencies
2324

webui/src/components/error-dialog.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,13 @@
88
* SPDX-License-Identifier: EPL-2.0
99
********************************************************************************/
1010

11-
import { FunctionComponent, ReactNode, useContext, useEffect } from 'react';
11+
import { FunctionComponent, ReactNode, useEffect } from 'react';
1212
import { Dialog, DialogTitle, DialogContent, Button, DialogContentText, DialogActions, Box, Link } from '@mui/material';
13-
import { MainContext } from '../context';
1413
import { styled, Theme } from '@mui/material/styles';
1514

1615
const ErrorLink = styled(Link)(({ theme }: { theme: Theme }) => ({
1716
textDecoration: 'underline',
18-
color: theme.palette.primary.contrastText
17+
color: theme.palette.primary.main
1918
}));
2019

2120
export const ErrorDialog: FunctionComponent<ErrorDialogProps> = props => {
@@ -62,14 +61,13 @@ export const ErrorDialog: FunctionComponent<ErrorDialogProps> = props => {
6261
}
6362
};
6463

65-
const context = useContext(MainContext);
6664
const codeContent = getContentForCode();
6765
return <Dialog
6866
open={props.isErrorDialogOpen}
6967
onClose={props.handleCloseDialog} >
7068
<DialogTitle>Error</DialogTitle>
7169
<DialogContent>
72-
<DialogContentText sx={{ color: context.pageSettings.themeType === 'dark' ? '#ff849e' : '#c54a64' }}>
70+
<DialogContentText sx={{ color: (theme) => theme.palette.error.main }}>
7371
{props.errorMessage}
7472
{
7573
codeContent ?

0 commit comments

Comments
 (0)