Skip to content

EDM-3320: Improve alignment in Device table rows#628

Merged
celdrake merged 1 commit intoflightctl:mainfrom
celdrake:EDM-3320-better-device-table-alignment
May 5, 2026
Merged

EDM-3320: Improve alignment in Device table rows#628
celdrake merged 1 commit intoflightctl:mainfrom
celdrake:EDM-3320-better-device-table-alignment

Conversation

@celdrake
Copy link
Copy Markdown
Collaborator

@celdrake celdrake commented Apr 22, 2026

Simplified display to make all columns in EnrolledDevicesTable vertically aligned.
See screenshot with added guidelines to validate alignment is correct.

alignment-final

Summary by CodeRabbit

  • Style

    • Adjusted button spacing and inline presentation for help/row actions and copy controls.
  • Refactor

    • Standardized copy button to a consistent plain, inline appearance.
    • Enrollment approval now displays request name as plain text instead of a linked element.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 22, 2026

Warning

Rate limit exceeded

@celdrake has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 53 minutes before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e1fc925e-8167-4bb2-9f3e-65863d19b0c3

📥 Commits

Reviewing files that changed from the base of the PR and between 16bc404 and a7c9e0e.

📒 Files selected for processing (4)
  • libs/ui-components/src/components/Device/DeviceDetails/DeviceFleet.tsx
  • libs/ui-components/src/components/EnrollmentRequest/EnrollmentRequestTableRow.tsx
  • libs/ui-components/src/components/common/CopyButton.tsx
  • libs/ui-components/src/components/modals/ApproveDeviceModal/ApproveDeviceForm.tsx

Walkthrough

Apply consistent inline and padding styling to several PatternFly Buttons, remove the variant prop from CopyButton (making it always variant="plain" and isInline), and replace a ResourceLink with plain text for the enrollment request name.

Changes

Button Styling Updates

Layer / File(s) Summary
UI tweak
libs/ui-components/src/components/Device/DeviceDetails/DeviceFleet.tsx
Add style={{ paddingBlock: 0 }} to the question-mark Button inside the Popover.
UI tweak
libs/ui-components/src/components/EnrollmentRequest/EnrollmentRequestTableRow.tsx
Add isInline prop to the per-row “Approve” Button.

CopyButton Refactoring

Layer / File(s) Summary
Public API / Types
libs/ui-components/src/components/common/CopyButton.tsx
Remove variant from CopyButtonProps.
Implementation
libs/ui-components/src/components/common/CopyButton.tsx
Destructure only text and ariaLabel; remove ButtonProps import.
Rendering
libs/ui-components/src/components/common/CopyButton.tsx
Button now always renders with variant="plain", isInline, and style={{ paddingBlock: 0 }}.

ApproveDeviceForm Rendering

Layer / File(s) Summary
Imports
libs/ui-components/src/components/modals/ApproveDeviceModal/ApproveDeviceForm.tsx
Remove ResourceLink import.
UI change
libs/ui-components/src/components/modals/ApproveDeviceModal/ApproveDeviceForm.tsx
Render enrollmentRequest.metadata.name as plain text in the Name FormGroup instead of using ResourceLink.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the primary objective of the pull request—improving vertical alignment in device table rows through style refinements across multiple components.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (2)
libs/ui-components/src/components/Device/DeviceDetails/DeviceFleet.tsx (2)

25-25: Prefer a CSS class over inline style for consistency.

DeviceFleet.css is already imported for this component (line 14). Moving paddingBlock: 0 into a class there would keep styling concerns co-located and avoid scattering inline styles; same applies to the duplicated usage in CopyButton.tsx.

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

In `@libs/ui-components/src/components/Device/DeviceDetails/DeviceFleet.tsx` at
line 25, The inline style setting paddingBlock: 0 in the DeviceFleet JSX should
be replaced with a CSS class; add a descriptive class (e.g., .padding-block-0 or
.no-padding-block) to DeviceFleet.css, apply that class to the same element in
the DeviceFleet component (replace the style={{ paddingBlock: 0 }} usage), and
update the duplicated instance in the CopyButton component to use the same CSS
class so both components share the styling from DeviceFleet.css.

22-28: Consider applying the same padding tweak to MultipleDeviceOwners.

The sibling inline Button at lines 63–72 uses the same isInline + variant="plain" pattern but doesn't get paddingBlock: 0. If vertical alignment is the goal, both icon buttons likely need the same treatment to avoid subtle row-height drift when the multi-owner warning is present. If this was intentional (only the fleetless case needed the fix in practice), please ignore.

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

In `@libs/ui-components/src/components/Device/DeviceDetails/DeviceFleet.tsx`
around lines 22 - 28, The inline plain icon Button used inside the
MultipleDeviceOwners rendering should receive the same vertical padding tweak as
the other icon Button to keep row height consistent; locate the Button instance
inside the MultipleDeviceOwners block (the sibling to the first Button with
isInline and variant="plain") and add style={{ paddingBlock: 0 }} (or the
project's equivalent spacing prop) to that Button so both icon buttons share
identical vertical alignment.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@libs/ui-components/src/components/Device/DeviceDetails/DeviceFleet.tsx`:
- Line 25: The inline style setting paddingBlock: 0 in the DeviceFleet JSX
should be replaced with a CSS class; add a descriptive class (e.g.,
.padding-block-0 or .no-padding-block) to DeviceFleet.css, apply that class to
the same element in the DeviceFleet component (replace the style={{
paddingBlock: 0 }} usage), and update the duplicated instance in the CopyButton
component to use the same CSS class so both components share the styling from
DeviceFleet.css.
- Around line 22-28: The inline plain icon Button used inside the
MultipleDeviceOwners rendering should receive the same vertical padding tweak as
the other icon Button to keep row height consistent; locate the Button instance
inside the MultipleDeviceOwners block (the sibling to the first Button with
isInline and variant="plain") and add style={{ paddingBlock: 0 }} (or the
project's equivalent spacing prop) to that Button so both icon buttons share
identical vertical alignment.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4ea1238f-7a8c-4d54-8ec9-87d76fce996b

📥 Commits

Reviewing files that changed from the base of the PR and between fc240a7 and 752c3a7.

📒 Files selected for processing (4)
  • libs/ui-components/src/components/Device/DeviceDetails/DeviceFleet.tsx
  • libs/ui-components/src/components/EnrollmentRequest/EnrollmentRequestTableRow.tsx
  • libs/ui-components/src/components/common/CopyButton.tsx
  • libs/ui-components/src/components/modals/ApproveDeviceModal/ApproveDeviceForm.tsx

@celdrake celdrake force-pushed the EDM-3320-better-device-table-alignment branch from 752c3a7 to 16bc404 Compare May 5, 2026 11:05
@celdrake celdrake force-pushed the EDM-3320-better-device-table-alignment branch from 16bc404 to a7c9e0e Compare May 5, 2026 11:12
@celdrake celdrake merged commit 17eea14 into flightctl:main May 5, 2026
10 checks passed
@celdrake celdrake deleted the EDM-3320-better-device-table-alignment branch May 5, 2026 11:37
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.

2 participants