Skip to content

Commit 68548a5

Browse files
committed
Add TODOs: hstack align & sidebar z-index
Add two TODO entries documenting downstream layout bugs and recommended fixes: (1) .sp-hstack needs an align option (e.g. align: 'stretch' | 'center', default 'center') exposed via getStackClasses to map to align-items so children can stretch to row height (avoid downstream one-off CSS). (2) .sp-sidebar-toggle lacks an explicit z-index and is covered by the backdrop when open; recommend setting its z-index above the backdrop token in src/styles/components.css and adding a regression test for open-then-close via the toggle. Also reminds to add focused contract/regression tests for downstream integration issues.
1 parent 8701b0e commit 68548a5

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

TODO.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,39 @@ Confirmed token shape once published:
450450
- Add tests or docs when real usage exposes ambiguous class or recipe
451451
contracts.
452452

453+
- [ ] `.sp-hstack` needs a way to stretch children to the row's full height
454+
- Found in `docs-phcdevworks-com`'s app shell (Phase 4d sidebar + main
455+
content row): `.sp-hstack` hardcodes `align-items: center`, so when
456+
`SpSidebar` (fixed `height: 100%` only while off-canvas/`position: fixed`
457+
below `breakpoints.md`) docks inline at `position: static` above
458+
`breakpoints.md`, it no longer has a `height: 100%` reference and shrinks
459+
to its own content height instead of stretching to match a taller main
460+
content column. `Stack`'s `basis: 'sidebar'` option (Phase 4d) does not
461+
address this — it only sets `flex-basis` on a child's width, not the
462+
row's cross-axis sizing.
463+
- Needs an `align` option on `getStackClasses` (e.g. `align: 'stretch' |
464+
'center'`, defaulting to today's `center` to avoid a breaking change),
465+
mapping to `align-items` on `.sp-stack`/`.sp-hstack`.
466+
- Do not patch around this downstream with inline styles or one-off CSS —
467+
it belongs in this package's recipe contract.
468+
469+
- [ ] `.sp-sidebar-toggle` has no `z-index`, so the backdrop covers it once
470+
open — hamburger can open the sidebar but cannot close it
471+
- Found in `docs-phcdevworks-com`'s app shell. `.sp-sidebar-backdrop` uses
472+
`--sp-component-sidebar-backdrop-z-index` (`--sp-z-index-overlay` =
473+
`1300`), which is higher than `--sp-component-sidebar-z-index`
474+
(`--sp-z-index-fixed` = `1200`) that the toggle button implicitly
475+
inherits by sitting inside `.sp-sidebar-shell` with no z-index of its own.
476+
Once `data-sidebar-open="true"`, the backdrop renders above the toggle
477+
button and intercepts the click meant to close it.
478+
- Fix: give `.sp-sidebar-toggle` an explicit `z-index` above
479+
`--sp-component-sidebar-backdrop-z-index` (or reuse a token already above
480+
`--sp-z-index-overlay`) in `src/styles/components.css`. Verify the click
481+
still reaches the button when the backdrop is visible.
482+
- Add a regression test/fixture covering open-then-close via the toggle
483+
button specifically, not just the backdrop-click-to-close path that
484+
already passes.
485+
453486
- [ ] Add regression coverage for downstream integration issues
454487
- Prefer focused contract tests over broad fixture expansion.
455488

0 commit comments

Comments
 (0)