Skip to content

fix: render sibling tabs at parent level in show view#142

Merged
tfwright merged 1 commit intomainfrom
fix/show-sibling-tabs-position
Apr 23, 2026
Merged

fix: render sibling tabs at parent level in show view#142
tfwright merged 1 commit intomainfrom
fix/show-sibling-tabs-position

Conversation

@tfwright
Copy link
Copy Markdown
Owner

Summary

  • Sibling-section navigation tabs (e.g. `0`, `1` for an `embeds_many` list) and a section's own child embed tabs (e.g. a nested `FIELDS` embed) were both rendered inside each child detail-view's `.tabs` container. Visually, the child embed tab appeared as a peer of the section selectors instead of nested inside its section.
  • This PR moves sibling-section navigation into the parent's iteration loop so each child's `.tabs` only contains its own embed tabs. The section selector renders once per embed list, between the parent's card and the child detail-views.

Test plan

  • Two new tests in `container_test.exs` assert the sibling navigation tab renders as a child of the parent and not inside a child detail-view; both fail before the change and pass after
  • Full `mix test` suite passes (33 tests)
  • `mix format --check-formatted` clean for changed files

Sibling-section navigation tabs (0, 1, ...) and child embed tabs
(e.g. LINKS) were both rendered inside each child detail-view's
.tabs container, which made child embeds visually peer with the
section selectors instead of nested inside their section. Move
the sibling navigation into the parent's tabs region so each
child's .tabs only contains its own embed tabs.

Render numbered tabs for embeds_many regardless of count so single
items still get an index link, and hide each numbered row when
its embed is not the active selection (via data-tab-group + JS).
@tfwright tfwright force-pushed the fix/show-sibling-tabs-position branch from 32742ad to e6d8ee2 Compare April 23, 2026 22:52
@tfwright tfwright merged commit 2d24e78 into main Apr 23, 2026
6 checks passed
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