Skip to content

Add option to render compound field without the chrome#5137

Open
burieberry wants to merge 5 commits into
mainfrom
cs-11412-contains-many-without-chrome
Open

Add option to render compound field without the chrome#5137
burieberry wants to merge 5 commits into
mainfrom
cs-11412-contains-many-without-chrome

Conversation

@burieberry
Copy link
Copy Markdown
Contributor

  • @displayContainer argument is currently only used for CardDefs. I propose providing this option to compound fields as well (including containsMany field), to be able to render the field without the chrome around it. This makes it easier to style the component and items.
  • ContainsMany field editor is unaffected as the default edit template of containsMany field.

Summary

  • Adds a @displayContainer argument to containsMany field components, allowing callers to
    render list items directly without the wrapping plural-field div and its associated chrome
    (borders, spacing, scaffold).
  • When @displayContainer={{false}}, containsMany-component renders each child item bare;
    the argument is forwarded to child field components so compound fields also skip their
    container wrapper.

Why

Card authors composing custom layouts need to embed a containsMany field inside their own
markup — a <ul>, a CSS grid, a BoxelContainer — without fighting the default container's
styles and structure. The new argument opts out of that chrome while keeping the field's
rendering and format logic intact.

Test plan

  • card-basics-test.gts — new integration tests cover @displayContainer={{false}} on a
    containsMany field: items render without the wrapper div, and the default
    (@displayContainer omitted / true) continues to render the chrome as before.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 5, 2026

Preview deployments

Host Test Results

  1 files    1 suites   3m 34s ⏱️
143 tests 138 ✅ 2 💤 0 ❌ 3 🔥
143 runs  135 ✅ 2 💤 3 ❌ 3 🔥

Results for commit 7ad0fa7.

For more details on these errors, see this check.

Realm Server Test Results

    1 files      1 suites   8m 11s ⏱️
1 544 tests 1 544 ✅ 0 💤 0 ❌
1 635 runs  1 635 ✅ 0 💤 0 ❌

Results for commit 7ad0fa7.

@burieberry burieberry marked this pull request as ready for review June 5, 2026 22:21
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.

1 participant