Skip to content

feat: add uno-toolkit-flexpanel agent skill - #146

Merged
Xiaoy312 merged 1 commit into
mainfrom
dev/xygu/20260917/toolkit-flexpanel-skill
Sep 21, 2026
Merged

Xiaoy312 merged 1 commit into
mainfrom
dev/xygu/20260917/toolkit-flexpanel-skill

Conversation

@Xiaoy312

Copy link
Copy Markdown
Contributor

GitHub Issue (If applicable): https://github.com/unoplatform/uno-private/issues/2179

PR Type

What kind of change does this PR introduce?

  • Feature
  • Documentation content changes

What is the current behavior?

The plugin ships a skill for every Toolkit control it covers, including uno-toolkit-autolayout, but there is nothing for FlexPanel — the CSS Flexbox panel added in unoplatform/uno.toolkit.ui#1639.

Without it, an agent asked for a flexbox layout has only AutoLayout to reach for. AutoLayout cannot wrap onto multiple lines at all, and its property names (PrimaryAxisAlignment, CounterAlignment, Spacing) have no relationship to the CSS vocabulary the request is phrased in — so the likely outcome is either the wrong control or invented member names.

What is the new behavior?

Adds uno-toolkit-flexpanel to both skill trees, and cross-links it with uno-toolkit-autolayout.

Built from the AutoLayout skill as a template — same frontmatter shape, same Workflow → docs-search/fetch steps → Key Principles (Stable) → Related Skills structure.

Sized closer to uno-toolkit-card than to uno-toolkit-autolayout (171 lines vs 63), on purpose. The docs PR is not merged yet, so uno_platform_docs_fetch(sourcePath="external/uno.toolkit.ui/doc/controls/FlexPanel.md") will 404 until it lands. The fetch steps follow the house convention and start working on merge, but until then Key Principles (Stable) has to carry the whole surface rather than act as a fallback.

Contents:

  • the container and per-child attached property tables, with types, defaults and CSS equivalents;
  • the critical rules — Basis beats Width on the main axis, Grow="1" is not flex: 1 1 0, the automatic minimum size (rows overflow rather than fit), FlexMinWidth is not FrameworkElement.MinWidth, the LayoutDirection double-mirror hazard, Visibility="Collapsed" eating the gap slot, Direction defaulting to Row despite Column = 0;
  • the FlexAlign / FlexJustify members that are shared with the engine and silently do nothing;
  • a "members that do NOT exist" list mirroring AutoLayout's own, since CSS names are exactly what a model will hallucinate here;
  • the FlexPanel vs AutoLayout comparison.

uno-toolkit-autolayout gains a disambiguation line and a [[uno-toolkit-flexpanel]] related-skill entry (version 2.3 → 2.4). The two when_to_use fields are what decide which skill loads for a layout request, so both were written to steer explicitly: CSS vocabulary and wrapping to FlexPanel, Figma auto-layout frames to AutoLayout.

PR Checklist

  • Documentation has been added/updated
  • Associated with an issue (GitHub or internal)

Additional Information

Verified against source, not only the prose. A complete enumeration of PropertyMetadata in FlexPanel.Properties.cs returns exactly 20 dependency properties — 9 container, 11 attached — matching the 20 rows in the two tables. That makes the "members that do NOT exist" list (Gap, Flex, Order, FlexMaxWidth/FlexMaxHeight, AspectRatio, Overflow, BoxSizing) provable from the DP surface rather than inferred from the doc's Limitations section. Every default matches the metadata, and FlexDirection.Column = 0 confirms the enum-numbering note.

One deliberate departure from the reference page: the FlexPositionType row also lists Static. The doc gives only Relative / Absolute, but Static is a real enum member and Position is passed straight through to the layout engine — and the table sits under a "do not invent member names" instruction, so an agent reading a two-member list could wrongly reject valid code.

The "no BorderBrush or CornerRadius, wrap it in a Border" limitation is qualified as a plain visual border, not a card-like surface, pointing at uno-toolkit-card. That skill flags Border + CornerRadius + Background as anti-pattern GRD1102, and both skills can be loaded at once.

Both trees are byte-identical, as skills/README.md requires — diff -rq skills plugins/uno-platform-studio/skills reports only its own README.md. No manifest enumerates skills ("skills": "./skills"), so nothing else needed updating.

🤖 Generated with Claude Code

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]>
@Xiaoy312
Xiaoy312 requested a review from kazo0 September 17, 2026 16:52
@Xiaoy312
Xiaoy312 merged commit 609cb68 into main Sep 21, 2026
2 of 3 checks passed
@Xiaoy312
Xiaoy312 deleted the dev/xygu/20260917/toolkit-flexpanel-skill branch September 21, 2026 16:10
@welcome

welcome Bot commented Sep 21, 2026

Copy link
Copy Markdown

Congrats on your first pull-request! We ❤ the people who are involved in this project, and we’d love to pay it forward by sending you some swag. If you have any feedback (or ideas how to improve Uno as a open-source project) please open a feedback issue.
giphy
Merci beaucoup 👋

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