Skip to content

feat(catalog): add Gantt recipe with nested phases and dependencies - #163

Merged
tannerlinsley merged 8 commits into
TanStack:mainfrom
greglum:greg/gantt-dependencies-recipe
Nov 2, 2026
Merged

tannerlinsley merged 8 commits into
TanStack:mainfrom
greglum:greg/gantt-dependencies-recipe

Conversation

@greglum

@greglum greglum commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

This adds catalog case 198, a Gantt recipe for the pending PLAN.md item "Gantt/resource timeline with nested groups and dependencies". The conformance README asks for that item to arrive first as a recipe. There is no core change.

What it shows, using only public marks on scaleBand lanes and scaleUtc time:

  • Phase header lanes with indented task lanes. Phase summary bars use an outline plus a light fill, so connectors stay visible across them.
  • Task bars with progress fills, a go-live milestone, and a dashed status-date rule.
  • Thirteen right-angle finish-to-start arrows, drawn with link and a small case-local d3 curve through d3Curve. Each exits the right edge and enters the left. It routes back through the lane gutter when a successor starts before its predecessor ends.
  • Connectors, progress fills and the status rule are decorative, so keyboard focus stops only on phases, tasks and the milestone.
  • A lane-tree focus strategy (focusNearestY with a y-then-x navigation), so arrow keys walk the plan top to bottom. Tooltips list dates, progress and predecessors.
  • Colours come from --ts-chart-* and currentColor.

Verification:

  • pnpm conformance -- --case=198-gantt-dependencies passes at 320, 640 and 960 px, light and dark, for initial and revised data. Geometry match against the Observable Plot reference is 98.7%.
  • The case unit tests pass, including keyboard focus order.
  • Catalog index, preview and examples checks, pnpm docs:check and pnpm typecheck pass.
  • Documented in Intervals and Financial Charts via the chart-example directive.

Friction found while building it, logged as API entries with status monitoring:

  • F-315: right-angle connectors need a hand-built curve, because a curve cannot see the band step or the target mark.
  • F-316: keyboard focus cannot follow a dependency. A custom resolve also cannot reuse the default nearest-point lookup, because it receives points, not the scene.
  • F-317: time-ranged bars cannot inset only their lane edges, and barX rejects Date fields.

These IDs will need renumbering if other friction entries land first. No changeset, because no published package changes.

Summary by CodeRabbit

  • New Features
    • Added a project Gantt chart example with nested phases and tasks, progress indicators, a milestone, a status-date marker, and right-angle dependency arrows.
    • Task descriptions are available through tooltips, and keyboard navigation follows lane order.
  • Documentation
    • Added guidance for using Gantt charts to plan projects with task dependencies and phase progress.
    • Added the chart to the individual charts catalog.
  • Chores
    • Expanded the conformance catalog and coverage reporting to include the new chart.

Add conformance case 198: phase header lanes with indented task lanes on scaleBand and scaleUtc, progress fills, a go-live milestone, a status-date rule, and right-angle finish-to-start arrows routed by a case-local d3 curve on link. Connectors, progress, and the rule are decorative, so keyboard focus stops on every phase, task, and milestone. Observable Plot reference uses the same routing curve.

Document the recipe in Intervals and Financial Charts, register the case in the catalog index, previews, navigation, and definition coverage records, and log F-310, F-313, and F-314 in the API friction log.
Use a focusNearestY-based strategy whose navigation sorts by y then x so arrow keys follow the lane tree, and assert the order in the unit test. Outline phase summaries with a light fill so crossing connectors stay visible in both themes. Note the fixed margin assumption in the gutter estimate and correct F-308.
@coderabbitai

coderabbitai Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 61182eea-880f-4e78-b996-c5f98f50248a
Commits

Reviewing files that changed from the base of the PR and between 2db7f2a and 8fa28a4.

Files ignored due to path filters: 1
  • benchmarks/conformance/previews/198-gantt-dependencies.svg is excluded by !**/*.svg
Files selected for processing: 3
  • API-FRICTION.md
  • PLAN.md
  • benchmarks/conformance/previews/manifest.json
Files skipped from review as they are similar to previous changes: 2
  • PLAN.md
  • API-FRICTION.md

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

Walkthrough

Adds Gantt conformance case 198 with grouped task lanes, progress, milestones, a status-date rule, and routed finish-to-start dependency arrows. The change includes chart implementations, case registration, tests, coverage updates, and documentation.

Changes: Project Gantt conformance case

Layer / File(s) Summary
Task data and schedule layout
benchmarks/conformance/cases/198-gantt-dependencies/data.ts, benchmarks/conformance/cases/198-gantt-dependencies/plan.ts
Adds revision-specific project tasks and derives phase summaries, task lanes, progress spans, dependency endpoints, and a date domain.
Chart rendering and dependency routing
benchmarks/conformance/cases/198-gantt-dependencies/example.tsx, benchmarks/conformance/cases/198-gantt-dependencies/route.ts, benchmarks/conformance/cases/198-gantt-dependencies/plot.ts, benchmarks/conformance/cases/198-gantt-dependencies/tanstack.ts, benchmarks/conformance/cases/198-gantt-dependencies/tanstack.test.ts
Adds chart renderers, elbow-routed connectors, lane-ordered keyboard navigation, chart mounting, and tests for rendered items, lane scales, and focus order.
Case registration and validation
benchmarks/conformance/cases/198-gantt-dependencies/case.json, benchmarks/conformance/catalog-index.json, benchmarks/conformance/definition-coverage-roadmap.json, benchmarks/conformance/definition-coverage-roadmap.test.ts, benchmarks/conformance/previews/manifest.json, benchmarks/conformance/DEFINITION-COVERAGE-*, scripts/catalog-definition-shapes.test.mjs
Registers case 198, updates coverage counts and validation expectations, and adds the preview asset.
Usage documentation and API observations
docs/config.json, docs/examples/intervals-and-financial.md, packages/charts-core/docs/config.json, packages/charts-core/docs/examples/intervals-and-financial.md, API-FRICTION.md, PLAN.md
Adds chart navigation and Gantt guidance, records connector, keyboard traversal, and bar inset observations, and updates the roadmap entry.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Other

Sequence Diagram(s)

sequenceDiagram
  participant Example as createExampleChart
  participant Data as planForRevision
  participant Layout as planLayout
  participant Chart as Chart marks
  Example->>Data: Select revision-specific tasks
  Example->>Layout: Build lanes, items, and dependencies
  Layout-->>Example: Return chart layout
  Example->>Chart: Compose marks and interaction settings
Loading

Suggested reviewers: tannerlinsley

Merge Risk: Minimal · up to 8fa28

No actionable merge-blocking risk is established for this change.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "feat(catalog): add Gantt recipe with nested phases and dependencies" names the main change. The PR adds catalog case 198, a Gantt recipe with nested phase and task lanes and finish-to-start…
Docstring Coverage Passed Docstring coverage is inconclusive: files from earlier reviews still need to be rechecked within the check's analysis limits. Not blocking.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "feat(catalog): add Gantt recipe with nested phases and dependencies" names the main change. The PR adds catalog case 198, a Gantt recipe with nested phase and task lanes and finish-to-start dependency connectors. The changeset contains the case files, catalog entries, docs, and roadmap updates that match this title. It does not add core or published runtime changes, which the title does not claim. The title is specific and concise.

Finishing Touches
Generate unit tests (beta)
  • Create a new PR
  • 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

@tannerlinsley

Copy link
Copy Markdown
Member

Thanks @greglum. The recipe keeps the new work out of the published runtime, which is a good fit here. I reviewed the source and the generated preview at 2db7f2a0fe5205a07067a317179a5ad2b5cc96d1; independent interactive and conformance checks are still pending.

One rebase detail to fix: the new entries in API-FRICTION.md are now F-315, F-316 and F-317, but PLAN.md still points to F-307/F-308 and the PR description still lists F-307 through F-309. Please update those references together. PR #165 also currently proposes F-315, so we will need to reconcile the numbering when the first of these lands.

@changeset-bot

changeset-bot Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 8fa28a4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@tannerlinsley

Copy link
Copy Markdown
Member

Thanks for updating the friction references. I checked the recipe independently against current main, and the recipe source is unchanged in 116d53c.

The isolated Chromium checks covered initial and revised data at 320, 640 and 960 pixels in light and dark themes, then same-host updates down to 280 pixels and back. All 30 states kept 14 focusable items, 13 dependencies, finite SVG geometry and the expected keyboard order. Pointer movement at each item resolved the correct lane, and destroying each host removed its SVG.

I also inspected narrow light and medium-width dark renders. This does not replace the full conformance comparison or repository checks. Those workflow gates still need approval before this can be merged.

@tannerlinsley

Copy link
Copy Markdown
Member

React follow-up on 116d53c: the example also passes isolated Chromium checks under React Strict Mode at 320, 640 and 960 px. All 14 keyboard stops show their expected descriptions, resizing to 280 px keeps valid SVG geometry and the accessible label, and unmounting leaves no SVG or tooltip behind. No browser errors were reported.

This adds React mounting and cleanup coverage to the earlier scene checks. Full CI and reference-renderer conformance are still pending.

@tannerlinsley

Copy link
Copy Markdown
Member

Thanks @greglum, I completed another local verification slice at 116d53c57bfc753fea6a5ffcef94c586512325b5: the isolated checkout passes all 2,228 DOM tests, TypeScript, the documentation contract and the 189 self-contained catalog-entry checks.

This complements the earlier interactive and React Strict Mode checks. It does not replace the pending full CI or reference-renderer conformance comparison, and I have not approved workflow execution or merged the PR.

@tannerlinsley

Copy link
Copy Markdown
Member

Thanks @greglum, the reference-renderer checks now pass at this same head. The repository visual assertions pass for both initial and revised data at 320, 640 and 960 pixels in light and dark themes, across Chromium, Firefox and WebKit. That covers geometry counts, guide containment, accessible naming and matching data-mark paints. An intentionally incorrect geometry count fails the verifier. The paired source/type build also passes.

The full isolated package gate passes too, including bare React Native, Expo, seven adapters and the unified artifact. This is not a runtime timing benchmark or a replacement for the required CI, which remains pending.

Verified head: 116d53c57bfc753fea6a5ffcef94c586512325b5.

@tannerlinsley

Copy link
Copy Markdown
Member

Thanks @greglum. I merged current main into this branch at 8fa28a48bae7d6f88bc028f5aa33a9c23681fc8c to resolve the preview-manifest conflict, preserving your recipe source and commit history.

The normal generator produced all 189 previews. The 188 existing previews are byte-identical to main, and the Gantt preview is byte-identical to yours. The generated manifest check, TypeScript, catalog index and documentation contract all pass on the merged tree. No published runtime code or bundle budgets were changed by this resolution.

GitHub now reports the PR as mergeable. The updated head still needs its CI results before merge; the earlier interactive and reference-renderer evidence remains recorded above.

@nx-cloud

nx-cloud Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 8fa28a4

Command Status Duration Result
nx run charts-workspace:ci-distributed ✅ Succeeded 5m 19s View ↗
nx run charts-workspace:package-check ✅ Succeeded 2m 30s View ↗
nx run charts-workspace:benchmark-check ✅ Succeeded 1m 8s View ↗

☁️ Nx Cloud last updated this comment at 2026-11-02 04:04:31 UTC

@tannerlinsley
tannerlinsley merged commit 6b99c69 into TanStack:main Nov 2, 2026
13 checks passed
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