Support grid layouts in the STACK flow component - #39
Conversation
|
Warning Review limit reached
Next review available in: 29 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
b46f3dc to
fcb9de7
Compare
Honor the items property on STACK flow elements so children can be laid out in an n-column grid (e.g. a 2 x 2 grid with items: 2). Non-numeric or absent values keep the existing flex layout. Refs thunder-id/thunderid#3703
fcb9de7 to
774e089
Compare
Purpose
The STACK flow component in
@thunderid/reactalways renders its children as a flex row/column, so layouts like a 2 x 2 button grid (four login options, two per row) are impossible even though theEmbeddedFlowComponent.itemsproperty ("Number of items across the main axis (for Stack grid-like layouts)") already exists in@thunderid/javascript. This PR makes the renderer honoritems.Approach
AuthOptionFactory'sStackcase,itemsis the number of slots across the main axis anddirectionpicks that axis:row(default) makes it the column count (items: 2with four buttons renders a 2 x 2 grid), andcolumnmakes it the row count with children flowing into further columns.items >= 2. Stacks with a single slot or noitemskeep the existing flex layout unchanged, so flows authored before this change render exactly as before.itemsis parsed defensively from the SDK'sstring | numbertype: malformed values ("2invalid"), zero, and negatives fall back to flex, and the slot count is clamped so a mistyped value cannot render thousands of cells.getStackGridSxhelper in the companion PR.Related Issues
Related PRs
Checklist
Security checks