-
Notifications
You must be signed in to change notification settings - Fork 5k
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
chore: updating header to use heading sm #29308
base: main
Are you sure you want to change the base?
Conversation
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
<p | ||
class="mm-box mm-text mm-text--body-md-bold mm-text--ellipsis mm-text--text-align-center mm-box--padding-inline-start-8 mm-box--padding-inline-end-8 mm-box--display-block mm-box--color-text-default" | ||
<h2 | ||
class="mm-box mm-text mm-text--heading-sm mm-text--ellipsis mm-text--text-align-center mm-box--padding-inline-start-8 mm-box--padding-inline-end-8 mm-box--display-block mm-box--color-text-default" | ||
/> |
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.
Add logic to remove the Text component if children
is not present
Builds ready [006e636]
Page Load Metrics (1543 ± 90 ms)
Bundle size diffs
|
Builds ready [3392e3d]
Page Load Metrics (1472 ± 21 ms)
Bundle size diffs
|
3392e3d
to
13f395b
Compare
<div | ||
class="mm-box" | ||
> | ||
<p | ||
class="mm-box mm-text mm-text--body-md-bold mm-text--ellipsis mm-text--text-align-center mm-box--padding-inline-start-8 mm-box--padding-inline-end-8 mm-box--display-block mm-box--color-text-default" | ||
/> | ||
</div> |
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.
as="h6" | ||
variant={TextVariant.bodyMdMedium} | ||
> | ||
<Text onClick={toggleExpanded} variant={TextVariant.bodyMdMedium}> |
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.
Removes incorrect h6 tag
{children && ( | ||
<Text | ||
as="h2" | ||
display={Display.Block} | ||
variant={TextVariant.headingSm} | ||
textAlign={TextAlign.Center} | ||
paddingInlineStart={8} | ||
paddingInlineEnd={8} | ||
ellipsis | ||
{...textProps} | ||
> | ||
{children} | ||
</Text> | ||
)} |
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.
Adding logic to only render the h2 tag if children exist see ui/components/app/assets/nfts/nft-details/snapshots/nft-full-image.test.js.snap
Builds ready [13f395b]
Page Load Metrics (1597 ± 38 ms)
|
@@ -29,15 +29,11 @@ exports[`All Connections render renders correctly 1`] = ` | |||
<div | |||
class="mm-box" | |||
> | |||
<p | |||
class="mm-box mm-text mm-text--body-md-bold mm-text--ellipsis mm-text--text-align-center mm-box--padding-inline-start-8 mm-box--padding-inline-end-8 mm-box--display-block mm-box--color-text-default" | |||
<h2 |
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.
Updating to use heading sm and more correct semantic html
<Text | ||
as="span" | ||
variant={TextVariant.headingMd} | ||
textAlign={TextAlign.Center} | ||
> | ||
{t('permissions')} | ||
</Text> |
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.
Removing extra html element to reduce html bloat and to maintain heading consistency
@@ -28,11 +28,11 @@ exports[`SendPage render and initialization should render correctly even when a | |||
<div | |||
class="mm-box" | |||
> | |||
<h4 | |||
<h2 |
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.
Updating header tag
@@ -28,11 +28,11 @@ exports[`Bridge renders the component with initial props 1`] = ` | |||
<div | |||
class="mm-box" | |||
> | |||
<h4 | |||
<h2 |
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.
Updating header tag
Builds ready [8e748b5]
Page Load Metrics (1425 ± 22 ms)
|
Description
This PR updates the header component text styling to use semantic HTML and consistent heading styles. The changes include:
<p>
to<h2>
bodyMdBold
toheadingSm
Related issues
Partially fixes: #29306
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist