Skip to content

Add FCollapsible.axis for horizontal collapsing#1066

Merged
Pante merged 1 commit into
mainfrom
feature/better-collapsible
Jun 19, 2026
Merged

Add FCollapsible.axis for horizontal collapsing#1066
Pante merged 1 commit into
mainfrom
feature/better-collapsible

Conversation

@Pante

@Pante Pante commented Jun 19, 2026

Copy link
Copy Markdown
Member

Describe the changes

Closes #974 (the axis half of the request).

  • Add FCollapsible.axis (defaults to Axis.vertical). Axis.horizontal collapses the child along its width instead of its height; the render box and clipper now branch on the axis.
  • Non-breaking: the Axis.vertical default is byte-identical to the previous hardcoded behavior, so FAccordionItem and FSidebarItem are unaffected.
  • Add a half expanded horizontal golden and rename the vertical half expanded golden to half-expanded-vertical (the fully expanded/fully collapsed cases render identically on both axes, so they stay unqualified).
  • Add a behavioral test asserting per-axis sizing and relayout on axis change.
  • Surface axis in the usage snippet and add a CHANGELOG.md entry.
  • Note: the implicit-animation part of FCollapsible enhancement #974 is intentionally not included, per the maintainer comment on the issue (collapsible stays a primitive so higher-level widgets can drive their own animations).
  • Note: only the macOS goldens are regenerated here; the Windows half-expanded-{vertical,horizontal}.png baselines will be produced by the golden CI workflow when it resumes.

Checklist

  • I have read the CONTRIBUTING.md.
  • I have included the relevant unit/golden tests.
  • I have included the relevant samples.
  • I have updated the documentation accordingly.
  • I have added the required flutters_hook for widget controllers.
  • I have updated the CHANGELOG.md if necessary.

🤖 Generated with Claude Code

* Add `FCollapsible.axis` (defaults to `Axis.vertical`); horizontal
  collapses the child's width instead of its height.
* Add golden (`half expanded horizontal`) and behavioral coverage.
* Surface `axis` in the usage snippet and update the changelog.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 19, 2026 08:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@auto-maid

auto-maid Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Documentation Preview

Latest Commit SHA 199d688
Preview URL https://0a50cce2-forui-docs-dev.duobase.workers.dev/docs

You're seeing this because the docs/samples were updated.

@Pante Pante merged commit bd95d06 into main Jun 19, 2026
21 of 23 checks passed
@Pante Pante deleted the feature/better-collapsible branch June 19, 2026 08:15
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.

FCollapsible enhancement

2 participants