Skip to content

fix(desktop): prevent sidebar workspace item height changes on hover - #1056

Closed
Kitenite wants to merge 1 commit into
mainfrom
consistent-page-height-without-badge
Closed

Kitenite wants to merge 1 commit into
mainfrom
consistent-page-height-without-badge

Conversation

@Kitenite

@Kitenite Kitenite commented Jan 29, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Use consistent py-1.5 padding for all workspace items instead of conditional padding
  • Always render Row 2 with min-h-[18px] to reserve space for PR badge, preventing height shift when badge loads on hover
  • Change diff stats component to use opacity transitions and absolute positioning instead of hidden/display toggling to avoid content shift on hover

Test plan

  • Hover over workspace items in sidebar and verify no height/layout shift occurs
  • Verify PR badge appearing on hover doesn't cause height change
  • Verify diff stats transforming to X button on hover doesn't cause content shift

Summary by CodeRabbit

  • Style
    • Refined visual hover effects on workspace items with smooth fade transitions for diff stats and close button
    • Improved layout consistency by standardizing component alignment and ensuring fixed heights for git information display
    • Enhanced UI interactions to prevent layout shifts while maintaining responsive feedback during hover states

✏️ Tip: You can customize this high-level summary in your review settings.

Use consistent padding and always render Row 2 with min-height to
prevent layout shift when PR badge loads. Change diff stats to use
opacity transitions and absolute positioning instead of display
toggling to avoid content shift on hover.
@coderabbitai

coderabbitai Bot commented Jan 29, 2026 •

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

Two UI components in the WorkspaceSidebar are refined: WorkspaceDiffStats transitions its close button to an absolutely positioned overlay with opacity-based fade-in on hover, while WorkspaceListItem consolidates padding logic and ensures consistent Git info row height by always rendering it with conditional child visibility.

Changes

Cohort / File(s) Summary
Diff Stats Close Button Styling
apps/desktop/src/renderer/screens/main/components/WorkspaceSidebar/WorkspaceListItem/WorkspaceDiffStats.tsx
Replaces the close button's hidden/shown hover behavior with an absolutely positioned overlay using opacity transitions (0 to 100% on hover). Adjusts container alignment and reworks stats visibility to fade out via transition-opacity when onClose is provided, eliminating layout shifts.
Workspace List Item Layout
apps/desktop/src/renderer/screens/main/components/WorkspaceSidebar/WorkspaceListItem/WorkspaceListItem.tsx
Consolidates conditional padding into a single "py-1.5" class and refactors Git info row to render unconditionally with minimum height (min-h-[18px]) while conditionally rendering branch and PR badge children.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 A hoppy hop through hover states,
Close buttons fade with gentle traits,
Layouts align, no shifts or jitters,
Git rows dance—my whiskers twitter! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: preventing sidebar workspace item height changes on hover, which directly matches the core objective of the PR.
Description check ✅ Passed The PR description covers the key changes and includes a test plan, but lacks the full template structure with Related Issues, Type of Change, and Additional Notes sections.

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

✨ Finishing touches
  • 📝 Generate docstrings

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.

@Kitenite Kitenite closed this Jan 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ⚠️ Neon database branch
  • ⚠️ Electric Fly.io app

Thank you for your contribution! 🎉

@Kitenite
Kitenite deleted the consistent-page-height-without-badge branch January 29, 2026 20:40
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.

1 participant