Skip to content

fix: [data-view] label every tick at exact spacing boundaries - #1009

Closed
Shreyag02 wants to merge 1 commit into
mainfrom
fix/timeline-label-thinning-boundary
Closed

Shreyag02 wants to merge 1 commit into
mainfrom
fix/timeline-label-thinning-boundary

Conversation

@Shreyag02

Copy link
Copy Markdown
Contributor

Summary

  • buildAxis subtracts a small epsilon before taking the ceiling of label floor / unit width. Dividing the unit width by scaling can leave a value a hair under an exact multiple (29.4 / 1.05 = 27.999999999999996), which thinned the axis one step too far and dropped tick labels.

  • Adds tests for widths on exact spacing boundaries.

  • I have followed the pull request section of the contributing guide.

buildAxis takes the ceiling of the label floor over the unit width. The
call site divides the unit width by scaling, so a width on an exact
multiple of the floor can land a hair under it (29.4 / 1.05 =
27.999999999999996) and thin one step too far. Subtract a small epsilon
before the ceiling.
@vercel

vercel Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
apsara Ready Ready Preview Nov 16, 2026 5:45am UTC

@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 36 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2bdf5c45-ab68-48df-9b69-2e40c8212d88
Commits

Reviewing files that changed from the base of the PR and between 5e6859b and 4359c51.

Files selected for processing: 2

  • packages/react/components/data-view/__tests__/timeline.test.tsx
  • packages/react/components/data-view/utils/time-scale.tsx
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@pkg-pr-new

pkg-pr-new Bot commented Nov 16, 2026

Copy link
Copy Markdown

Open in StackBlitz

pnpm add https://pkg.pr.new/@raystack/apsara@1009

commit: 4359c51

@Shreyag02

Copy link
Copy Markdown
Contributor Author

Closed. This change is in #1008.

@Shreyag02 Shreyag02 closed this Nov 16, 2026
@Shreyag02
Shreyag02 removed this pull request from stack #1010 November 16, 2026 05:53
@Shreyag02
Shreyag02 deleted the fix/timeline-label-thinning-boundary branch November 16, 2026 05:57

This branch was successfully deployed

1 active deployment
Preview — 4359c510 Deployed Nov 16, 2026 by vercel[bot]
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