From 3a65d0f9c9b4a7329c96aa385625c9aa0b74baf3 Mon Sep 17 00:00:00 2001 From: Chris Sewell Date: Tue, 10 Nov 2026 15:48:13 +0100 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=9A=80=20RELEASE:=20v0.8.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bump the version to 0.8.0 and write the 0.8.0 changelog entry from the PRs merged since v0.7.0, replacing the Unreleased section. Fix the 0.7.0 heading date (2025-01-19 -> 2026-01-19). --- CHANGELOG.md | 239 ++++++++++++++++++++++++-------------- sphinx_design/__init__.py | 2 +- 2 files changed, 151 insertions(+), 90 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 12d79e0a..b7dd43ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,94 +1,155 @@ # Change Log -## Unreleased - -- ♻️ IMPROVE: Replace the Sass/Node build with a dependency-free Python CSS - generator (`tools/generate_css.py` driven by `style/design.toml` and - hand-authored `style/*.css`); `package.json` is gone. The compiled - `sphinx-design.min.css` is a rule-set no-op apart from two deliberate - changes. Hover/focus shades now use runtime `color-mix()` (behind a static - fallback), so overriding a `--sd-color-*` variable now flows through to its - `-highlight` shade instead of the shade being frozen at build time. Also - purges ~150 dead vendor prefixes (IE `-ms-flex*`, and `-moz-`/`-webkit-` - animation, box-sizing and user-select duplicates) that no supported browser - needs. The migration was verified rule-for-rule *and* cascade-order-faithful - against the previous stylesheet, and the new build fails loudly on - unregistered style files, malformed token data, or a stale/unparsable - artifact — see the new "Design: the CSS pipeline" documentation page - ({pr}`290`) -- 📚 DOCS: Document the browser support policy as - [Baseline Widely Available](https://web.dev/baseline) (evergreen - Chrome/Edge/Firefox/Safari, no Internet Explorer), replacing the stale 2021 - Bootstrap browserslist mirror ({pr}`290`) -- 🔧 MAINTAIN: CI now compiles the documentation's LaTeX output to PDF - (exercising the `sd_fontawesome_latex="fontawesome5"` icon path, which the - docs now use), and the fa-build hint recommends `"fontawesome5"` over the - legacy FontAwesome 4 package ({pr}`289`) -- ✨ NEW: `sd_fontawesome_version` makes icon role names version-agnostic: - any spelling (`fas`, `fa-solid`, ...) can emit the FontAwesome `"4"`, `"5"` - or `"6"` class scheme, so upgrading FontAwesome is a one-line `conf.py` - change; the default `"as-named"` keeps emitting the role name verbatim - ({pr}`288`, {issue}`174`) -- ✨ NEW: Badge roles accept a trailing `` ; tooltip `` suffix, rendered as a - native HTML `title` tooltip on all `bdg-*` families; for the link/ref badges - the suffix applies only after the explicit `text ` form (semicolons - are valid in URLs and reference targets), and a literal `;` in badge text is - escaped as `` \; `` ({pr}`286`, {issue}`81`) -- ✨ NEW: FontAwesome v6 roles (`fa-solid`/`fa-brands`/`fa-regular`) and - declarative CSS loading via the new `sd_fontawesome_source` / - `sd_fontawesome_cdn_url` options (the supported path for FontAwesome Pro - kits) ({pr}`285`, {issue}`174`) -- 👌 IMPROVE: `sd_fontawesome_latex` now also accepts `"fontawesome5"` (adding - `fontawesome5.sty` and emitting `\faIcon{...}`), resolving package clashes - with themes that load `fontawesome5`; `True`/`False` keep working unchanged - ({pr}`285`, {issue}`242`) -- 🐛 FIX: Synced tabs stay in sync when activated by click-and-drag or keyboard, - by syncing on the radio input's `change` event rather than a label click - ({pr}`284`, {issue}`46`) -- ✨ NEW: A URL fragment that targets a tab (e.g. `page.html#tab-name`), or an - element inside a tab panel, now opens that tab (both on load and on - `hashchange`) ({pr}`284`, {issue}`239`) -- 👌 IMPROVE: Tab selections now persist across browsing sessions, via - `localStorage` instead of `sessionStorage` (a behaviour change), and the - storage key prefix is configurable with the new `sd_tabs_storage_prefix` - option (set it to an empty string to disable persistence) ({pr}`284`, - {issue}`103`) -- 👌 IMPROVE: Restore keyboard focus rings on tab labels, dropdown summaries, - buttons and stretched-link cards, using `:focus-visible` so they are visible - for keyboard users but not shown on mouse click, thanks to {user}`gabalafou` - in {pr}`230` (carried in {pr}`283`) -- 👌 IMPROVE: Each tab label now carries an `aria-controls` attribute - referencing its content panel's id, establishing the programmatic - relationship in the accessibility tree (note: this is not a full WAI-ARIA - tabs pattern; assistive-technology support for `aria-controls` varies) - ({pr}`283`, {issue}`30`) -- 🐛 FIX: `card`/`grid-item-card` `:link:` no longer strips whitespace from reference targets (and lowercases them for `link-type: ref`, matching the `:ref:` role), completing the fix for {issue}`110` ({pr}`282`) -- 🐛 FIX: `button-ref` no longer strips whitespace from reference targets, so - multi-word labels (e.g. from `autosectionlabel`) resolve correctly - ({pr}`281`, {issue}`110`) -- 🐛 FIX: `button-ref` now renders rich/nested inline content (emphasis, icons, - etc.) identically to `button-link`, instead of flattening it to plain text - during cross-reference resolution ({pr}`281`, {issue}`228`) -- 🐛 FIX: Inline icon roles no longer leak SVG markup into toctree labels and the search index ({pr}`279`, {issue}`99`) -- 🐛 FIX: `article-info` octicons regain their `sd-pr-2` spacing class (previously silently dropped by the HTML writer) ({pr}`279`) -- 🐛 FIX: Paragraphs inside dropdowns no longer have user classes overwritten by `sd-card-text`, and card/dropdown body styling is applied only to direct child paragraphs, not nested content ({pr}`278`, {issue}`40`) -- ✨ NEW: `sphinx_design.testing` module with the `normalize_doctree_xml` helper, for downstream extensions' doctree regression tests ({pr}`277`, {issue}`260`) -- ♻️ IMPROVE: Static assets (CSS/JS) are now served via Sphinx's standard - `html_static_path` mechanism, rather than being written directly into the - build output; non-HTML builds no longer gain a spurious - `_sphinx_design_static` directory ({pr}`276`, {issue}`200`, {issue}`235`). - A stale `_sphinx_design_static` directory left in an existing HTML build - directory by previous versions is unused and can safely be deleted. -- ⬆️ UPGRADE: Sphinx `>=7.2` is now required ({pr}`276`) -- 🗑️ REMOVE: The private `sphinx_design._compat.findall` helper has been - removed (docutils `Element.findall` is guaranteed by the Sphinx floor); - any code importing it should call `node.findall(...)` directly ({pr}`276`) -- 🐛 FIX: buttons are no longer destroyed by gettext translation: - translated `button-link`/`button-ref` keep their styling and links - (gettext now targets only the button text), thanks to {user}`sneakers-the-rat` - in {pr}`264` ({issue}`96`, {issue}`44`, {issue}`263`) - -## 0.7.0 - 2025-01-19 +## 0.8.0 - 2026-11-10 + +New components (accordion, aside, steps, vertical tab sets, and explicit card header and footer directives), +links that open in a new tab, badge tooltips, a plain-CSS build with no Sass, +tab selections that persist across pages and visits, accessibility fixes, FontAwesome v6 support, +and Octicons v19.42.0. Sphinx 7.2 or later is now required. + +### Upgrade notes + +- **Sphinx `>=7.2` is required** (Sphinx 7.0 and 7.1 are no longer supported); Python stays at `>=3.11` ({pr}`276`). +- **The `^^^` and `+++` card separators are deprecated and warn by default.** + They still render as before, but the first card in a document that uses them emits one + `design.card_legacy` warning, so a build run with `-W` fails until you do one of two things: + - move the header and footer into the new `card-header` and `card-footer` directives + (or the one-line `:header:` and `:footer:` options), which need sphinx-design 0.8.0 or later; or + - add `"design.card_legacy"` to `suppress_warnings` in your `conf.py`. + + Once every card is migrated, set `sd_card_legacy_separators = False` to stop scanning for the separators. + The plan is to turn the separators off by default in 1.0 and remove them in 2.0; + the cards page has a migration table ({pr}`294`). +- **Tab selections persist in `localStorage`** instead of `sessionStorage`, so a chosen tab is remembered + across browsing sessions as well as across pages. + The storage key prefix is set by the new `sd_tabs_storage_prefix` option; + set it to an empty string to disable persistence ({pr}`284`). +- **Static assets are served through Sphinx's `html_static_path`**, only for HTML-format builders. + A `_sphinx_design_static` directory left in an existing build directory by an earlier version is unused + and can be deleted ({pr}`276`). +- **The stylesheet is plain CSS**, generated without Sass. + The `--sd-color-*-highlight` hover and focus shades are now derived at runtime with `color-mix()` + (behind the old value as a static fallback), so overriding a `--sd-color-*` variable now also changes its hover shade ({pr}`290`). +- **The private `sphinx_design._compat.findall` helper is removed**; call `node.findall(...)` directly ({pr}`276`). + The private `CardDirective._create_component` method is renamed `_create_slot`; + the old name stays as an alias for one release ({pr}`294`). +- **`sd-card-text` is added only to the direct child paragraphs** of a card or dropdown body, and is added to + a paragraph's classes instead of replacing them; paragraphs nested deeper (in admonitions, lists, nested tab sets) + no longer get it ({pr}`278`). + +### New + +- ✨ `accordion` directive: groups `dropdown`s so that opening one closes the others, + using the browser's native `
` behaviour with no JavaScript; `:flush:` renders it edge to edge + by {user}`chrisjsewell` in {pr}`291` +- ✨ `aside` directive: a call-out box floated beside the body text (`:align:`, `:width:`), + rendered as a semantic `