Skip to content

Preserve reverse keywords in flex-flow - #216

Open
jacobp100 with Copilot wants to merge 3 commits into
masterfrom
copilot/fix-flex-flow-reverse-handling
Open

jacobp100 with Copilot wants to merge 3 commits into
masterfrom
copilot/fix-flex-flow-reverse-handling

Conversation

Copilot AI commented Nov 13, 2026 •

Copy link
Copy Markdown

flex-flow truncates reverse keywords because its matchers accept keyword prefixes.

  • Parsing: Anchor direction and wrap matchers to preserve complete keywords and reject partial matches.
  • Coverage: Add cases for reverse keywords, both shorthand orders, and invalid values.
transform([['flex-flow', 'wrap-reverse column-reverse']])
// { flexWrap: 'wrap-reverse', flexDirection: 'column-reverse' }

@changeset-bot

changeset-bot Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: c5984a2

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copilot AI and others added 2 commits November 13, 2026 17:18
Co-authored-by: jacobp100 <7275322+jacobp100@users.noreply.github.com>
Co-authored-by: jacobp100 <7275322+jacobp100@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix flex-flow handling of reverse keywords Preserve reverse keywords in flex-flow Nov 13, 2026
Copilot AI requested a review from jacobp100 November 13, 2026 17:20
@jacobp100
jacobp100 marked this pull request as ready for review November 16, 2026 09:13
@jacobp100
jacobp100 requested a balanced review from Copilot November 16, 2026 09:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues remain for the flex-flow keyword-matching fix.

No open issues 🎉

What changed in this PR

Fixes #215 by preserving complete reverse keywords when converting the flex-flow shorthand to React Native styles.

Changes:

  • Anchors direction and wrap matchers to accept only complete keywords.
  • Adds regression tests for reverse keywords, both shorthand orders, default values, and invalid partial matches.
File Description
src/​transforms/​flexFlow.ts Anchors keyword matchers to prevent truncation and partial matches.
src/​__tests__/​flexFlow.ts Tests reverse values, shorthand ordering, defaults, and invalid inputs.

Review effort: Balanced

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.

flex-flow drops -reverse: column-reverse becomes column, wrap-reverse becomes wrap

3 participants