-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: text visibility issues in error page in dark mode #30408
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,10 @@ body { | |
|
||
html { | ||
min-height: 500px; | ||
} | ||
|
||
html, | ||
body { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Need to include after.body720.mov |
||
@include design-system.screen-sm-max { | ||
&:not([data-theme]) { | ||
background-color: var(--color-background-default); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -110,16 +110,27 @@ const ErrorPage: React.FC<ErrorPageProps> = ({ error }) => { | |
size={IconSize.Xl} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This page will be rendered outside of the theme provider so we need to ensure it works by changing all text components to inherit the text color from |
||
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} | ||
|
@@ -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> | ||
|
@@ -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> | ||
|
@@ -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 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes issue with
Textarea
component extending beyond containerBefore
After
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing !