Skip to content

feat: FlexPanel - #1639

Merged
Xiaoy312 merged 27 commits into
mainfrom
dev/xygu/20260904/reactor-flexpanel-import
Sep 29, 2026
Merged

Xiaoy312 merged 27 commits into
mainfrom
dev/xygu/20260904/reactor-flexpanel-import

Conversation

@Xiaoy312

@Xiaoy312 Xiaoy312 commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

GitHub Issue (If applicable): # n/a — tracked in internal issues, linked at the bottom

PR Type

What kind of change does this PR introduce?

  • Feature

What is the current behavior?

The toolkit ships AutoLayout, which mirrors the Figma AutoLayout frame and is intentionally scoped to that. Apps reproducing a CSS layout have no Flexbox primitive: there is no flex-grow/flex-shrink/flex-basis distribution, no wrapping onto multiple lines, and no justify-content/align-items/align-content matrix.

What is the new behavior?

Adds FlexPanel, a Panel that arranges its children with CSS Flexbox semantics, backed by a vendored C# port of Meta's Yoga engine — so sizing, wrapping and distribution follow the CSS specification rather than an approximation of it.

  • Engine (src/Uno.Toolkit.UI/Layout/Yoga/) — vendored from Reactor. Pure managed float math: no platform API, no #if, no TFM-conditional code.
  • Adapter (src/Uno.Toolkit.UI/Controls/FlexPanel/) — a rewrite guided by upstream's FlexPanel.cs, not a port. Container properties Direction, Wrap, JustifyContent, AlignItems, AlignContent, ColumnGap, RowGap, Padding, LayoutDirection; attached properties Grow, Shrink, Basis, FlexMinWidth, FlexMinHeight, AlignSelf, Position and the Left/Top/Right/Bottom insets. A child's Margin, Width, Height and Visibility participate without any attached property.
  • Allocation discipline — Yoga nodes and attached-property reads are cached per child and every scratch collection is reused across passes, so MeasureOverride/ArrangeOverride allocate nothing and stay LINQ-free.
  • Tests — 544 ported Yoga conformance cases, plus 21 adapter tests and 3 teardown/leak guards. Unfiltered Release run on desktop/Skia: total=898 passed=898 failed=0 skipped=57 (874 → 898 is exactly the additions; skipped unchanged).
  • Samples — a gallery page under Controls plus a full-screen playground exercising every property live, including the UseLayoutRounding toggle, a FlowDirection toggle and a 200-child stress toggle.
  • Docs — doc/controls/FlexPanel.md, a toc.yml entry, and a cross-link from AutoLayoutControl.md so readers reproducing a CSS layout land on FlexPanel while Figma-parity users stay on AutoLayout.

AutoLayout is untouched: git diff against the fork point is empty for Controls/AutoLayout/ and Tests/AutoLayoutTest.cs.

Two deviations from upstream worth calling out:

  • Get/SetMinWidth → Get/SetFlexMinWidth. Upstream registers the DP as "FlexMinWidth" but names the accessors Get/SetMinWidth; XAML resolves an attached property by accessor name, so utu:FlexPanel.FlexMinWidth="0" would not bind against upstream's naming.
  • PointScaleFactor is bound to UseLayoutRounding rather than being applied unconditionally, so the engine's pixel-grid snapping is opt-in and the platform's own rounding is what survives otherwise.

Sanctioned warning suppression

FlexPanel.LayoutDirection needs new: on Android the base View declares a LayoutDirection of its own, so without it the Android build fails with CS0114. Android is the only target with a base member to hide, so a bare new raises CS0109 ("the new keyword is not required") on every other target — also an error, under TreatWarningsAsErrors.

Per AGENTS.md §4, the justification for the suppression is recorded here:

  • Constraint — the two errors are mutually exclusive and live on disjoint targets, so no single spelling of the declaration is warning-free everywhere.
  • Scope — #pragma warning disable CS0109 brackets only that one property in FlexPanel.Properties.cs, with an explanatory comment, rather than wrapping the keyword in #if __ANDROID__ (AGENTS.md discourages scattered #if).
  • Verification — Android Release and Desktop Release were both built, since a green build on either one alone cannot catch both errors.

Hiding is behaviourally inert: Android's property is shadowed only for FlexPanel-typed references, Uno's native layout code holds View/ViewGroup-typed references, and XAML resolves the property through LayoutDirectionProperty.

PR Checklist

Please check if your PR fulfills the following requirements:

Other information

Draft — cross-platform validation is not done. Everything above was verified on desktop/Skia only. Still open before this can leave draft:

  • The rounding matrix across the remaining heads (WASM, Skia mobile, scale factors 1.0 / 1.25 / 1.5 / 2.0).
  • A WASM allocation profile of the 200-child stress case in the playground.

Both are tracked in the import spec under specs/flexpanel-import/progress.md, which is committed here alongside the code and records the phase-by-phase results and reasoning.

One real leak was caught by the teardown tests during development and fixed here: the scratch collections reused across layout passes were left populated after a pass, pinning children of a panel that never laid out again. The clears now sit in finally blocks and are repeated in OnUnloaded, so the release is unconditional rather than deferred to the next pass.

Internal Issue (If applicable):

  • Closes unoplatform/uno.toolkit.ui-private#17
  • Closes unoplatform/uno-private#2179

🤖 Generated with Claude Code

@Xiaoy312 Xiaoy312 changed the title feat(flexpanel): import the Yoga-backed FlexPanel control feat: FlexPanel Sep 10, 2026
@Xiaoy312
Xiaoy312 force-pushed the dev/xygu/20260904/reactor-flexpanel-import branch from fac62d6 to bf23c67 Compare September 10, 2026 23:43
@Xiaoy312
Xiaoy312 force-pushed the dev/xygu/20260904/reactor-flexpanel-import branch from bf23c67 to 12af860 Compare September 10, 2026 23:48
@Xiaoy312
Xiaoy312 marked this pull request as ready for review September 14, 2026 17:44
@github-actions

Copy link
Copy Markdown

Xiaoy312 added a commit to unoplatform/studio that referenced this pull request Sep 21, 2026
Add a skill for the Toolkit FlexPanel control, built from the AutoLayout
skill as a template and grounded in the FlexPanel documentation added in
unoplatform/uno.toolkit.ui#1639.

The skill is sized closer to uno-toolkit-card than to uno-toolkit-autolayout:
the docs PR is not merged yet, so the uno_platform_docs_fetch calls will 404
until it lands. The fetch steps follow the house convention and start working
on merge, but until then the "Key Principles (Stable)" section carries the
whole surface rather than acting as a fallback.

Contents: the container and per-child attached property tables with their CSS
equivalents, the critical rules (Basis beats Width on the main axis,
Grow="1" is not flex: 1 1 0, automatic minimum size, FlexMinWidth is not
FrameworkElement.MinWidth, the LayoutDirection double-mirror hazard,
Visibility="Collapsed" eating the gap slot), the enum members that silently do
nothing, a "members that do NOT exist" list mirroring AutoLayout's, and the
FlexPanel vs AutoLayout comparison.

Every property name, type and default is verified against
FlexPanel.Properties.cs rather than ported from the prose alone. The
FlexPositionType row also lists Static, which the reference page omits; it is
passed straight through to the layout engine, and the table sits under a "do
not invent member names" instruction.

Also cross-link the two controls: uno-toolkit-autolayout gains a
disambiguation line and a related-skill entry, since the when_to_use fields
are what decide which of the two loads for a layout request.

Both skill trees stay byte-identical, as skills/README.md requires.

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
@github-actions

Copy link
Copy Markdown

@kazo0

kazo0 commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

@Mergifyio backport servicing/10.0

@mergify

mergify Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

backport servicing/10.0

✅ Backports have been created

Details

Cherry-pick of 1a69b1f has failed:

On branch mergify/bp/servicing/10.0/pr-1639
Your branch is ahead of 'origin/servicing/10.0' by 19 commits.
  (use "git push" to publish your local commits)

You are currently cherry-picking commit 1a69b1f.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   specs/lessons.md

no changes added to commit (use "git add" and/or "git commit -a")

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@kazo0 kazo0 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.

Reviewed the adapter (FlexPanel.cs, FlexPanel.Properties.cs), the adapter and leak tests, and the engine's dirty tracking and public surface. I only spot-checked the vendored engine itself.

The main points are inline:

  • Generated/mergedpages.xaml should be reverted.
  • Measure cost grows exponentially with nesting depth, from the min-content pre-measure plus the engine dirtying every node on every pass.
  • LayoutDirection duplicates what FlowDirection already does.
  • The public enums are vendored files marked "DO NOT HAND-EDIT".

The leak discipline is good: scratch collections are cleared in finally blocks, the leak tests use WeakReference, and the scale sync is lazy instead of subscribing to XamlRoot.Changed. Shipping the MIT notice in the package and keeping the vendoring in its own folder are both good calls.

Nits (not inline):

  • The public DP fields (DirectionProperty, GrowProperty, …) have no XML docs.
  • The 544 engine-only conformance tests compile into every sample head, WASM included. That's worth a note in the spec even if it's accepted.
  • The playground page has 609 lines of code-behind.

Comment thread specs/lessons.md Resolved
Comment thread specs/lessons.md Resolved
@Xiaoy312
Xiaoy312 force-pushed the dev/xygu/20260904/reactor-flexpanel-import branch from b629b5d to a7ffe94 Compare September 29, 2026 16:30
@Xiaoy312

Copy link
Copy Markdown
Contributor Author

Thanks for the thorough review. On the three nits:

  • DP field XML docs: added to all 19 *Property fields (a7ffe94).
  • Conformance corpus in every head: accepted and noted in spec.md. The 544 tests compile into the runtime-test assembly, so they ship in every sample head, WASM included, but never in the NuGet package. A full run takes about 6s on desktop.
  • Playground code-behind: it's a sample-only page that exercises every property live, so I'd rather not rework it into MVVM in this PR. Removing LayoutDirection already shortened it a little.

The full review pass, with the measurements, is recorded in specs/flexpanel-import/progress.md and spec.md ("Review amendments").

Xiaoy312 and others added 13 commits September 29, 2026 14:10
- Audit all 20 AutoLayout runtime test methods (~130 DataRow cases) against the
  CSS flexbox result: 2 of the 19 active tests are non-portable, both because of
  IsIndependentLayout
- Correct the premise that AutoLayout's Padding is Figma-anchored — the alignment
  offsets add the raw padding back, so it reduces to CSS padding; verified against
  the asymmetric-padding test's asserted offsets
- Record 4 mapping rules (Shrink=0, Grow+Basis=0, drop Spacing under SpaceBetween,
  re-measure at arrange finalSize) and 5 genuine gaps (G1-G5)
- Recommend un-deferring MaxWidth/MaxHeight into v1 as a P0 decision
- Add 4 mapping-rule guards to the tier-2 test list, and the negative-gap
  question to P1
- Add specs/lessons.md per AGENTS.md §3 with the lessons from this audit

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Imports Meta's Yoga layout engine (Microsoft's C# line-port, MIT) as the
foundation for a future FlexPanel control. AutoLayout is untouched.

- 10 files into src/Uno.Toolkit.UI/Layout/Yoga/, pinned at
  microsoft/microsoft-ui-reactor v0.1.0-preview.13 (c9191b97). The WinUI
  adapter FlexPanel.cs is deliberately not vendored - it gets rewritten.
- Namespace is Uno.Toolkit.UI.Yoga, not the spec's Uno.Toolkit.UI.Layout:
  that name collides with the existing public `enum Layout` in
  Uno.Toolkit.UI. The 6 public enums land in Uno.Toolkit.UI instead, as
  the future DP types; everything else was already internal upstream, so
  the added public surface is exactly those 6 types.
- FlexLayoutDirection.LTR/RTL renamed to LeftToRight/RightToLeft. No
  numeric enum value is renumbered anywhere.
- Every file carries a 4-line provenance header (repo, tag, commit, its
  own upstream path, import date, SPDX MIT with both copyright holders).
  Full license text in the new THIRD-PARTY-NOTICES.md.
- build/scripts/import-yoga.py performs the whole transform. It is
  idempotent and self-verifying, so the next sync is a diff rather than
  an archaeology exercise.

The scoped .editorconfig anticipated by the spec carries only indentation:
the vendored code builds warning-free under TreatWarningsAsErrors,
Nullable=enable and AnalysisModePerformance=AllEnabledByDefault as-is.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
The upstream generated suite is the reason the engine was imported rather
than hand-written: it turns "we believe our flexbox is spec-correct" into
evidence. Ported from the same pinned commit as the engine.

26 files, 590 test methods (544 active + 46 skipped upstream), 17,784
assertions. Result on desktop/Skia: 544 passed, 0 failed, ~6s.

- xUnit to MSTest: [Fact] -> [TestMethod], [TestClass] inserted,
  Assert.Equal -> YogaAssert.Equal.
- YogaAssert is the single float-comparison choke point. It keeps
  upstream's exact-equality semantics, but means a per-head rounding
  tolerance can be added in one place rather than 17,784.
- 46 cases are GTEST_SKIP'd in Meta's own C++ suite and arrive already
  disabled; they import as [Ignore] to mirror that, not to deactivate
  anything of ours. Enabling them would import known-failing cases.
- Upstream file, class and method names are kept verbatim, including the
  5 classes whose names break Reactor's own Yoga* pattern, so a failure
  maps straight onto its upstream file. The README says so explicitly.

Adds ~0.1s to a full rebuild of the runtime-test project.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Adds specs/flexpanel-import/progress.md and folds four findings from the
import back into the spec.

- D2's namespace was unusable. Uno.Toolkit.UI.Layout collides with the
  existing public `enum Layout`; corrected to Uno.Toolkit.UI.Yoga plus
  Uno.Toolkit.UI for the 6 public enums.
- G2 answered, as P1 required: Yoga clamps negative gap to 0
  (ComputeGapForAxis ends in MaxOrDefined(x, 0)), so the loss of
  AutoLayout's negative Spacing is a real gap, reachable only via
  negative child Margin.
- D7's analyzer containment proved unnecessary - the vendored code is
  warning-free as-is. NFR-5 restated: there was no upstream MIT header to
  preserve, so provenance comes from generated per-file headers plus
  THIRD-PARTY-NOTICES.md.
- FR-8, P4 and risk 1 narrowed to the Skia heads, since Uno 7.0 removes
  the native targets.
- Corpus size corrected from "~1,300 assertions" to the measured 590
  tests / 17,784 assertions.

Adds Facebook and SPDX to the cspell dictionary for the new docs.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
CI runs the runtime tests unfiltered, so the filtered runs used to gate P2
were not sufficient evidence on their own.

Unfiltered Release run on desktop/Skia: 874 passed, 0 failed, 57 skipped
across 931 cases. Cross-checking every corpus method name against the
result: 590/590 present (544 passed, 46 skipped, 0 missing), and the
pre-existing 341 cases are unperturbed. The corpus adds ~6s to a 38s run.

Also adds a scoped .editorconfig under Tests/Yoga/, mirroring the engine
folder's. Without it the repo default (tabs) applies to 1.7 MB of 4-space
vendored corpus, so a formatter run would silently rewrite it and destroy
the upstream diff. YogaAssert.cs is carved out as ours.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
- Add `FlexPanel`, a `Panel` that arranges its children with CSS Flexbox semantics on top of the vendored Yoga engine
- Container properties: Direction, Wrap, JustifyContent, AlignItems, AlignContent, ColumnGap, RowGap, Padding, LayoutDirection
- Attached properties: Grow, Shrink, Basis, FlexMinWidth, FlexMinHeight, AlignSelf, Position and the Left/Top/Right/Bottom insets
- Cache Yoga nodes and attached-property reads per child, and reuse every collection across passes, so measure/arrange allocate nothing and stay LINQ-free
- Add runtime tests covering container and attached-property layout, plus teardown/leak guards

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
- Add `FlexPanelSamplePage` under Controls, covering the container and per-child properties with static examples
- Add `FlexPanelPlaygroundNestedPage`, an interactive surface reached through `Shell.ShowNestedSample`, exercising every FlexPanel property
- Both pages are picked up by the shared project's `Content\**` glob, so no projitems change is needed

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
- Add `doc/controls/FlexPanel.md` covering the container and attached properties, `Basis` vs `Width`, automatic minimum size, right-to-left, layout rounding and known limitations
- List the page in `doc/toc.yml` under Controls
- Cross-link from `AutoLayoutControl.md` so readers reproducing a CSS layout land on FlexPanel and Figma-parity users stay on AutoLayout

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
- Mark P3 (adapter) and P5 (sample + docs) done; log the 24 added runtime tests and the 898/898 unfiltered Release run on desktop/Skia
- Record the deviations from upstream, including the `Get/SetFlexMinWidth` accessor-name fix that upstream's XAML would not bind against
- Write up the scratch-collection leak the tier-3 tests caught and the `finally`-based hardening beyond it
- Note P4 and spec risk 3 as still open — everything above is desktop/Skia only

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
The vendored Yoga engine is compiled into Uno.Toolkit.WinUI.dll, but the
nupkg carried no license or notice file at all - verified by packing and
string-scanning the assembly (YogaAlgorithm, CalculateLayoutImpl and the
Uno.Toolkit.UI.Yoga namespace are all present in lib/net9.0). MIT requires
its copyright and permission notice to travel with "all copies or
substantial portions of the Software", and a compiled package is a copy.
The notice existed only in the repo, which does not reach consumers.

- Pack THIRD-PARTY-NOTICES.md into the Uno.Toolkit.WinUI package root.
  Uno.Toolkit.WinUI is the only package that embeds the engine - verified
  no Flex*/Yoga reference anywhere under src/library/.
- Attribute Controls/FlexPanel/{FlexPanel,FlexPanel.Properties}.cs. These
  were described as "a rewrite, not a port", which is why they shipped
  with no header. That was wrong: 52 of 58 identifiers match upstream,
  including private helpers no independent implementation would pick
  (SyncPointScaleLazy, IsScrollLikeContainer, ComputeMinContent,
  ResolveMinDimension, SetRootConstraints), and bodies match closely -
  SyncPointScaleLazy down to the 0.0001f epsilon. It is a derivative work
  of MIT code, so attribution is required, not courtesy. The spec and
  progress notes are corrected to say "adapted", not "rewritten".
- Credit Microsoft/Reactor in doc/controls/FlexPanel.md, which previously
  named only Meta/Yoga.

Verified: the repacked nupkg contains THIRD-PARTY-NOTICES.md naming both
copyright holders and the pinned commit; Release build stays 0 warnings.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
- Cover FlexPanel.Padding at the control level: measure, content-sized
  DesiredSize, and the ArrangeOverride sizeChanged re-layout
- Pick sizes so a double inset yields a different number (160 vs 120,
  90 vs 130, 360 vs 320) rather than merely passing
- Record in the D3 deviation row why the rename cannot double-count:
  Uno Panel.PaddingInternal is internal, non-virtual and never written
  by FlexPanel, and WinUI Panel has no Padding at all

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
- mark `ResolveMinDimension` static (CA1822). It reads no instance state,
  and as a warning-as-error it broke every build leg, not just one.
- add `new` to `LayoutDirection`, which hides `View.LayoutDirection` on
  Android (CS0114). Android is the only target with a base member, so a
  bare `new` would raise CS0109 everywhere else; that is suppressed in
  targeted scope with a comment rather than an `#if` around the keyword.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Xiaoy312 and others added 7 commits September 29, 2026 14:17
…l playground

CodeQL flagged `IsChecked == true` / `!= true` as unnecessarily complex
boolean expressions. Rewrite them as `is true` / `is not true`, matching
the idiom already used in `GridExtensions` and `NavigationBar`.

Semantics are unchanged for `bool?` - `null` still behaves as `false`.
All 21 occurrences in the file are converted, not only the 9 the bot
annotated, so the remainder do not resurface on the next scan.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Both Docs Validations legs were failing on files this branch adds.

markdownlint:
- LICENSE.md: drop the duplicate blank line left by the notice blockquote (MD012)
- specs: tag four bare code fences as `text` (MD040)
- Yoga README: reflow the wrapped list continuation that began with `+`,
  which markdown parsed as a nested list and made the file's real `-`
  bullets look inconsistent (MD004). The bullets were correct; the
  continuation line was the actual fault.

cspell:
- add `templateless` and `TFMs`, both repo vocabulary
- reword `remappable`, `Upstreaming`, `checkmarks` and `unportable`
  rather than grow the shared dictionary with one-off coinages

Also records the CS0109 wrinkle in specs/lessons.md: a platform-specific
hide needs a fix that is correct on the platforms that do not see the
base member either.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
- 13 outcome-first recipes in the house .howto.md shape, ordered to lead with
  the four places CSS/WinUI intuition misleads: Basis vs Width, Grow="1" vs
  flex: 1 1 0, Shrink="0" overflow, and the FlexMinWidth="0" auto-min escape
- every recipe is traced to an assertion in FlexPanelTests.cs rather than
  derived from the property tables, per the lesson recorded for
  AutoLayout.howto.md in specs/lessons.md
- AlignContent, WrapReverse and the *Reverse directions are named in the quick
  reference but given no behavioral recipe: nothing at control level asserts
  them, so a snippet would be extrapolation
- FlexPanel was one of three controls in doc/toc.yml without a walkthrough

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
- neither FlexPanel.md nor AutoLayoutControl.md linked to its own how-to, so
  the walkthroughs were reachable only through the site nav tree or search
- one sentence each, no behavioral claims changed

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
- adds FlexPanel to the "the library adds the following controls" list at the
  top of controls-styles.md, where every other shipped control appears
- amends D6, which is otherwise unchanged: no Style, no theme resources, no
  Control Styles table row and no lightweight-styling.md keys still hold for a
  templateless panel. Dropping the control from the plain index as well was a
  side effect of that decision, not part of it

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
- adds a P5b section covering the walkthrough, the toc entry, the reference
  cross-links and the controls-index amendment to D6
- notes that every recipe is pinned to a FlexPanelTests.cs assertion, and which
  properties were deliberately left without one
- records the distribution gap left open: platform.uno/llms.txt indexes only
  unoplatform/uno and carries no uno.toolkit.ui URL, so no Toolkit walkthrough
  reaches that channel. Fixing it is a change to a different repo
- adds llms to the cspell dictionary for the above

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
- Move the preamble under the title instead of the last bullet
- Point to unoplatform/uno instead of a local checkout path
- Record the Generated/ and fixup-rebase lessons

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@Xiaoy312
Xiaoy312 force-pushed the dev/xygu/20260904/reactor-flexpanel-import branch from a7ffe94 to 02fb60e Compare September 29, 2026 18:37
Xiaoy312 and others added 7 commits September 29, 2026 15:09
- Remove the LayoutDirection DP, its Android 'new' hide and the CS0109 pragma
- Always run the engine left-to-right; FlowDirection mirrors the panel like any other
- Replace the two LayoutDirection tests with a visual FlowDirection RTL check
- Update the samples and docs, noting that Left/Right insets mirror as Canvas does

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…ernal

- Add FlexPanel's own FlexDirection/FlexWrap/FlexJustify/FlexAlign/FlexPositionType
  with XML docs, only the meaningful members, and the default value first
- Map them onto the engine by name in FlexEnumMapping, falling back to the default
- Make the vendored FlexEnums.cs internal via import-yoga.py, and fail the
  self-check on any public top-level type in the engine
- Drop the inert FlexJustify.Auto/Stretch/Start/End, FlexAlign.Start/End and
  FlexPositionType.Static members, and FlexLayoutDirection from the public API

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
- Read the attached properties straight from the property system every pass
- Remove _attachedCache, AttachedProps and the static detached-dirty table
- Document why the node is dirtied unconditionally every pass

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
- A zero-width Measure clamps DesiredSize to 0, so the CSS 4.5 automatic
  minimum always resolved to 0 while still costing an extra measure per child
- Remove ComputeMinContent / IsScrollLikeContainer; the minimum is now 0 unless
  FlexMinWidth / FlexMinHeight set one (the Yoga / React Native default)
- FlexMinWidth / FlexMinHeight clamp their own physical axis; fix their docs
- Replace the vacuous auto-min test with contract tests, and guard that each
  nesting level is measured once (was twice)

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…dren

- Replace the [ThreadStatic] mode, which reached every descendant, with an
  instance field the parent sets on a direct FlexPanel child only
- Honor it only while the parent really is a FlexPanel
- Invalidate the child when the mode changes at an unchanged constraint
- Test: an inner panel under a Grid row fills that row's definite height

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
- Map a child's MaxWidth/MaxHeight onto the node, so grow and stretch stop there
- Combine MinWidth/MinHeight with FlexMinWidth/FlexMinHeight (larger floor wins),
  so shrink stops there
- Tests for grow past MaxWidth, shrink below MinWidth and stretch past MaxHeight

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
- XML docs on every DependencyProperty field
- Record review amendments R1-R6 and the declined setter guards in the spec
- Note the conformance corpus compiles into every sample head, WASM included
- Add the review pass, with its measurements, to progress.md

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@Xiaoy312
Xiaoy312 force-pushed the dev/xygu/20260904/reactor-flexpanel-import branch from 02fb60e to 06435fd Compare September 29, 2026 19:10
@github-actions

Copy link
Copy Markdown

1 similar comment
@github-actions

Copy link
Copy Markdown

@Xiaoy312
Xiaoy312 enabled auto-merge September 29, 2026 21:07
@mergify

mergify Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

@Xiaoy312
Xiaoy312 merged commit d3b38e2 into main Sep 29, 2026
24 checks passed
@Xiaoy312
Xiaoy312 deleted the dev/xygu/20260904/reactor-flexpanel-import branch September 29, 2026 21:23
@mergify mergify Bot mentioned this pull request Sep 29, 2026
8 of 18 tasks
kazo0 added a commit that referenced this pull request Sep 29, 2026
- lessons: remove the committed conflict markers; keep the preamble and the #1639 lessons, drop main-only lessons (MSTest 4, Uno 7 retarget)
- tests: mark FlexPanelTests and MeasureCountingFlexPanel partial, required by the Uno 6 source generators on net9.0-android/ios (CS0260)

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01Jw33s8JYQYQ2UxZbrtmeww
kazo0 added a commit that referenced this pull request Sep 30, 2026
Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Co-authored-by: xiaoy312 <[email protected]>
Co-authored-by: Steve Bilogan <[email protected]>
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