Skip to content

feat: improve icon layout in Section using float-based positioning#1852

Open
dede999 wants to merge 1 commit intokernelci:mainfrom
profusion:feat/move-status-icon
Open

feat: improve icon layout in Section using float-based positioning#1852
dede999 wants to merge 1 commit intokernelci:mainfrom
profusion:feat/move-status-icon

Conversation

@dede999
Copy link
Copy Markdown
Contributor

@dede999 dede999 commented Apr 13, 2026

Summary

  • Replaced the flexbox row layout in the Section header with a float-based approach to better handle icon and title positioning.
  • leftIcon is now rendered as a float-left element with explicit sizing (h-12 w-12), allowing the title text to wrap naturally beside it.
  • rightIcon is now rendered as float-right before the title in the DOM, ensuring it anchors to the right edge correctly.
  • The container uses overflow-hidden to contain the floated elements.

Motivation

The previous flex layout caused alignment issues when the icon and title needed to behave more like an inline/text-flow layout. Float-based positioning gives more predictable results for icon+title combinations, especially
when the title text wraps across multiple lines.

Test plan

  • Verify Section renders correctly on hardware build details

Related issue

Closes #1433

@dede999
Copy link
Copy Markdown
Contributor Author

dede999 commented Apr 13, 2026

As it's easy to see, when the title is shorter the icon and the text are not aligned with each other, both text and icons are attached to the top of the div

image image image -------

After diminishing the icon size
image

image

@dede999 dede999 force-pushed the feat/move-status-icon branch from b241180 to 47134a6 Compare April 13, 2026 18:42
@MarceloRobert MarceloRobert added the Frontend Most or all of the changes for this issue will be in the frontend code. label Apr 13, 2026
{leftIcon}
</span>
)}
{rightIcon && <span className="float-right">{rightIcon}</span>}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the rightIcon doesn't need to float-right, if I see it correctly it's only used in the testDetails statusHistory section, in which case it looks weird after the change (too far apart)

Image

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestions. I have applied them all

@dede999 dede999 force-pushed the feat/move-status-icon branch from 47134a6 to b118db1 Compare April 14, 2026 19:19
{leftIcon}
</span>
)}
{rightIcon && <span>{rightIcon}</span>}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the rightIcon should be reverted to its place

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Frontend Most or all of the changes for this issue will be in the frontend code.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move title status icon on details pages

2 participants