Skip to content

Remove Area.baseLine type#7317

Merged
PavelVanecek merged 3 commits into
mainfrom
area-baseLine
May 11, 2026
Merged

Remove Area.baseLine type#7317
PavelVanecek merged 3 commits into
mainfrom
area-baseLine

Conversation

@PavelVanecek

@PavelVanecek PavelVanecek commented May 10, 2026

Copy link
Copy Markdown
Collaborator

Description

This property was internal in 2.x and unused in 3.x so I removed the type definition. The intended public prop is baseValue

Also added VR tests for different baseValue combinations.

Motivation and Context

I am making some changes in the animations branch and want this to be covered by screenshots

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • I have added a storybook story or VR test, or extended an existing story or VR test to show my changes

Summary by CodeRabbit

Release Notes

  • Breaking Changes

    • Renamed baseLine prop to baseValue in the Area component for improved clarity.
  • Updates

    • Clarified baseValue behavior documentation: it now explicitly explains how it configures baseline values for non-stacked, non-ranged areas and reads from the evaluated axis domain.
  • Tests

    • Added visual regression tests for ranged area chart variants with different baseValue configurations.

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 10, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b992b76f-30bd-432f-8718-cf34314c1147

📥 Commits

Reviewing files that changed from the base of the PR and between 8864871 and 5fa91e2.

⛔ Files ignored due to path filters (15)
  • test-vr/__snapshots__/tests/www/AreaChartRangeVariants.spec-vr.tsx-snapshots/Area-range-via-baseValue-dataMax-1-chromium-linux.png is excluded by !**/*.png
  • test-vr/__snapshots__/tests/www/AreaChartRangeVariants.spec-vr.tsx-snapshots/Area-range-via-baseValue-dataMax-1-firefox-linux.png is excluded by !**/*.png
  • test-vr/__snapshots__/tests/www/AreaChartRangeVariants.spec-vr.tsx-snapshots/Area-range-via-baseValue-dataMax-1-webkit-linux.png is excluded by !**/*.png
  • test-vr/__snapshots__/tests/www/AreaChartRangeVariants.spec-vr.tsx-snapshots/Area-range-via-baseValue-dataMin-1-chromium-linux.png is excluded by !**/*.png
  • test-vr/__snapshots__/tests/www/AreaChartRangeVariants.spec-vr.tsx-snapshots/Area-range-via-baseValue-dataMin-1-firefox-linux.png is excluded by !**/*.png
  • test-vr/__snapshots__/tests/www/AreaChartRangeVariants.spec-vr.tsx-snapshots/Area-range-via-baseValue-dataMin-1-webkit-linux.png is excluded by !**/*.png
  • test-vr/__snapshots__/tests/www/AreaChartRangeVariants.spec-vr.tsx-snapshots/Area-range-via-baseValue-number-1-chromium-linux.png is excluded by !**/*.png
  • test-vr/__snapshots__/tests/www/AreaChartRangeVariants.spec-vr.tsx-snapshots/Area-range-via-baseValue-number-1-firefox-linux.png is excluded by !**/*.png
  • test-vr/__snapshots__/tests/www/AreaChartRangeVariants.spec-vr.tsx-snapshots/Area-range-via-baseValue-number-1-webkit-linux.png is excluded by !**/*.png
  • test-vr/__snapshots__/tests/www/AreaChartRangeVariants.spec-vr.tsx-snapshots/Area-range-via-chart-baseValue-dataMax-1-chromium-linux.png is excluded by !**/*.png
  • test-vr/__snapshots__/tests/www/AreaChartRangeVariants.spec-vr.tsx-snapshots/Area-range-via-chart-baseValue-dataMax-1-firefox-linux.png is excluded by !**/*.png
  • test-vr/__snapshots__/tests/www/AreaChartRangeVariants.spec-vr.tsx-snapshots/Area-range-via-chart-baseValue-dataMax-1-webkit-linux.png is excluded by !**/*.png
  • test-vr/__snapshots__/tests/www/AreaChartRangeVariants.spec-vr.tsx-snapshots/Area-range-via-chart-baseValue-number-1-chromium-linux.png is excluded by !**/*.png
  • test-vr/__snapshots__/tests/www/AreaChartRangeVariants.spec-vr.tsx-snapshots/Area-range-via-chart-baseValue-number-1-firefox-linux.png is excluded by !**/*.png
  • test-vr/__snapshots__/tests/www/AreaChartRangeVariants.spec-vr.tsx-snapshots/Area-range-via-chart-baseValue-number-1-webkit-linux.png is excluded by !**/*.png
📒 Files selected for processing (5)
  • src/cartesian/Area.tsx
  • src/util/types.ts
  • test-vr/tests/www/AreaChartRangeVariants.spec-vr.tsx
  • test-vr/tests/www/RangedAreaTemplate.tsx
  • test/cartesian/Area.spec.tsx

Walkthrough

This PR updates Area and AreaChart components' public API documentation to clarify baseValue prop semantics for baseline construction, then adds visual regression tests with new test fixtures demonstrating baseValue behavior across configurations (numeric, dataMin, dataMax values at Area and AreaChart levels), and removes deprecated baseLine prop usage from existing unit tests.

Changes

Area baseValue Documentation and Visual Regression Tests

Layer / File(s) Summary
API Documentation Updates
src/cartesian/Area.tsx, src/util/types.ts
AreaProps documentation replaced from baseLine to baseValue, clarifying it determines internal baseline for non-stacked, non-ranged areas via axis domain values. CartesianChartProps.baseValue documentation expanded with domain-vs-dataMin/dataMax semantics, precedence rules (Area-level overrides chart-level), and ignore conditions (stacked/ranged areas).
Visual Regression Test Fixtures
test-vr/tests/www/RangedAreaTemplate.tsx
New component file with shared ranged chart configuration (dimensions, margins, domains, ranged dataset), two internal wrapper templates, and five exported test variants: three with baseValue on Area (number/dataMin/dataMax) and two with baseValue on AreaChart (number/dataMax).
Visual Regression Tests
test-vr/tests/www/AreaChartRangeVariants.spec-vr.tsx
New Playwright CT-React test file with five screenshot tests mounting each ranged area variant and asserting output via toHaveScreenshot(), covering Area-level and AreaChart-level baseValue with number/dataMin/dataMax configurations.
Existing Test Cleanup
test/cartesian/Area.spec.tsx
Removed deprecated baseLine={200} prop from six unit tests: customized label (function/element variants), customized dot (function/element variants), curve stroke layering, and chart type compatibility tests.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested reviewers

  • ckifer
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: removing the Area.baseLine type definition, which aligns with the primary objective of the PR.
Description check ✅ Passed The description covers the key aspects: explains what was removed (baseLine type), why (unused since 3.x), what was added (VR tests), and addresses all relevant checklist items.
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.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch area-baseLine

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.

@codecov

codecov Bot commented May 10, 2026

Copy link
Copy Markdown

Bundle Report

Bundle size has no change ✅

@chromatic-com

chromatic-com Bot commented May 10, 2026

Copy link
Copy Markdown

Tip

All tests passed and all changes approved!

🟢 UI Tests: 193 tests unchanged
🟢 UI Review: 193 stories published -- no changes
Storybook icon Storybook Publish: 193 stories published

@codecov

codecov Bot commented May 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.99%. Comparing base (8864871) to head (5fa91e2).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7317   +/-   ##
=======================================
  Coverage   88.99%   88.99%           
=======================================
  Files         541      541           
  Lines       41136    41136           
  Branches     5568     5569    +1     
=======================================
  Hits        36610    36610           
  Misses       4518     4518           
  Partials        8        8           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions

Copy link
Copy Markdown
Contributor

Staging Deployment Details

These deployments will remain available for 30 days.

To update snapshots: Comment /update-snapshots on this PR to automatically update the baseline screenshots.

@PavelVanecek
PavelVanecek merged commit 98d89fd into main May 11, 2026
60 checks passed
@PavelVanecek
PavelVanecek deleted the area-baseLine branch May 11, 2026 08:16
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