Skip to content

Style fixes: label form, empty-state spacing, registration dark mode#45080

Open
lukeheath wants to merge 3 commits intomainfrom
style-fixes-44923
Open

Style fixes: label form, empty-state spacing, registration dark mode#45080
lukeheath wants to merge 3 commits intomainfrom
style-fixes-44923

Conversation

@lukeheath
Copy link
Copy Markdown
Member

@lukeheath lukeheath commented May 8, 2026

For #44923

Summary

  • Moved the "Save" button to the left of "Cancel" on the Add/edit label page.
  • Hid the empty filter row that sat above the empty state on the Reports and Policies pages by passing disableTableHeader={!searchable} when there are no results, no search, and no active filters. The empty state now sits closer to the page header.
  • Cleaned up dark-mode styling on the initial Fleet setup page: active breadcrumb gradient, input field hover/active black borders, and confirmation table row backgrounds.

Test plan

  • Open Add/edit label: confirm "Save" is on the left, "Cancel" on the right.
  • On a fleet with no reports, visit Reports: confirm the empty state sits directly below the subtitle without an empty row above it.
  • Add a report and visit Reports: confirm the count + filter + search row still renders normally.
  • Same checks for Policies (empty vs populated).
  • Walk through initial Fleet setup in dark mode: confirm breadcrumb active step, input field hover/active states, and confirmation table no longer have black boxes.

Summary by CodeRabbit

Release Notes

  • Style

    • Enhanced dark mode styling for table display
    • Removed hover and active visual effects from input fields
    • Removed gradient styling from breadcrumb navigation
    • Improved button layout in label creation form
  • Updates

    • Table headers now conditionally display based on search functionality availability in policies and queries pages

Copilot AI review requested due to automatic review settings May 8, 2026 21:22
@lukeheath lukeheath requested a review from a team as a code owner May 8, 2026 21:22
Copy link
Copy Markdown

@claude claude Bot left a comment

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.

Comment on lines +104 to +106
body.dark-mode .confirm-user-reg__table tbody tr {
background-color: transparent;
}
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.

This fixes the different color background behind the text on the final step of the setup flow.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 8, 2026

Review Change Stack

Walkthrough

This PR implements style fixes across the Fleet UI by reordering buttons on the label form so the Save button appears first, conditionally hiding table headers when tables are not searchable, removing decorative breadcrumb gradient connectors, removing input field hover and active styling overrides, and making confirmation table rows transparent in dark mode.

Possibly related PRs

  • fleetdm/fleet#45039: Modifies table header and empty state rendering behavior in TableContainer, which works in conjunction with the disableTableHeader prop additions in PoliciesTable and QueriesTable.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Style fixes: label form, empty-state spacing, registration dark mode' accurately summarizes the three main style improvements in the changeset.
Linked Issues check ✅ Passed All code changes implement the requirements from issue #44923: button reordering on label form, disabling empty table headers for empty states spacing, and dark-mode styling fixes.
Out of Scope Changes check ✅ Passed All changes are directly related to issue #44923; no out-of-scope modifications are present in the files altered.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The PR description provides a clear summary of changes, test plan, and maps to the related issue #44923, though it lacks the formal template structure with explicit checkboxes.

✏️ 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 style-fixes-44923

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.

color: $ui-fleet-black-50;
}

&:hover:not(.input-field--read-only) {
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.

Not tracked in the issue yet, but this is a new bug I noticed where input fields were staying highlighted when tabbing through them.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

UI styling tweaks to improve consistency across label management, empty-state spacing on Reports/Policies tables, and dark-mode visuals during initial Fleet setup/registration (per #44923).

Changes:

  • Reordered Add/edit label form actions so “Save” precedes “Cancel”.
  • Removed the empty table header row above empty states on Reports and Policies by conditionally disabling the TableContainer header.
  • Adjusted registration dark-mode styling (breadcrumbs + confirmation table) and updated shared InputField interaction styles.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
frontend/pages/RegistrationPage/Breadcrumbs/_styles.scss Removes active breadcrumb connector gradient styling to improve registration dark-mode appearance.
frontend/pages/queries/ManageQueriesPage/components/QueriesTable/QueriesTable.tsx Disables TableContainer header when the Reports table is not searchable (tightens empty-state spacing).
frontend/pages/policies/ManagePoliciesPage/components/PoliciesTable/PoliciesTable.tsx Disables TableContainer header when the Policies table is not searchable (tightens empty-state spacing).
frontend/pages/labels/components/LabelForm/LabelForm.tsx Reorders buttons so “Save” appears before “Cancel”.
frontend/components/forms/RegistrationForm/ConfirmationPage/_styles.scss Makes confirmation table rows transparent in dark mode.
frontend/components/forms/fields/InputField/_styles.scss Removes global hover/active input border styling (leaving focus styles).
changes/44923-style-fixes Adds changelog entry for the UI style fixes.
Comments suppressed due to low confidence (1)

frontend/components/forms/fields/InputField/_styles.scss:23

  • Removing the hover/active border styles from the shared .input-field affects InputField visuals across the entire UI (not just the registration flow in dark mode). If the goal is to address dark-mode styling on the initial setup pages, consider scoping this change to body.dark-mode and/or the registration page container, or updating the hover/active colors for dark mode rather than removing the interaction states globally.
  &:focus:not(.input-field--read-only),
  &:focus-visible:not(.input-field--read-only) {
    box-shadow: none;
    outline: 0;
    border: 1px solid $ui-fleet-black-75-down;

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

Comment on lines +186 to +188
<Button onClick={onCancel} variant="inverse">
Cancel
</Button>
Copy link
Copy Markdown
Member Author

@lukeheath lukeheath May 8, 2026

Choose a reason for hiding this comment

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

Move "Save" button to left on the label form.

Comment on lines +609 to +617
<Button
onClick={() => {
router.goBack();
}}
variant="inverse"
disabled={isUpdating}
>
Cancel
</Button>
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.

Two places where save button is rendered.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.78%. Comparing base (0ce19b4) to head (0e50cfc).
⚠️ Report is 16 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #45080      +/-   ##
==========================================
+ Coverage   66.77%   66.78%   +0.01%     
==========================================
  Files        2718     2718              
  Lines      218795   218781      -14     
  Branches    10588    10583       -5     
==========================================
+ Hits       146100   146114      +14     
+ Misses      59532    59504      -28     
  Partials    13163    13163              
Flag Coverage Δ
frontend 55.31% <ø> (+0.07%) ⬆️

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.

onQueryChange={onQueryChange}
inputPlaceHolder="Search by name"
searchable={searchable}
disableTableHeader={!searchable}
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.

This is an existing prop on the TableContainer component that hides and shows the area that was causing the extra space when empty. searchable is TRUE when there are results, so we can take the opposite of that to determine when to hide/show the header area.

Comment on lines -68 to -75
&::before {
background: linear-gradient(
to right,
$ui-fleet-black-75 50%,
$ui-fleet-black-25 50%
);
}

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.

I noticed that the progress indicator at the top was filling halfway during the steps, which looked weird. I updated it so that the entire line area is filled. Will add to isuse.

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.

4 participants