Skip to content

fix(resource-menu): consistent height between 1 result and no results#4007

Merged
waleedlatif1 merged 1 commit intostagingfrom
fix/resource-menu
Apr 7, 2026
Merged

fix(resource-menu): consistent height between 1 result and no results#4007
waleedlatif1 merged 1 commit intostagingfrom
fix/resource-menu

Conversation

@waleedlatif1
Copy link
Copy Markdown
Collaborator

Summary

  • Fix height shift in resource menu search between 1 result and no results states
  • Match py-1.5 padding on the "No results" div to align with DropdownMenuItem padding

Type of Change

  • Bug fix

Testing

Tested manually

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 7, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Apr 7, 2026 3:49am

Request Review

@cursor
Copy link
Copy Markdown

cursor bot commented Apr 7, 2026

PR Summary

Low Risk
Low risk UI-only change that adjusts Tailwind padding classes in two dropdown components; no logic or data flow changes.

Overview
Fixes a visual height jump in resource search dropdowns by updating the "No results" row padding to match DropdownMenuItem (py-1.5 instead of py-[5px]) in both AddResourceDropdown and PlusMenuDropdown.

Reviewed by Cursor Bugbot for commit 26ebd55. Configure here.

@waleedlatif1 waleedlatif1 merged commit 8e11c32 into staging Apr 7, 2026
7 checks passed
@waleedlatif1 waleedlatif1 deleted the fix/resource-menu branch April 7, 2026 03:49
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 7, 2026

Greptile Summary

This PR fixes a subtle visual height inconsistency in the resource menu's search state: when search results transition from one item to zero items, the container height was shifting by 2 px because the "No results" fallback div used py-[5px] (5 px) instead of py-1.5 (6 px) — matching the vertical padding that DropdownMenuItem applies internally (px-2 py-1.5).

  • Fixes add-resource-dropdown.tsx (line 219): py-[5px]py-1.5 on the "No results" div
  • Fixes plus-menu-dropdown.tsx (line 186): identical one-class change
  • No logic, data flow, or API surface changes — purely a padding alignment correction
  • Both occurrences of the pattern are addressed consistently across the two affected dropdown components

Confidence Score: 5/5

Safe to merge — minimal one-class CSS fix with no logic changes.

Both changed lines are isolated Tailwind class corrections that align the 'No results' div height with DropdownMenuItem. No functional behavior, data handling, or API changes. No issues were introduced by this PR.

No files require special attention.

Important Files Changed

Filename Overview
apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/add-resource-dropdown/add-resource-dropdown.tsx Changed 'No results' div padding from py-[5px] to py-1.5 to match DropdownMenuItem's py-1.5, eliminating the height shift between 1-result and 0-results states.
apps/sim/app/workspace/[workspaceId]/home/components/user-input/components/plus-menu-dropdown.tsx Same py-[5px] → py-1.5 fix applied to the 'No results' fallback div to maintain consistent dropdown height across search states.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[User types in search input] --> B{search query empty?}
    B -- Yes --> C[Show category sub-menus]
    B -- No --> D{filtered results count}
    D -- greater than 0 --> E[Render DropdownMenuItems\npadding: px-2 py-1.5]
    D -- equals 0 --> F[Render 'No results' div\npadding: px-2 py-1.5\n✅ now matches item height]
    F -. before fix .-> G[py-5px caused\n2px height jump]
Loading

Reviews (1): Last reviewed commit: "fix(resource-menu): consistent height be..." | Re-trigger Greptile

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