Skip to content

test(core): add vertical axis validation coverage to Dim.fill#2331

Open
suhaniiz wants to merge 2 commits into
Karanjot786:mainfrom
suhaniiz:test/dim-fill-vertical-axis
Open

test(core): add vertical axis validation coverage to Dim.fill#2331
suhaniiz wants to merge 2 commits into
Karanjot786:mainfrom
suhaniiz:test/dim-fill-vertical-axis

Conversation

@suhaniiz

@suhaniiz suhaniiz commented Jul 10, 2026

Copy link
Copy Markdown

Description

This PR resolves a test coverage omission in the Dimension Algebra suite by expanding the Dim.fill() specifications. It implements an explicit layout evaluation pass on the vertical axis (axis: 'vertical'), confirming that fills dynamically measure against contextual parentHeight properties exactly as it maps against parentWidth during horizontal sweeps.

Related Issue

Closes #2328

Which package(s)?

@termuijs/core

Type of Change

  • 🐛 Bug fix (type:bug)
  • ✨ Feature (type:feature)
  • 🧪 Tests (type:testing)

Checklist

  • ⭐ You starred the repo. The needs-star check blocks your merge otherwise.
  • Tests pass locally: bun vitest run
  • Build passes: bun run build
  • Your PR title follows type: short description.

GSSoC 2026 Participation

  • You are a GSSoC 2026 contributor.
  • Your GSSoC profile: https://gssoc.girlscript.org/profile/suhaniiz

Notes for the Reviewer

Ensures full regression safety across both layout direction parameters. Checked locally against the vitest execution stack and passes successfully without any downstream dependency side effects.

Summary by CodeRabbit

  • Tests
    • Expanded coverage for layout dimension calculations across horizontal and vertical contexts.
    • Added validation for chained arithmetic, composition utilities, and dependency tracking in dimension expressions.

@suhaniiz suhaniiz requested a review from Karanjot786 as a code owner July 10, 2026 16:05
@github-actions github-actions Bot added type:testing +10 pts. Tests. needs-star PR author has not starred the repo. labels Jul 10, 2026
@github-actions

Copy link
Copy Markdown

Hi @suhaniiz 👋

Star this repo before your PR merges.

Why? GSSoC 2026 contributors who star get priority review and points credit. After you star, push any commit (or re-run this check). The needs-star label lifts automatically.

Thanks for your contribution to TermUI.

@github-actions github-actions Bot added the area:core @termuijs/core label Jul 10, 2026
@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: bb0ef52d-1811-44bc-b79e-789df0a11525

📥 Commits

Reviewing files that changed from the base of the PR and between 695d11d and 9ce4b05.

📒 Files selected for processing (1)
  • packages/core/src/layout/dim.test.ts

📝 Walkthrough

Walkthrough

Expanded Dim test coverage to verify Dim.fill() across horizontal and vertical axes, plus algebra chaining, composition, evaluated results, and dependency propagation.

Changes

Dim layout test coverage

Layer / File(s) Summary
Axis-specific fill evaluation
packages/core/src/layout/dim.test.ts
Tests Dim.fill(2) against horizontal and vertical layout contexts with the expected subtracted results.
Dim algebra composition
packages/core/src/layout/dim.test.ts
Tests chained sub and add operations, Dim.max, Dim.func, numeric evaluation, and merged dependencies.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested labels: level:intermediate

Suggested reviewers: Karanjot786

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The PR also adds broader algebra/dependency assertions that are not part of the vertical-axis Dim.fill objective. Trim the extra algebra/dependency assertions or justify them in #2328 so the PR stays focused on Dim.fill vertical-axis coverage.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise, uses the required type format, and matches the Dim.fill vertical-axis test coverage change.
Description check ✅ Passed The description includes the required sections, a linked issue, package, type of change, checklist, and reviewer notes.
Linked Issues check ✅ Passed The PR adds the requested vertical-axis Dim.fill coverage and verifies parentHeight behavior for issue #2328.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:core @termuijs/core needs-star PR author has not starred the repo. type:testing +10 pts. Tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feature] : test(core): Add vertical axis layout evaluation test coverage for Dim.fill()

1 participant