Repository navigation
(ignore) just having fun playing in the playground - #8632
siddharthkp wants to merge 25 commits into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
🦋 Changeset detectedLatest commit: 398da77 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
|
🤖 Lint issues have been automatically fixed and committed to this PR. |
|
🤖 Lint issues have been automatically fixed and committed to this PR. |
|
One or more custom setup steps configured for this repository failed during this Copilot code review run: Setup steps run before each review. If the review above is missing context, or no review was posted at all, the failing step above may be the cause. See the workflow run for failure details, fix your setup steps configuration, and re-request a review. Note You can configure setup steps for Copilot code review separately from Copilot cloud agent with a |
There was a problem hiding this comment.
🟡 Changes recommended
The documentation entry causes build:components.json to fail on an invalid story ID, while the Primer provider breaks app-level theme toggles and drops outer theme context values.
2 open issues
What changed in this PR
Packages the appearance tools from #8630 as a demo-only AppearancePlayground export from @primer/react/experimental, while reusing the implementation in existing Storybook demos.
Changes:
- Adds the wrapper with 17 themes, density and Seriousness controls, scoped content, and separate portal roots.
- Moves styles, palette data, and font assets into the package; adds portal-registration cleanup and asset copying.
- Adds usage documentation, stories, focused tests, export snapshots, and a minor changeset. Package build and test execution remain unverified.
| File | Description |
|---|---|
packages/react/src/stories/PlaygroundAppearance.tsx |
Replaces the duplicate implementation with compatibility exports. |
packages/react/src/stories/IssuesPage.stories.tsx |
Updates the documented palette-data location. |
packages/react/src/stories/ComponentGallery.stories.tsx |
Excludes nested playground discovery and updates documentation paths. |
packages/react/src/Portal/portalRoot.ts |
Adds identity-checked portal unregistration. |
packages/react/src/internal/hooks/useRegisteredPortalRoot.ts |
Manages instance-owned portal registrations. |
packages/react/src/experimental/index.ts |
Exports the experimental wrapper and props. |
packages/react/src/AppearancePlayground/README.md |
Documents usage and supported boundaries. |
packages/react/src/AppearancePlayground/index.ts |
Defines component exports. |
packages/react/src/AppearancePlayground/assets/w95fa/w95fa.woff2 |
Relocates the bundled Windows 95 font. |
packages/react/src/AppearancePlayground/assets/w95fa/OFL.txt |
Relocates the font license text. |
packages/react/src/AppearancePlayground/assets/w95fa/95CSS-LICENSE.txt |
Relocates the source redistribution notice. |
packages/react/src/AppearancePlayground/AppearancePlaygroundThemePicker.tsx |
Moves the picker and adds portal cleanup. |
packages/react/src/AppearancePlayground/AppearancePlaygroundThemePicker.module.css |
Colocates picker and palette-preview styles. |
packages/react/src/AppearancePlayground/AppearancePlayground.tsx |
Implements the wrapper, controls, and scoped surfaces. |
packages/react/src/AppearancePlayground/AppearancePlayground.tokens.ts |
Updates imports for relocated palette data. |
packages/react/src/AppearancePlayground/AppearancePlayground.test.tsx |
Adds attribute, state, isolation, cleanup, and rendering tests. |
packages/react/src/AppearancePlayground/AppearancePlayground.stories.tsx |
Adds default and interactive playground stories. |
packages/react/src/AppearancePlayground/AppearancePlayground.stories.module.css |
Styles the example app. |
packages/react/src/AppearancePlayground/AppearancePlayground.sources.json |
Relocates palette values and provenance. |
packages/react/src/AppearancePlayground/AppearancePlayground.module.css |
Colocates wrapper styles and the font declaration. |
packages/react/src/AppearancePlayground/AppearancePlayground.features.stories.tsx |
Demonstrates independent instances and remounting. |
packages/react/src/AppearancePlayground/AppearancePlayground.docs.json |
Adds draft component metadata and story references. |
packages/react/src/AppearancePlayground/AppearancePlayground.brands.json |
Relocates brand preset values and source notes. |
packages/react/src/__tests__/__snapshots__/exports.test.ts.snap |
Records the new experimental exports. |
packages/react/script/build |
Copies font assets and notices into package output. |
.changeset/experimental-appearance-playground.md |
Declares the experimental addition as a minor release. |
Review effort: Balanced
| <ThemeProvider | ||
| contextOnly | ||
| colorMode={palette ? (palette.mode === 'dark' ? 'night' : 'day') : undefined} | ||
| dayScheme={palette ? 'light' : undefined} | ||
| nightScheme={palette ? 'dark' : undefined} |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
🤖 Lint issues have been automatically fixed and committed to this PR. |
Keep Friendly social pink and purple, make Bank security neutral and raised, and resolve the extraction's CI lint findings. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
🤖 Lint issues have been automatically fixed and committed to this PR. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
🤖 Lint issues have been automatically fixed and committed to this PR. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Replaced native browser-side-panel controls with an in-page floating panel docked at the top right (8ef73e1), following the requested Arc-compatible direction. The extension icon toggles it; Close dismisses the UI without removing preview styles. Controls are isolated in an extension frame inside a closed shadow root, with requests restricted to the containing website tab. Removed the sidePanel permission. Browser verification passed in Chrome for Testing 153: real toolbar activation; top-right geometry; all 19 themes; Density and Seriousness; variable editing and dynamic portals; reset; close/reopen and icon toggle; independent tabs and cross-tab request rejection; 390px/1512px layouts; reload cleanup; unsupported-page badge; restrictive host frame-src/style-src CSP. No page errors or captured worker errors; editor diagnostics clean. Arc itself remains unverified. No repository tests/builds/typechecks/linters or dependency installs were run, as requested. |
|
🤖 Lint issues have been automatically fixed and committed to this PR. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Added MS DOS, inspired by noted.computer’s public Turbo blue palette: deep blue surfaces, cyan text, yellow accents, green actions, square controls and hard pixel shadows. Shared preset is available in all playgrounds and the floating extension (20 total themes). Added a dedicated MS DOS Storybook story. Bundled the unmodified 5 KB PxPlus IBM VGA 9x16 font by VileR under CC BY-SA-4.0, including attribution, full license and source checksum in both the package and ready-to-load extension. No runtime requests to the reference website are needed. Existing minor changeset remains accurate. Browser verification passed in Chrome for Testing 153: all 20 extension themes; MS DOS font loading on an independent page with no Storybook font styles (9px monospace glyph metrics at 16px); existing Windows 95 font still loads; MS DOS story play completes; square controls; blue VGA-themed inherited dialog; existing floating-UI reset/tab isolation/CSP checks. No browser page or captured worker errors; editor diagnostics clean. Repository tests/builds/typechecks/linters were not run, as requested. Updated extension ZIP; selected MS DOS in the shared Noodles preview. |
|
🤖 Lint issues have been automatically fixed and committed to this PR. |
Keep invisible actions on the theme foreground while preserving dark text on filled controls. Cover the four reported Noodles controls in a dedicated MS DOS interaction story and refresh extension presets. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep palette sources and attribution in the manifests and documentation without rendering them in the theme picker. Cover source-copy removal in the MS DOS story. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
🤖 Lint issues have been automatically fixed and committed to this PR. |
Share the real palette grid, previews and density/Seriousness dials with the on-page extension sidebar. Preserve tab-bound preview controls and variable overrides, package the UI locally with dependency licenses, and cover sidebar interactions in Storybook. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
🤖 Lint issues have been automatically fixed and committed to this PR. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
🤖 Lint issues have been automatically fixed and committed to this PR. |


No linked issue. Stacked on #8630, which supplies the existing component CSS hooks and playground.
Package the existing appearance toolbar and searchable theme sheet as a demo-only
AppearancePlaygroundexport from@primer/react/experimental.This is a draft experiment, not a production theme-system proposal or a package
already published to npm.
Keep the app's normal Primer providers and base styles, then wrap its content:
The wrapper includes all 17 themes, five density steps, the five visual-only
Seriousness presets, a scoped content surface and a separate themed Primer
portal root. Its controls and theme sheet retain the host theme.
Normal div attributes, class names and styles are forwarded to the wrapper.
Changelog
New
AppearancePlaygroundandAppearancePlaygroundPropsexports; no stable entrypoint additions.Changed
PageLayout.Sidebar,PageLayout.Content, andPageLayout.Pane. Native drag and keyboard resizing support a 240–480px sidebar, retain its width through hiding and focus mode for the current page session, and reset to 312px on double-click or reload. Story-local height and responsive rules preserve independent scrolling and narrow-screen stacked comments. No PageLayout component-source changes are added.Removed
Rollout strategy
Opt-in, experimental, internal-demo use only. This intentionally exposes a narrow
config wrapper around the existing presentational pieces instead of promoting
its provider, state helpers or palette data into a supported API.
This is a deliberate demo-only exception to waiting for a stable product pattern
before adding a config component.
No persistence, controlled state or remote themes. Use one wrapper per app
subtree; sibling wrappers are independent but nesting is unsupported. Primer
portals that inherit its context are captured; explicit container overrides and
third-party/body portals are not. Custom app CSS/layouts may need token mappings.
Restrictive inline-style CSP and transformed/clipping ancestors need app-specific
handling. Brand presets are independent adaptations, not official brand components;
Glass UI remains a flat/translucent approximation. Seriousness has no security effect.
Testing & Reviewing
Passed
NOODLES_PORT=6009 node /Users/siddharth/.copilot/session-state/ffb7aa4f-c550-485f-b591-35469fa88108/files/verify-noodles-pagelayout.mjs— passed against this PR's own Storybook preview. This session-only Playwright harness is not included in the PR. It verified real pointer dragging, keyboard resizing, 240/480px bounds, double-click reset, width retention through sidebar toggles/focus mode, pinned header/footer, independent document/navigation scrolling, wide mode, desktop/stacked comments, and 320/390/767/768/1000px layouts. Noodles Theme and Local Interactions play functions passed, including the new keyboard-resize assertions; no page overflow or JavaScript errors were observed.node_modules/.bin/prettier --writepassed for edited supported sources. The generated export snapshot retains its generator format with--parser babel --semi. Initial isolated-worktree formatter resolution failed and an npx cache fallback was inadvertently invoked; final formatting reused existing dependencies. No project dependency manifests or lockfiles changed.Not run
Per the request,
npm test,npm run build,npm run type-check,npm run lintand
npm run lint:csswere not run.Focused unit tests were added but not executed. The package build/tarball and npm
consumer installation remain unverified; asset packaging was inspected statically,
not presented as a successful package build. Deployment-preview readiness is not verified.
Review
Local stories: