Skip to content

Commit 059b5b0

Browse files
bradpottsCopilot
andcommitted
Fix sidebar toggle visibility on desktop
Hide .sp-sidebar-toggle at min-width: 768px so the off-canvas hamburger button no longer overlaps the docked sidebar on desktop viewports. Also adds a deprecation policy to CONTRIBUTING.md, closes Phase 5 P1 TODO items, and bumps @types/node to ^26.1.0 with lockfile-refreshed rolldown 1.1.4 and related transitive dependencies. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent db62257 commit 059b5b0

6 files changed

Lines changed: 165 additions & 92 deletions

File tree

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,21 @@ reflects package releases published to npm.
66

77
## [Unreleased]
88

9+
## [2.7.1] - 2026-07-02
10+
11+
**Release Title:** Phase 5 P0 - Sidebar Toggle Desktop Visibility Fix
12+
13+
Contract change type: additive
14+
15+
### Fixed
16+
17+
- **Sidebar toggle button no longer stays visible on desktop**: the
18+
`@media (min-width: 768px)` block in `components.css` reset `.sp-sidebar`
19+
and `.sp-sidebar-backdrop` for the docked layout but never hid
20+
`.sp-sidebar-toggle`, so the off-canvas hamburger button rendered on top
21+
of the docked sidebar at all viewport widths. Added
22+
`.sp-sidebar-toggle { display: none; }` to the same media query.
23+
924
## [2.7.0] - 2026-06-30
1025

1126
**Release Title:** Phase 5 P0 - Select and Textarea State Parity

CONTRIBUTING.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,37 @@ opening a PR.
220220
- CSS entry point filenames and `package.json` export keys
221221
- The zero-hex policy itself
222222

223+
## Deprecation Policy
224+
225+
Before removing or renaming any public styling surface — a recipe function,
226+
a recipe option, a variant, a state, a CSS class, a CSS entry point, or a
227+
Tailwind export — it must go through a deprecation cycle. Silent removal is
228+
a `breaking` change with no migration window and is not acceptable for any
229+
surface listed under "Public API surfaces" above.
230+
231+
**Step-by-step checklist for deprecating a public surface:**
232+
233+
1. Keep the surface fully functional. A deprecated recipe, option, variant,
234+
state, or class must keep working exactly as before — deprecation is a
235+
notice, not a behavior change.
236+
2. Add a `CHANGELOG.md [Unreleased]` entry under a `### Deprecated` heading
237+
naming the exact surface (function name, option name, variant/state
238+
value, or class name), what replaces it, and the earliest major version
239+
in which it may be removed.
240+
3. Note the deprecation in the relevant docstring or inline comment at the
241+
call site in `src/`, and in the README wherever that surface is
242+
documented, so consumers reading source or docs see it without needing
243+
the changelog.
244+
4. Do not remove the surface in the same release that deprecates it. A
245+
removal requires its own later `breaking`-classified change following
246+
the existing breaking-change checklist, including Bradley Potts's
247+
explicit approval.
248+
5. `ui-contract.manifest.json` continues to declare only the current,
249+
supported contract — do not add deprecation metadata to the manifest.
250+
The manifest's job is validating what's live today, not tracking
251+
removal history; that history lives in `CHANGELOG.md`, which is already
252+
the source of truth for classification and timeline.
253+
223254
## Pull Request Checklist
224255

225256
1. Keep the change focused.

TODO.md

Lines changed: 39 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -631,26 +631,47 @@ All six landed together with CSS, recipes, manifest, README, changelog, and
631631
and drop the `getInputClasses()` workaround — see
632632
`project-design/spectre-components/TODO.md` Phase 6 P0.
633633

634+
- [x] `.sp-sidebar-toggle` stays visible on desktop, overlapping the docked
635+
sidebar
636+
- The `@media (min-width: 768px)` block in `src/styles/components.css`
637+
reset `.sp-sidebar` and `.sp-sidebar-backdrop` for the docked layout but
638+
never hid `.sp-sidebar-toggle`, so the off-canvas hamburger button
639+
rendered on top of the docked sidebar at all viewport widths.
640+
- Fix: added `.sp-sidebar-toggle { display: none; }` to the same media
641+
query.
642+
634643
- [x] Add regression coverage for downstream integration issues
635644
- Prefer focused contract tests over broad fixture expansion.
636645

637646
- [x] Keep examples as verification fixtures
638647
- Add visual fixtures only when they support regression review for new public
639648
recipes or states.
640649

641-
### P1: UI Deprecation Readiness
642-
643-
- [ ] Define a UI deprecation policy before removing public styling surface
644-
- Cover recipe functions, recipe options, variants, states, CSS classes, CSS
645-
entry points, and Tailwind exports.
646-
647-
- [ ] Decide whether `ui-contract.manifest.json` needs deprecation metadata
648-
- Add metadata only if it can be validated and kept narrow.
649-
650-
- [ ] Document deprecation notices in `CHANGELOG.md` and `CONTRIBUTING.md`
650+
### P1: UI Deprecation Readiness (done)
651+
652+
- [x] Define a UI deprecation policy before removing public styling surface
653+
- Added a "Deprecation Policy" section to `CONTRIBUTING.md`, covering
654+
recipe functions, recipe options, variants, states, CSS classes, CSS
655+
entry points, and Tailwind exports: keep the surface working, add a
656+
`CHANGELOG.md` `### Deprecated` entry naming the replacement and
657+
earliest removal version, note it at the source/README call site, and
658+
require a separate later `breaking`-classified change (with Bradley
659+
Potts's approval) to actually remove it.
660+
661+
- [x] Decide whether `ui-contract.manifest.json` needs deprecation metadata
662+
- Decision: no. The manifest's job is validating the current live
663+
contract, not tracking removal history — `CHANGELOG.md` is already the
664+
source of truth for classification and timeline, and adding parallel
665+
deprecation state to the manifest would need its own validator for a
666+
policy with zero deprecations to track yet. Revisit only if a real
667+
deprecation needs machine-readable tracking beyond the changelog.
668+
669+
- [x] Document deprecation notices in `CHANGELOG.md` and `CONTRIBUTING.md`
651670
before the first removal or rename
652-
- Consumers should see what is deprecated, what replaces it, and when removal
653-
can happen.
671+
- Covered by the same `CONTRIBUTING.md` section: every deprecation gets a
672+
`CHANGELOG.md [Unreleased]` entry plus an in-repo docstring/README note,
673+
so consumers reading source, docs, or changelog all see the same notice
674+
before anything is removed.
654675

655676
---
656677

@@ -681,10 +702,12 @@ All six landed together with CSS, recipes, manifest, README, changelog, and
681702
previously recipe-less `sp-checkbox`/`sp-radio`/`sp-select`/
682703
`sp-textarea`/`sp-fieldset`/`sp-label` components in
683704
`spectre-components`.
684-
12. Phase 5 P0 — continuous; add regression coverage as adapter usage reveals
685-
gaps.
686-
13. Phase 5 P1 — define deprecation mechanics before retiring any public
687-
class, recipe option, or variant.
705+
12. Phase 5 P0 — all known gaps closed; the "track adapter feedback" line
706+
stays open on a standing basis, add regression coverage as new usage
707+
reveals gaps.
708+
13. **Phase 5 P1 — done.** Deprecation policy documented in
709+
`CONTRIBUTING.md`; manifest deprecation metadata deliberately skipped
710+
(see rationale above).
688711

689712
---
690713

0 commit comments

Comments
 (0)