Skip to content

Fleet UI: Fix dataset text alignment - #44659

Merged
RachelElysia merged 8 commits into
mainfrom
43688-text-alignment
May 5, 2026
Merged

Fleet UI: Fix dataset text alignment#44659
RachelElysia merged 8 commits into
mainfrom
43688-text-alignment

Conversation

@RachelElysia

@RachelElysia RachelElysia commented May 4, 2026

Copy link
Copy Markdown
Member

Issue

Closes #43688

Summary by CodeRabbit

  • Bug Fixes

    • Fixed subtle text alignment inconsistencies across data displays and tooltip-bearing elements for more consistent baseline alignment.
  • Style

    • Standardized line-height across components using a shared design token for improved typographic consistency.
    • Refined tooltip underline spacing and related text rendering for more accurate visual alignment.

Screenrecording and screenshots

Chrome screen recording

https://fleetdm.zoom.us/clips/share/qr3cY0NHTGuYqCX-vHWY3w

Safari screenshots

Screenshot 2026-05-04 at 12 08 41 PM Screenshot 2026-05-04 at 12 08 23 PM

Firefox screenshots

Screenshot 2026-05-04 at 12 03 38 PM Screenshot 2026-05-04 at 12 03 26 PM

Checklist for submitter

If some of the following don't apply, delete the relevant line.

  • Changes file added for user-visible changes in changes/, orbit/changes/ or ee/fleetd-chrome/changes.
    See Changes files for more information.

Testing

  • QA'd all new/changed functionality manually

Copilot AI review requested due to automatic review settings May 4, 2026 15:15
@RachelElysia
RachelElysia requested a review from a team as a code owner May 4, 2026 15:15

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.

Tip: disable this comment in your organization's Code Review settings.

@codecov

codecov Bot commented May 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.68%. Comparing base (2ee5404) to head (eb02f51).
⚠️ Report is 12 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff            @@
##             main   #44659    +/-   ##
========================================
  Coverage   66.68%   66.68%            
========================================
  Files        2651     2651            
  Lines      213493   213494     +1     
  Branches     9610     9732   +122     
========================================
+ Hits       142367   142368     +1     
+ Misses      58160    58159     -1     
- Partials    12966    12967     +1     
Flag Coverage Δ
frontend 54.22% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to resolve subtle text baseline/descender clipping and misalignment issues across the Fleet UI (notably on vulnerability pages) by standardizing line-height usage and improving baseline alignment for “dataset” rows and tooltip-underlined text.

Changes:

  • Introduces a textOnly option on DataSet to align values by text baseline when appropriate, and applies it in vulnerability and host/detail views.
  • Standardizes many component/page line-heights to use the shared $line-height token and removes several tooltip underline “position” overrides.
  • Updates tooltip underline rendering from border-bottom to text-decoration and removes the Firefox-only alignment hack.

Reviewed changes

Copilot reviewed 27 out of 28 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
frontend/styles/var/fonts.scss Intended to centralize $line-height, but currently introduces a self-referential Sass variable assignment.
frontend/styles/global/_global.scss Uses $line-height for body and paragraph defaults instead of hardcoded values.
frontend/pages/SoftwarePage/SoftwareVulnerabilityDetailsPage/SoftwareVulnSummary/SoftwareVulnSummary.tsx Applies textOnly to relevant DataSets and simplifies tooltip wrapper markup.
frontend/pages/SoftwarePage/SoftwareVulnerabilityDetailsPage/SoftwareVulnSummary/_styles.scss Removes fixed heights/tooltip tweaks and aligns the flex row on baseline; uses $line-height.
frontend/pages/SoftwarePage/components/cards/DetailsNoHosts/_styles.scss Switches line-height to $line-height.
frontend/pages/queries/ManageQueriesPage/_styles.scss Removes tooltip underline positioning override.
frontend/pages/queries/live/LiveQueryPage/_styles.scss Switches line-height to $line-height.
frontend/pages/queries/details/QueryDetailsPage/_styles.scss Removes tooltip underline positioning override.
frontend/pages/policies/live/LivePolicyPage/_styles.scss Switches line-height to $line-height.
frontend/pages/labels/components/LabelForm/_styles.scss Switches line-height to $line-height.
frontend/pages/hosts/ManageHostsPage/components/CustomLabelGroupHeading/_styles.scss Switches line-height to $line-height.
frontend/pages/hosts/details/HostReportsTab/HostReportCard.tsx Applies textOnly to DataSet values in the report card list.
frontend/pages/hosts/details/DeviceUserPage/components/SettingUpYourDevice/_styles.scss Switches line-height to $line-height.
frontend/pages/hosts/details/components/InventoryVersions/InventoryVersions.tsx Applies textOnly to multiple DataSets for baseline-aligned version metadata.
frontend/pages/DashboardPage/cards/ActivityFeed/components/ActivityTypeDropdown/_styles.scss Cleans whitespace and switches search input line-height to $line-height.
frontend/pages/admin/OrgSettingsPage/_styles.scss Switches banner line-height to $line-height.
frontend/components/TooltipWrapper/_styles.scss Uses inherited line-height; changes underline to text-decoration and removes Firefox-only hack.
frontend/components/side_panels/QuerySidePanel/QueryTableNotes/_styles.scss Switches list item line-height to $line-height.
frontend/components/side_panels/QuerySidePanel/QueryTableColumns/ColumnListItem/_styles.scss Removes redundant tooltip underline styling now handled by TooltipWrapper.
frontend/components/Modal/_styles.scss Switches modal content line-height to $line-height.
frontend/components/IconStatusMessage/_styles.scss Switches line-height to $line-height.
frontend/components/forms/fields/InputField/_styles.scss Switches input line-height to $line-height, but introduces an undefined $line-height7 usage.
frontend/components/EmptyState/_styles.scss Switches line-heights to $line-height.
frontend/components/DeviceUserError/_styles.scss Switches line-height to $line-height.
frontend/components/DataSet/DataSet.tsx Adds textOnly prop and corresponding modifier class.
frontend/components/DataSet/_styles.scss Aligns dataset titles by baseline and aligns text-only values by baseline.
frontend/components/buttons/Button/_styles.scss Uses $line-height for link-style button line-height.
changes/43688-fix-text-alignment-issues Adds changelog entry for the UI alignment fix.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread frontend/styles/var/fonts.scss Outdated
font-size: $x-small;
font-weight: $regular;
line-height: 1.57;
line-height: $line-height7;
@coderabbitai

coderabbitai Bot commented May 4, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

Adds a textOnly?: boolean prop to the DataSet component and applies the ${baseClass}--text-only CSS modifier when set. Multiple SCSS files were updated to replace hard-coded line-height values with the $line-height variable. .data-set dt gains align-items: baseline and a .data-set--text-only dd rule sets align-items: baseline. TooltipWrapper underline and element styles were adjusted (including line-height: inherit and a margin-bottom tweak). The textOnly prop is passed into DataSet usages on vulnerability summary, host report card, and inventory versions pages.

Possibly related PRs

  • Fleet UI: Dark mode tweaks 1 #43422: Modifies TooltipWrapper/tooltip underline styling and related underline behavior, closely overlapping the tooltip underline and TooltipWrapper adjustments in this change.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Fleet UI: Fix dataset text alignment' directly and clearly describes the main change in the PR, which focuses on fixing text alignment issues in dataset components.
Linked Issues check ✅ Passed The PR comprehensively addresses issue #43688 by implementing text alignment fixes through baseline alignment adjustments, line-height standardization, and optional textOnly styling for dataset components.
Out of Scope Changes check ✅ Passed All code changes directly support the objective of fixing text alignment issues on vulnerability pages. The widespread line-height and alignment updates across SCSS files are consistent with achieving baseline alignment goals.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The PR description includes a closed issue reference and demonstrates thorough testing with multiple browser screenshots and video evidence, though some checklist sections were removed.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 43688-text-alignment

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
frontend/styles/global/_global.scss (1)

162-166: ⚠️ Potential issue | 🟠 Major

Remove the negative margin compensation for the tooltip underline, which is now unnecessary after switching to text-decoration.

The component__tooltip-wrapper__underline styling now uses text-decoration: underline dashed with text-underline-offset: 3px (in frontend/components/TooltipWrapper/_styles.scss), which does not add layout height. The compensation in the form field label styles (margin-top: -2.5px and padding-bottom: 0 at frontend/styles/global/_global.scss lines 163-166) was written to offset height added by border-bottom. Since text-decoration renders within the text box without affecting layout, this negative margin now pushes form-field labels up 2.5px unnecessarily and should be removed.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@frontend/styles/global/_global.scss` around lines 162 - 166, Update the
.component__tooltip-wrapper__underline rule to remove the layout compensation
that is no longer needed: delete the margin-top: -2.5px and padding-bottom: 0
declarations so the label is not nudged upward; this change targets the selector
.component__tooltip-wrapper__underline in frontend/styles/global/_global.scss
and aligns it with the text-decoration-based underline in
TooltipWrapper/_styles.scss (which uses text-decoration and
text-underline-offset).
frontend/pages/SoftwarePage/SoftwareVulnerabilityDetailsPage/SoftwareVulnSummary/_styles.scss (1)

20-29: ⚠️ Potential issue | 🟠 Major

display: flex is missing — all flex properties in this block are inert without it.

The &__description-list rule is missing display: flex, which is required for the flex-direction, gap, flex-wrap, and align-items properties to take effect. Without it, the element defaults to display: block, rendering flex properties as no-ops.

A similar component in the same codebase (SoftwareDetailsSummary/_styles.scss) has the identical selector with display: flex explicitly declared, confirming this is the intended behavior.

Add the missing property:

🛡️ Fix
  &__description-list {
+   display: flex;
    flex-direction: row;
    gap: 24px 40px;
    flex-wrap: wrap;
    align-items: baseline;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@frontend/pages/SoftwarePage/SoftwareVulnerabilityDetailsPage/SoftwareVulnSummary/_styles.scss`
around lines 20 - 29, The selector &__description-list is missing display: flex
so its flex properties (flex-direction, gap, flex-wrap, align-items) are inert;
update the SCSS by adding display: flex to the &__description-list rule
(preserving the existing .tooltip__tooltip-text white-space: pre-wrap) — mirror
the same declaration used in the similar SoftwareDetailsSummary/_styles.scss to
ensure consistent layout.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@frontend/components/forms/fields/InputField/_styles.scss`:
- Line 82: The SCSS uses an undefined variable $line-height7 causing build
failure; update the declaration in InputField styles to use the correct variable
$line-height (or replace with the intended numeric value 1.57 if a unique value
is required) so the selector that currently references $line-height7 compiles
successfully.

In `@frontend/styles/var/fonts.scss`:
- Line 13: The SCSS has a self-referential assignment "$line-height:
$line-height;" which breaks compilation; replace this with a concrete value or a
valid design token (e.g., "$line-height: 1.5;" or "$line-height:
$base-line-height;") so all components (buttons, modals, forms) that rely on
$line-height resolve correctly—update the variable definition where $line-height
is declared and ensure any referenced token like $base-line-height exists and is
exported.

---

Outside diff comments:
In
`@frontend/pages/SoftwarePage/SoftwareVulnerabilityDetailsPage/SoftwareVulnSummary/_styles.scss`:
- Around line 20-29: The selector &__description-list is missing display: flex
so its flex properties (flex-direction, gap, flex-wrap, align-items) are inert;
update the SCSS by adding display: flex to the &__description-list rule
(preserving the existing .tooltip__tooltip-text white-space: pre-wrap) — mirror
the same declaration used in the similar SoftwareDetailsSummary/_styles.scss to
ensure consistent layout.

In `@frontend/styles/global/_global.scss`:
- Around line 162-166: Update the .component__tooltip-wrapper__underline rule to
remove the layout compensation that is no longer needed: delete the margin-top:
-2.5px and padding-bottom: 0 declarations so the label is not nudged upward;
this change targets the selector .component__tooltip-wrapper__underline in
frontend/styles/global/_global.scss and aligns it with the text-decoration-based
underline in TooltipWrapper/_styles.scss (which uses text-decoration and
text-underline-offset).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 34a9dda9-549c-4d9b-9aab-23cc5cd3a09e

📥 Commits

Reviewing files that changed from the base of the PR and between fe71505 and 107c7af.

📒 Files selected for processing (28)
  • changes/43688-fix-text-alignment-issues
  • frontend/components/DataSet/DataSet.tsx
  • frontend/components/DataSet/_styles.scss
  • frontend/components/DeviceUserError/_styles.scss
  • frontend/components/EmptyState/_styles.scss
  • frontend/components/IconStatusMessage/_styles.scss
  • frontend/components/Modal/_styles.scss
  • frontend/components/TooltipWrapper/_styles.scss
  • frontend/components/buttons/Button/_styles.scss
  • frontend/components/forms/fields/InputField/_styles.scss
  • frontend/components/side_panels/QuerySidePanel/QueryTableColumns/ColumnListItem/_styles.scss
  • frontend/components/side_panels/QuerySidePanel/QueryTableNotes/_styles.scss
  • frontend/pages/DashboardPage/cards/ActivityFeed/components/ActivityTypeDropdown/_styles.scss
  • frontend/pages/SoftwarePage/SoftwareVulnerabilityDetailsPage/SoftwareVulnSummary/SoftwareVulnSummary.tsx
  • frontend/pages/SoftwarePage/SoftwareVulnerabilityDetailsPage/SoftwareVulnSummary/_styles.scss
  • frontend/pages/SoftwarePage/components/cards/DetailsNoHosts/_styles.scss
  • frontend/pages/admin/OrgSettingsPage/_styles.scss
  • frontend/pages/hosts/ManageHostsPage/components/CustomLabelGroupHeading/_styles.scss
  • frontend/pages/hosts/details/DeviceUserPage/components/SettingUpYourDevice/_styles.scss
  • frontend/pages/hosts/details/HostReportsTab/HostReportCard.tsx
  • frontend/pages/hosts/details/components/InventoryVersions/InventoryVersions.tsx
  • frontend/pages/labels/components/LabelForm/_styles.scss
  • frontend/pages/policies/live/LivePolicyPage/_styles.scss
  • frontend/pages/queries/ManageQueriesPage/_styles.scss
  • frontend/pages/queries/details/QueryDetailsPage/_styles.scss
  • frontend/pages/queries/live/LiveQueryPage/_styles.scss
  • frontend/styles/global/_global.scss
  • frontend/styles/var/fonts.scss
💤 Files with no reviewable changes (3)
  • frontend/pages/queries/ManageQueriesPage/_styles.scss
  • frontend/pages/queries/details/QueryDetailsPage/_styles.scss
  • frontend/components/side_panels/QuerySidePanel/QueryTableColumns/ColumnListItem/_styles.scss

Comment thread frontend/components/forms/fields/InputField/_styles.scss Outdated
Comment thread frontend/styles/var/fonts.scss Outdated
cdcme
cdcme previously approved these changes May 4, 2026
@RachelElysia
RachelElysia marked this pull request as draft May 4, 2026 16:02
@RachelElysia
RachelElysia requested a review from cdcme May 4, 2026 16:13
@RachelElysia
RachelElysia marked this pull request as ready for review May 4, 2026 16:15
@RachelElysia

Copy link
Copy Markdown
Member Author

@cdcme I had to revert the tooltip underline approach since your last review (Firefox couldn't render text-decoration: dashed), should be good now! I screenshot/screenrecorded 3 different browsers and it looks good.

@RachelElysia
RachelElysia merged commit 0448ac1 into main May 5, 2026
25 of 26 checks passed
@RachelElysia
RachelElysia deleted the 43688-text-alignment branch May 5, 2026 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Text issues in data sets (vulnerability page, host vitals)

3 participants