Skip to content

Commit

Permalink
fix: text visibility issues in error page in dark mode
Browse files Browse the repository at this point in the history
  • Loading branch information
georgewrmarshall committed Feb 18, 2025
1 parent 7d050e1 commit ed2034e
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 4 deletions.
2 changes: 2 additions & 0 deletions ui/components/component-library/textarea/textarea.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
.mm-textarea {
$resize: none, both, horizontal, vertical, initial, inherit;

max-width: 100%;

&--is-disabled,
&:disabled {
opacity: var(--opacity-disabled);
Expand Down
3 changes: 3 additions & 0 deletions ui/css/base-styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ body {

html {
min-height: 500px;
}

html,
body {
@include design-system.screen-sm-max {
&:not([data-theme]) {
background-color: var(--color-background-default);
Expand Down
26 changes: 22 additions & 4 deletions ui/pages/error-page/error-page.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,16 +110,27 @@ const ErrorPage: React.FC<ErrorPageProps> = ({ error }) => {
size={IconSize.Xl}
color={IconColor.warningDefault}
/>
<Text variant={TextVariant.headingMd} marginBottom={4}>
<Text
color={TextColor.inherit}
variant={TextVariant.headingMd}
marginBottom={4}
>
{t('errorPageTitle')}
</Text>
</Box>

<div className="error-page__banner-wrapper">
<BannerAlert marginBottom={4}>{t('errorPageInfo')}</BannerAlert>
<BannerAlert
childrenWrapperProps={{ color: TextColor.inherit }}
marginBottom={4}
>
{t('errorPageInfo')}
</BannerAlert>
</div>

<Text variant={TextVariant.bodyMd}>{t('errorPageMessageTitle')}</Text>
<Text color={TextColor.inherit} variant={TextVariant.bodyMd}>
{t('errorPageMessageTitle')}
</Text>

<Box
borderRadius={BorderRadius.LG}
Expand All @@ -136,6 +147,7 @@ const ErrorPage: React.FC<ErrorPageProps> = ({ error }) => {
variant={TextVariant.bodyXs}
marginBottom={2}
data-testid="error-page-error-message"
color={TextColor.inherit}
>
{t('errorMessage', [error.message])}
</Text>
Expand All @@ -145,6 +157,7 @@ const ErrorPage: React.FC<ErrorPageProps> = ({ error }) => {
variant={TextVariant.bodyXs}
marginBottom={2}
data-testid="error-page-error-code"
color={TextColor.inherit}
>
{t('errorCode', [error.code])}
</Text>
Expand All @@ -154,13 +167,18 @@ const ErrorPage: React.FC<ErrorPageProps> = ({ error }) => {
variant={TextVariant.bodyXs}
marginBottom={2}
data-testid="error-page-error-name"
color={TextColor.inherit}
>
{t('errorName', [error.name])}
</Text>
) : null}
{error.stack ? (
<>
<Text variant={TextVariant.bodyXs} marginBottom={2}>
<Text
color={TextColor.inherit}
variant={TextVariant.bodyXs}
marginBottom={2}
>
{t('errorStack')}
</Text>
<pre
Expand Down

0 comments on commit ed2034e

Please sign in to comment.