Skip to content

Conversation

@mtrezza
Copy link
Member

@mtrezza mtrezza commented Jan 23, 2026

Pull Request

Summary by CodeRabbit

  • New Features
    • Enhanced graph x-axis labels to intelligently display time information—showing times for periods up to 24 hours and dates for longer spans, automatically adapting to your browser's locale settings.

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

@parse-github-assistant
Copy link

parse-github-assistant bot commented Jan 23, 2026

🚀 Thanks for opening this pull request!

@parseplatformorg
Copy link
Contributor

parseplatformorg commented Jan 23, 2026

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@coderabbitai
Copy link

coderabbitai bot commented Jan 23, 2026

Warning

Rate limit exceeded

@mtrezza has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 27 minutes and 18 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📝 Walkthrough

Walkthrough

This pull request enhances x-axis date formatting for charts. A new helper function formats timestamps contextually (showing time for ≤24-hour spans, dates otherwise) using browser locale. GraphDataUtils computes dateAxisInfo metadata for date axes, and GraphPanel uses this to configure locale-aware tick labels.

Changes

Cohort / File(s) Summary
Date Axis Tick Formatting
src/components/GraphPanel/GraphPanel.react.js
Added formatDateTickLabel() helper to localize and format timestamps as either time (≤24 hours) or date. Integrated date-axis-aware tick configuration into chart x-axis options with callback-based formatting using dateAxisInfo.
Date Axis Detection & Metadata
src/lib/GraphDataUtils.js
Extended processBarLineData() return value with new dateAxisInfo field containing isDateAxis, timespanHours, and rawXValues for date-based x-axes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • #3127: Modifies processBarLineData() to accept calculated values in GraphDataUtils, directly affects the same data processing function enhanced here.
  • #3111: Adjusts x-axis date label formatting for graph panels, addressing date formatting concerns similar to this PR's locale-aware tick labeling.
🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning The description is largely incomplete, missing the required 'Issue', 'Approach', and 'Tasks' sections from the template. Complete the description by adding: the issue link (Closes: ...), detailed explanation of changes in the 'Approach' section, and mark applicable tasks (tests, documentation updates).
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: optimizing graph tick label appearance on the x-axis for date values, which matches the implementation adding date-aware formatting.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

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

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

@mtrezza mtrezza changed the title fix: Graph tick labels on x-axis take too much space for date values feat: Optimize appearance of graph tick labels on x-axis for date values Jan 23, 2026
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@src/components/GraphPanel/GraphPanel.react.js`:
- Around line 369-377: The tick callback currently uses the rendered-tick
position (`index`) to look up timestamps, which breaks when Chart.js auto-skips
ticks; update xAxisTicks.callback in GraphPanel.react.js to use the `value`
parameter as the index into dateAxisInfo.rawXValues (i.e., const timestamp =
dateAxisInfo.rawXValues[value]) and keep the fallback to
this.getLabelForValue(value) when timestamp is undefined; ensure this change is
applied inside the dateAxisInfo?.isDateAxis branch that calls
formatDateTickLabel.

@mtrezza mtrezza merged commit a9edcaf into parse-community:alpha Jan 23, 2026
12 checks passed
@mtrezza mtrezza deleted the fix/date-tick-labels branch January 23, 2026 19:54
parseplatformorg pushed a commit that referenced this pull request Jan 23, 2026
# [8.3.0-alpha.28](8.3.0-alpha.27...8.3.0-alpha.28) (2026-01-23)

### Features

* Optimize appearance of graph tick labels on x-axis for date values ([#3147](#3147)) ([a9edcaf](a9edcaf))
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 8.3.0-alpha.28

@parseplatformorg parseplatformorg added the state:released-alpha Released as alpha version label Jan 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state:released-alpha Released as alpha version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants