Repository navigation
Upgrade Classicy from 0.6.31 to 3.4.0 - #59
Open
robbiebyrd wants to merge 1 commit into
Open
robbiebyrd wants to merge 1 commit into
robbiebyrd wants to merge 1 commit into
Conversation
Classicy 3 is published as `@classicy/classicy` with its Platinum look split into `@classicy/appearance-platinum`. This swaps the dependency and adapts the `@city/classicyui` wrapper to the v3 styling model: - Import the Platinum package (registers it and injects its CSS/fonts) and drop the hand-rolled `classicy.css?raw` injection; the core self-injects. - Render the `.classicyDesktop[data-classicy-appearance=platinum]` scope that all Platinum rules require, as a `display: contents` element so the core's desktop box rules do not affect layout. Tooltip and popover portals mount into that scope via a new `useClassicyPortalContainer` context. - Classicy 3 ships its CSS in `@layer classicy.*` and prepends it to <head>, so Tailwind's preflight was erasing button borders, radii and disabled faces. Pin the layer order with Classicy last, which preserves the precedence of the old unlayered 0.x stylesheet (`!` utilities still win). - Follow v3 class renames: `classicyButtonDefault` -> `default`, `ClassicyCheckbox` -> `classicyCheckbox classicyCheckboxX`, `ClassicyCheckboxMixed` -> `mixed`; drop `classicyWindowActive`. - Apply v3's default `md` padding/margin variant classes in ClassicyButton, as upstream's own button does (v3 moved padding off `.classicyButton`). - Mark explicit app min/height sizes on buttons `!important` where v3's new min-width/min-height rules would otherwise override them. - Exclude both packages from Vite dep pre-bundling (asset URLs rely on `import.meta.url`), per the Platinum README. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@robbiebyrd is attempting to deploy a commit to the cehrlich's projects Team on Vercel. A member of the Team first needs to authorize it. |
This branch has not been deployed
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.
This PR...
Upgrades the
classicypackage to its latest. Because I made so many breaking changes, I thought it was my duty to post this PR here. Thanks for your consideration and for using my little UI package!Summary
Upgrades the Classic Mac OS UI framework from
classicy@0.6.31to@classicy/classicy@3.4.0. In v3 the package was renamed and the Platinum look moved into@classicy/appearance-platinum. Onlypackages/classicyuiimports Classicy directly, so most of the change stays in that wrapper.Dropping 0.6.31 also removes ~300 transitive packages (e.g.
@mdxeditor/editor,@tailwindcss/vitewere runtime deps of the old package).What changed and why
Dependency and runtime wiring (
packages/classicyui)@classicy/classicy+@classicy/appearance-platinum, both^3.4.0.@classicy/appearance-platinumregisters Platinum and injects its stylesheet and fonts. The v3 core also injects its own base CSS, so the hand-rolled../node_modules/classicy/dist/classicy.css?rawinjection (and the*.css?rawtype shim) is gone..classicyDesktop[data-classicy-appearance=platinum], which<ClassicyDesktop>normally renders. Micropolis doesn't use<ClassicyDesktop>, soClassicyRuntimeProviderrenders that scope itself.display: contents, so the core's desktop box rules (full size,overflow: hidden, wallpaper) don't touch layout.useClassicyPortalContainer()hook, so they keep the Platinum look.Cascade layers (the important one)
@layer classicy.*and prepends its<style>tags to<head>. Its layers are therefore declared first and rank lowest, which let Tailwind's preflight (button { border: 0; background: transparent; border-radius: 0 }) erase button borders, corner radii and the greyed-out disabled state.@layer theme, base, components, utilities, classicy;ahead of everything else. Putting Classicy last keeps the precedence the 0.x unlayered stylesheet had: Classicy beats non-important utilities, and!utilities (!m-0, …) still override Classicy. That is the model the existing call sites are written against.classicyjust abovebase). It brought back many utilities that had never visibly applied (text-[11px],px-2 py-1,border-2,bg-*), so I rejected it.v3 class renames
classicyButtonDefault→default(the default ring is now drawn by Platinum).ClassicyCheckbox→classicyCheckbox classicyCheckboxX(theXvariant keeps the classic×mark), andClassicyCheckboxMixed→mixed.classicyWindowActivewas removed in v3 (inactive windows get*Dimmedclasses instead), so the dialog no longer adds it.Sizing
.classicyButtonintoclassicyButtonPadding*andclassicyButtonMargin*variants.ClassicyButtonnow applies theMdvariants, as upstream's own button does; without them buttons were about 6px shorter.min-height, a 58px HIGmin-widthand a small-squareheight. Where the app sets an explicit size (h-9/min-h-9tool palette,min-w-*on menu and toolbar buttons, the window close button, toggle segments), that utility is now!-prefixed so it still wins.Vite
optimizeDeps, per the Platinum README: their fonts, art and sounds load vianew URL('assets/…', import.meta.url), which pre-bundling breaks.Verification
pnpm typecheck: passes in all 12 packages.pnpm lint: 0 errors. The 7 warnings are pre-existing ones inapps/scenario-editor.pnpm build(web and scenario editor): succeeds.pnpm test: all suites pass under Node 24.@city/webintermittently fails to start forks workers (ERR_REQUIRE_ESM) for 2 files. This reproduces identically onmain, andapps/webpasses 3/3 when run on its own.main:main.forwardRefconsole warning from Classicy 0.6 is gone.Notes
🤖 Generated with Claude Code