Skip to content

Fix custom host vital height on host details - #52588

Open
nulmete wants to merge 1 commit into
mainfrom
nulmete/custom-host-vital-height
Open

Fix custom host vital height on host details#52588
nulmete wants to merge 1 commit into
mainfrom
nulmete/custom-host-vital-height

Conversation

@nulmete

@nulmete nulmete commented Sep 4, 2026

Copy link
Copy Markdown
Member

Related issue: Resolves #51096

The pencil button in a custom host vital's label is taller than the label's line box, which stretched the row and left custom vitals misaligned against every other vital on the host details page.

Checklist for submitter

  • 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

Before

"Custom vital" and "zzzvital" misaligned

Screenshot 2026-09-04 at 1 39 12 PM

After

"Custom vital" and "zzzvital" now aligned

Screenshot 2026-09-04 at 1 40 36 PM

Frontend

  • Attached a screenshot or screen recording of each user-visible change. For changes to existing UI, show the before and after.

Summary by CodeRabbit

  • Bug Fixes
    • Fixed custom vitals on the host details page appearing taller than other vitals.
    • Improved alignment of the edit icon and custom vital titles within the vitals grid.

A custom vital's label embeds a small edit button whose 28px height
exceeds the label's line box, which stretched the DataSet and left the
vital misaligned against its neighbors in the grid. Cancel the button's
vertical padding so the row keeps the text's height while the button
keeps its full click target.
@nulmete
nulmete marked this pull request as ready for review September 4, 2026 16:47
@nulmete
nulmete requested a review from a team as a code owner September 4, 2026 16:47
Copilot AI lite review requested due to automatic review settings September 4, 2026 16:47

// Cancel the pencil icon's vertical padding to keep the custom vital aligned with the rest of the grid.
.button {
margin-block: -$pad-xsmall;

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

TIL about margin-block

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.

🟢 Approval recommended

The change is narrowly scoped to the custom vital title’s edit button styling and aligns with existing spacing patterns in this area without introducing behavioral risk.

Warning

  • Copilot's review of this pull request may be incomplete because some of the changed files are excluded by your Copilot content exclusion settings. See Excluding content from Copilot for details.
Pull request overview

This PR fixes a UI alignment issue on the Host details “Vitals” card where the edit (pencil) button next to a custom host vital label increased the label row height and caused misalignment versus standard vitals.

Changes:

  • Adjusted styling for the custom vital label/title wrapper to neutralize the pencil icon button’s vertical contribution to layout height.
File summaries
File Description
frontend/pages/hosts/details/cards/Vitals/_styles.scss Adds a scoped style tweak to keep the custom vital label row height consistent by applying negative block margins to the inline edit button.
Review details

Files excluded by content exclusion policy (1)

  • changes/51096-custom-host-vital-height
  • Files reviewed: 1/2 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: 6d777de5-93a1-436a-90f9-bd3ba6ca1f4d

📥 Commits

Reviewing files that changed from the base of the PR and between 2829b35 and 7496516.

📒 Files selected for processing (2)
  • changes/51096-custom-host-vital-height
  • frontend/pages/hosts/details/cards/Vitals/_styles.scss

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.


Walkthrough

Updated custom host vital title styling to cancel the pencil button’s vertical padding with a negative block margin. Added a changelog entry for the height alignment fix.

Merge Risk: ⚪ Minimal · up to 74965

Custom host vital labels now align with regular vital rows without reducing the edit button’s click target. No current merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The SCSS change directly addresses issue #51096 by removing excess vertical padding from the custom vital edit button so custom vitals match regular vital heights while preserving the button click tar…
Out of Scope Changes check ✅ Passed The changes are limited to the custom vital styling and its user-visible changelog entry. No unrelated code changes are present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Title check ✅ Passed The title clearly and concisely describes the primary change: fixing the height of custom host vitals on the host details page.
Description check ✅ Passed The description identifies the related issue, explains the bug and its impact, documents the user-visible change, confirms manual QA, and includes before-and-after screenshots.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch nulmete/custom-host-vital-height

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.

@codecov

codecov Bot commented Sep 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.79%. Comparing base (7a1227f) to head (7496516).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #52588   +/-   ##
=======================================
  Coverage   75.79%   75.79%           
=======================================
  Files        4097     4097           
  Lines      247480   247480           
  Branches    14105    14105           
=======================================
  Hits       187578   187578           
  Misses      59725    59725           
  Partials      177      177           
Flag Coverage Δ
frontend 67.70% <ø> (ø)

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

☔ View full report in Codecov by Harness.
📢 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.

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.

Custom host vitals are a different height than other host vitals

2 participants