Skip to content

fix: date range picker layout shift#416

Open
akash3444 wants to merge 1 commit intodatabuddy-analytics:mainfrom
akash3444:fix/date-range-picker
Open

fix: date range picker layout shift#416
akash3444 wants to merge 1 commit intodatabuddy-analytics:mainfrom
akash3444:fix/date-range-picker

Conversation

@akash3444
Copy link
Copy Markdown
Contributor

Description

Fixes date range picker layout shift

Before:

Screen.Recording.2026-04-22.at.8.55.42.PM.mov

After:

Screen.Recording.2026-04-22.at.8.54.59.PM.mov

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 22, 2026

@akash-moradiya is attempting to deploy a commit to the Databuddy OSS Team on Vercel.

A member of the Team first needs to authorize it.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 22, 2026

Greptile Summary

This PR fixes the date range picker layout shift by adding a disableAnchorTracking prop to the shared Popover.Content component and enabling it on the DateRangePicker. The prop is forwarded to BasePopover.Positioner, preventing it from recalculating position in response to anchor movement while the large calendar popup renders. The change is backwards-compatible — the new prop defaults to false, leaving all other popover usages unaffected.

Confidence Score: 5/5

Safe to merge — minimal, well-scoped fix with no side effects on other popover consumers.

Both changed files have clean, correct implementations. The new prop is optional, defaults to false, and is only enabled for the date range picker. No logic, auth, or data concerns are touched.

No files require special attention.

Important Files Changed

Filename Overview
apps/dashboard/components/ds/popover.tsx Adds optional disableAnchorTracking prop (default false) to Content, forwarded to BasePopover.Positioner — backwards-compatible and correctly typed.
apps/dashboard/components/date-range-picker.tsx Passes disableAnchorTracking to Popover.Content to prevent position recalculation during calendar render, fixing the layout shift.

Reviews (1): Last reviewed commit: "fix: date range picker layout shift" | Re-trigger Greptile

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 22, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 0b8df9bf-5492-4813-8e4e-94b65f52d957

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ 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.

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