From 0b23bf8a13c18a9aa4da2ef093765e477b928a4b Mon Sep 17 00:00:00 2001 From: Jeff Merrick Date: Mon, 29 Jun 2026 13:51:18 -0500 Subject: [PATCH 1/7] Redesign language chooser as a card with a left-label toolbar MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Convert the type="language" pulumi-chooser into a bordered card: a gray top toolbar showing the active language's colored logo + full name on the left and full-height underline-style abbreviation tabs (TS, PY, GO, …) on the right, with the slotted code/prose below. Scoped to non-headless language choosers; other chooser types and inline/headless choosers are unchanged. - chooser.tsx: add per-language `logo`, render the toolbar + abbreviation tabs for language, helper for tab labels; extend e2e coverage. - _chooser.scss: card + toolbar styling via semantic --docs-* tokens (dark mode for free); collapse code-unit margins at choosable edges (.highlight / .example-program) and drop top margin after a p/ul/ol; flush example-program panels. - _docs-theme.scss: dark overrides for the new toolbar tabs (the unlayered `*` border reset would otherwise win) and scope note status-icon color to .icon-and-line so copy buttons aren't tinted. - _copy-button.scss: match the code block background with a gray outline. - _notes.scss: scope note icon color/size to .icon-and-line; scope the last-child padding reset to content blocks so copy buttons aren't hit. - _code.scss: example-program footer uses the code background, fix the GitHub tooltip positioning and shrink its icon. Co-Authored-By: Claude Opus 4.8 --- layouts/partials/example-program.html | 2 +- layouts/shortcodes/example-program.html | 2 +- theme/src/scss/_code.scss | 22 ++- theme/src/scss/_copy-button.scss | 12 +- theme/src/scss/_notes.scss | 46 +++--- theme/src/scss/components/_chooser.scss | 139 ++++++++++++++++++ theme/src/scss/docs/_docs-theme.scss | 56 +++++-- .../src/components/chooser/chooser.e2e.ts | 38 +++++ .../src/components/chooser/chooser.scss | 6 +- .../src/components/chooser/chooser.tsx | 63 ++++++-- 10 files changed, 334 insertions(+), 52 deletions(-) diff --git a/layouts/partials/example-program.html b/layouts/partials/example-program.html index 2e22f1679d86..0fdb859933d7 100644 --- a/layouts/partials/example-program.html +++ b/layouts/partials/example-program.html @@ -74,7 +74,7 @@
{{ highlight $code $language }}
-