Repository navigation
feat: add Press theme families and extensible appearance controls - #623
Merged
Mohamed Mansour (mohamedmansour) merged 5 commits intoOct 30, 2026
Merged
Mohamed Mansour (mohamedmansour) merged 5 commits into
Mohamed Mansour (mohamedmansour) merged 5 commits into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Mohamed Mansour (mohamedmansour)
requested review from
Bang Lee (Qusic),
atul (atulkatti),
mcritzjam and
mddinbox
October 30, 2026 19:29
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
mddinbox
reviewed
Oct 30, 2026
mddinbox
left a comment
Contributor
There was a problem hiding this comment.
Target: 6ceba63...8a75fa8 | Coverage: complete; CI: PR Checks, CodeQL, Docs, FFI, E2E (Ubuntu), Test, Build (Linux/macOS/Windows) — success
Challenge: 1 confirmed; Compatibility: strict-script-src deployments lose interactive appearance controls
Action: COMMENT | The CSP initialization failure is detailed inline.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Collect inline script hashes from a script-disabled, network-blocked browser document instead of matching HTML with a regular expression. Cover whitespace-terminated end tags, quoted attributes, external scripts, inert JSON, and bootstrap exclusion.
Bang Lee (Qusic)
approved these changes
Oct 30, 2026
Mohamed Mansour (mohamedmansour)
deleted the
mohamedmansour-press-theming-integrations
branch
October 30, 2026 22:58
mcritzjam
approved these changes
Oct 30, 2026
Mohamed Mansour (mohamedmansour)
added a commit
that referenced
this pull request
Oct 31, 2026
## Release Bumps WebUI to `3.0.5`. Previous release tag: `v3.0.4` ## Changes since `v3.0.4` Features: - Press supports reusable, per-page outlines with responsive navigation (feat: redesign the docs site and add reusable page outlines #613 by @mohamedmansour). - Press tabs can synchronize categories and persist selections; package-manager preferences now follow readers across documentation pages and reloads (feat: persist package-manager tabs and simplify documentation #620 by @mohamedmansour). - Press adds independent theme families, shared appearance preferences, System/Light/Dark controls, and extensible header regions with a cacheable pre-paint initializer (feat: add Press theme families and extensible appearance controls #623 by @mohamedmansour). Fixes: - Hydrate conditional and repeated SSR ranges in place, avoiding unnecessary custom-element disconnect/reconnect cycles and correcting trailing formatting whitespace (fix: hydrate SSR block ranges in place #619 by @mohamedmansour). - Preserve pending development-server file events by retargeting the existing watcher instead of replacing it after rebuilds (fix: retarget the dev-server watcher instead of replacing it #622 by @mohamedmansour). - Remove unapproved transitive TLS/WebSocket crypto dependencies while retaining HTTP/2 support. The commerce example now serves HTTP/1.1 and h2c behind a TLS-terminating ingress; its direct TLS flags are removed (fix: remove unapproved crypto dependencies #596 by @mohamedmansour). Docs: - Redesign the documentation homepage and reading experience, organize guides into Start/Learn/Build/Reference with legacy redirects, and simplify installation and package-manager instructions (feat: redesign the docs site and add reusable page outlines #613 by @mohamedmansour, chore: clarify the homepage and organize documentation #617 by @mohamedmansour, feat: persist package-manager tabs and simplify documentation #620 by @mohamedmansour). - Refresh benchmark previews, methodology, and downloadable results around the uniform 15-case official WebUI 3.0.4 campaign, including provenance and unavailable memory-sample disclosures (docs: support the uniform 15-case official benchmark campaign #614 by @mohamedmansour). - Update source-build requirements, Rust writer guidance, and Press appearance configuration and deployment documentation (chore: upgrade Rust to 1.99.1 #612 by @mohamedmansour, perf: reduce renderer output allocations #615 by @mohamedmansour, feat: add Press theme families and extensible appearance controls #623 by @mohamedmansour). Maintenance: - Reduce renderer allocation churn by writing escaped values directly into output buffers, reusing attribute buffers, and borrowing quoted condition text (perf: reduce renderer output allocations #615 by @mohamedmansour). - Share eligible Link stylesheets across component mounts within a document, preserving native first-use loading and avoiding repeated parsing on subsequent uses (perf: share Link stylesheets across component mounts #621 by @mohamedmansour). - Align development and release toolchains on Rust 1.99.1; consumers building from source now require Rust 1.99.1 or newer (chore: upgrade Rust to 1.99.1 #612 by @mohamedmansour). ## Validation - `cargo xtask check` passed, including lint, protocol drift, dependency audit, tests, native/WASM builds, examples, benchmark validation, and docs. - Used `WEBUI_PRESS_BINARY_PATH` to select the freshly built workspace Press 3.0.5 binary instead of an older global installation. - Refreshed the standalone Tauri lockfile with Cargo; all 45 changed files contain only `3.0.4` to `3.0.5` substitutions.
Mohamed Mansour (mohamedmansour)
added a commit
that referenced
this pull request
Oct 31, 2026
…etargeting (#622) No textual conflicts. Cargo.lock, DESIGN.md, docs/ai.md, the Press bundler and the Press package manifest auto-merged; this branch's explicit runtime.js/styles.js entry imports and main's appearance plugin and alias are independent. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 90a93005-7b2a-4ea4-bce5-902f79da872d
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Press consumers currently have to duplicate theme CSS generation, pre-paint preference restoration, and header customization to support multiple design families. This adds a shared appearance integration without coupling Press to a particular component library.
Approach
initialvalues, missing-token resets, and consumer stylesheet precedence.@microsoft/webui-press/appearance.jsAPI. Keep family and System/Light/Dark preferences independent, synchronize OS and cross-tab changes, and use native view transitions for user changes while respecting reduced motion and forced colors.Compatibility and migration
Legacy
themeconfiguration remains a single-family integration; do not combine it withappearance. Render metadata is namespaced underwebuiPress.appearanceto avoid collisions with component properties. Existingdata-themeCSS remains usable, and content-only builds continue following the OS without consuming shell preferences or emitting the initializer.Deploy the generated initialization asset with the rest of the site and authorize it in the site's CSP. The site's other generated scripts still require their own CSP authorization; this does not claim that
script-src 'self'alone authorizes all existing inline hydration payloads.The companion consumer migration must follow a release containing this feature and matching compiler/framework packages. Its local preview package links are not included in this PR.
CSS size
Measured with the same three official theme snapshots and exact token-parity assertions. The previous generator was reconstructed from frozen source rather than a preserved build directory.
Initialization moves 2,218 bytes into one shared asset (866 bytes gzip), replacing the repeated inline initializer in each page. This adds one cacheable request on a cold load.
Validation
cargo xtask check, including documentation and example builds.Screenshots
Only this repository's
/docssite is shown. It has one configured theme family, so the family select is intentionally omitted while System/Light/Dark controls remain available.Desktop
Mobile