Skip to content

fix: Ai suggestions div height - #334

Merged
lixun910 merged 1 commit into
mainfrom
xli-fix-suggestions-css
Feb 2, 2026
Merged

lixun910 merged 1 commit into
mainfrom
xli-fix-suggestions-css

Conversation

@lixun910

@lixun910 lixun910 commented Feb 2, 2026 •

Copy link
Copy Markdown
Collaborator

There is an unnecessary h-20 style for the "Prompt suggestions" container:

We already have

  if (!isVisible) {
    return null;
  }
Screenshot 2026-02-02 at 11 22 37 AM

Summary by CodeRabbit

  • Style

    • Refined positioning and spacing consistency across prompt suggestion components.
    • Enhanced visual uniformity through improved sizing constraints.
    • Optimized utility class arrangement for better layout structure.
  • Refactor

    • Simplified container layout logic while maintaining visibility controls.

@lixun910
lixun910 requested review from Copilot and ilyabo February 2, 2026 18:24

@greptile-apps greptile-apps 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.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@coderabbitai

coderabbitai Bot commented Feb 2, 2026 •

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

A single React component file was modified to remove conditional height toggling from the container, reorder CSS utility classes for positioning consistency, and ensure uniform maximum width constraints across loading and non-loading prompt item states.

Changes

Cohort / File(s) Summary
PromptSuggestions Component Styling
packages/ai-core/src/components/PromptSuggestions.tsx
Removed conditional height toggling on outer container, reordered positioning and padding utility classes for consistency, adjusted icon span positioning (left-2/top-3 to top-3/left-2), and added max-w-48 to loading placeholder buttons. No functional behavior changes to scrolling, tooltips, or interactions.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A shuffle of styles, a dance most fine,
CSS classes in perfect line,
Heights and paddings, all realigned,
The rabbit hops—consistency defined! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: removing unnecessary height styling from the prompt suggestions container.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch xli-fix-suggestions-css

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.

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 removes an unnecessary fixed height (h-20) from the PromptSuggestions container component. Since the component already returns null when not visible (lines 81-83), the conditional height classes isVisible ? 'h-20' : 'h-0' were redundant and have been correctly removed.

Changes:

  • Removed conditional height styling from the PromptSuggestions container
  • Applied prettier-plugin-tailwindcss automatic formatting to reorder CSS classes

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

@lixun910
lixun910 merged commit 24c2909 into main Feb 2, 2026
10 checks passed
@lixun910
lixun910 deleted the xli-fix-suggestions-css branch February 2, 2026 21:00
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.

3 participants