Repository navigation
Conversation
houko
force-pushed
the
feat/editor-spec-tokens-1002
branch
from
November 26, 2026 11:37
7628d71 to
6f268b6
Compare
houko
force-pushed
the
feat/editor-spec-tokens-1002
branch
from
November 26, 2026 12:11
6f268b6 to
f3467a9
Compare
houko
force-pushed
the
feat/editor-spec-tokens-1002
branch
from
November 26, 2026 12:30
f3467a9 to
49d9a42
Compare
…d zero-literal enforcement (#1002)
…ken and keep problem rows mounted across live rechecks
houko
force-pushed
the
feat/editor-spec-tokens-1002
branch
from
November 26, 2026 12:48
49d9a42 to
4cf7a95
Compare
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.
Summary
Implements the NSGo Game Editor design token system from
docs/design/editor/Spec.dc.htmlanddocs/design/editor/Viewport3D.dc.htmlas the editor's single source of truth:packages/game/editor/spec_theme.yaml) &SpecPalette(spec_theme.go):core.ParseThemeand attaches atEditorView's root scope viacx.SetTheme(SpecTheme()).core.Palette/ui.ColorsOfrole (Background,Surface,Raised,Line,Border,Text,TextMuted,Accent,AccentText: #101216,Success,Warning,Danger,Focus) onto the Spec tokens in both dark and light appearances.AxisX,AxisY,AxisZ),Viewport3DGround,Viewport3DGrid,HoverOverlay,ActiveOverlay, andPrimaryHoverfromViewport3D.dc.html.SpecFontTitleSize/Weight14/600, body 12.5/400, section 11/600 +6% tracking, JetBrains Mono 11.5), spacing scale (4, 8, 12, 16, 24), radii (6, 8, 12, 18), heights (28, 30, 32, 44, minimum hit area28x28),1pxinner border, and motion durations (120ms,180ms,240ms,1.6spulse) disabled cleanly underEnv.ReduceMotion()(SpecMotionDuration,SpecAgentPulseOpacity).packages/game/editor:core.RGB/core.RGBAand hex color literals across panels, 2D/3D viewports, gizmos, handles, overlays, and debug layers withSpecPalettetokens (keeping scene-content defaults such asBackgroundColoras scene data).scene-tree-panel,layers-panel,asset-browser,file-browser,library-panel) to render inpanel(colors.Surface()) withlineborders, updatedInspectorViewto inheritSpecTheme()/Editor.SpecPalette(cx)live in both dark and light modes, and updated the toolbar scene title to14/600.spec_theme_test.go,editorcmd/theme_screenshot_test.go):TestSpecContrastTableDarkAndLight: measures WCAG 2.2 luminance contrast for every pair in the Spec contrast table fromspec_theme.yaml(failing below4.5:1for text/on-fill or3.0:1for UI/overlay edges & 3D axes).TestSpecContrastTableRejectsRetiredMutedColor: verifies mutating darktextMuted/specTextFaintback to#6F7684fails the contrast table.TestSpecNoHardcodedColorLiteralsInEditor: AST scan refusingcore.RGB/core.RGBAcalls or hardcoded UI hex literals anywhere inpackages/game/editoroutsidespec_theme.go.TestSpecEditorChromeRegionsAndSelectionOutline: verifies rootbg, toolbar/status barraised+line, toolbar title14/600, side panels & inspectorpanel+line, viewport surround, and 2D selection outline inaccentacross dark and light modes.TestSpecLightAndDarkThemeMacOSScreenshots: real macOSnsgotestscreenshots (spec-editor-dark,spec-editor-light,spec-overlay-legend-dark/light,spec-toasts-dark/light).docs/en/editor.mdanddocs/zh/editor.md..github/PULL_REQUEST_TEMPLATE.md..agents/notes/implemented/feature/2026-11-26-editor-spec-design-tokens.md) and changelog fragment (changelog.d/editor-spec-design-tokens.md).Related issue
Closes #1002
Verification
git ls-files -z -- '*.go' | xargs -0 gofmt -lproduced no outputgo run ./cmd/gameschema -checkpassedgo tool nsgo check -target macos_arm64passed (Depot CI checks all targets + iOS)go tool nsgo test -run "TestSpec|TestEditorSystemAppearance|TestEditorToast|TestToastView" ./editor/...passed (14/14)go tool nsgo test -target macos -run "TestSpecLightAndDarkThemeMacOSScreenshots" ./editor/editorcmdpassed and generated real macOS screenshotsgo run ./tools/changelog checkpassedbun run verify-notespasseddocs/en/editor.mdanddocs/zh/editor.mdupdatedAcceptance for every editor PR
nsgoteston macOS, before and after, beside the matching artboard (TestSpecLightAndDarkThemeMacOSScreenshots:spec-editor-dark,spec-editor-light,spec-overlay-legend-dark/light,spec-toasts-dark/light).packages/game/editor/spec_theme.yaml(SpecPalette), and every text pair is in the WCAG 2.2 contrast table.Tab,F6, or arrow keys.