@thanhnguyxn/pixelcraft 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/plugins/marketplace.json +20 -0
- package/.claude-plugin/marketplace.json +20 -0
- package/.claude-plugin/plugin.json +11 -0
- package/LICENSE +21 -0
- package/README.md +407 -2
- package/assets/README.md +28 -0
- package/assets/pixelcraft-logo-512.png +0 -0
- package/bin/pixelcraft.mjs +444 -0
- package/docs/ARCHITECTURE.md +102 -0
- package/docs/DESIGN-RATIONALE.md +143 -0
- package/evals/README.md +27 -0
- package/evals/fixtures/README.md +36 -0
- package/evals/fixtures/direction-prototype-complexity.json +29 -0
- package/evals/fixtures/finish-gate-anti-slop.json +30 -0
- package/evals/fixtures/forms-accessibility-negative.json +29 -0
- package/evals/fixtures/handoff-fidelity-tolerance.json +29 -0
- package/evals/fixtures/plan-brownfield-evidence.json +28 -0
- package/evals/fixtures/visual-qa-task-evidence.json +29 -0
- package/evals/fixtures/workflow-checkpoints.json +30 -0
- package/evals/pixelcraft-accessibility.md +57 -0
- package/evals/pixelcraft-brandkit.md +58 -0
- package/evals/pixelcraft-chat-ui.md +55 -0
- package/evals/pixelcraft-constrained.md +55 -0
- package/evals/pixelcraft-craft.md +60 -0
- package/evals/pixelcraft-data-apps.md +55 -0
- package/evals/pixelcraft-dataviz.md +59 -0
- package/evals/pixelcraft-desktop.md +55 -0
- package/evals/pixelcraft-direction.md +60 -0
- package/evals/pixelcraft-document.md +55 -0
- package/evals/pixelcraft-email.md +55 -0
- package/evals/pixelcraft-extensions.md +55 -0
- package/evals/pixelcraft-game-ui.md +59 -0
- package/evals/pixelcraft-handoff.md +57 -0
- package/evals/pixelcraft-media.md +55 -0
- package/evals/pixelcraft-mobile.md +59 -0
- package/evals/pixelcraft-patterns.md +57 -0
- package/evals/pixelcraft-plan.md +65 -0
- package/evals/pixelcraft-review.md +63 -0
- package/evals/pixelcraft-spatial.md +55 -0
- package/evals/pixelcraft-tokens.md +57 -0
- package/evals/pixelcraft-tui.md +55 -0
- package/evals/pixelcraft-ux.md +59 -0
- package/evals/pixelcraft-visual-qa.md +80 -0
- package/evals/pixelcraft-web.md +71 -0
- package/evals/pixelcraft.md +70 -0
- package/gemini-extension.json +5 -0
- package/install.ps1 +295 -0
- package/install.sh +437 -0
- package/package.json +63 -4
- package/plugin.json +24 -0
- package/scripts/build-adapters.mjs +290 -0
- package/scripts/build-release-archives.mjs +61 -0
- package/scripts/build-skill-zips.mjs +94 -0
- package/scripts/test-build-adapters.mjs +48 -0
- package/scripts/test-distribution.mjs +124 -0
- package/scripts/test-export-tokens.mjs +105 -0
- package/scripts/test-finish-gate.mjs +148 -0
- package/scripts/test-installers.mjs +67 -0
- package/scripts/test-release-archives.mjs +42 -0
- package/scripts/test-shoot.mjs +65 -0
- package/scripts/test-slop-scan.mjs +29 -0
- package/scripts/test-style-inventory.mjs +211 -0
- package/scripts/test-validate-skills.mjs +117 -0
- package/scripts/validate-skills.mjs +512 -0
- package/skills/pixelcraft/SKILL.md +135 -0
- package/skills/pixelcraft/references/design-brief.md +75 -0
- package/skills/pixelcraft/references/floor.md +73 -0
- package/skills/pixelcraft/references/report-template.md +35 -0
- package/skills/pixelcraft/references/stack-detection.md +155 -0
- package/skills/pixelcraft/references/surface-acceptance.md +40 -0
- package/skills/pixelcraft/references/workflow-checkpoints.md +29 -0
- package/skills/pixelcraft-accessibility/SKILL.md +33 -0
- package/skills/pixelcraft-accessibility/references/apg-patterns.md +51 -0
- package/skills/pixelcraft-accessibility/references/platforms.md +58 -0
- package/skills/pixelcraft-accessibility/references/verification.md +59 -0
- package/skills/pixelcraft-accessibility/references/wcag22-checks.md +66 -0
- package/skills/pixelcraft-brandkit/SKILL.md +115 -0
- package/skills/pixelcraft-brandkit/references/asset-pipeline.md +125 -0
- package/skills/pixelcraft-brandkit/references/brand-governance.md +80 -0
- package/skills/pixelcraft-brandkit/references/layouts.md +88 -0
- package/skills/pixelcraft-brandkit/references/logo-concepting.md +83 -0
- package/skills/pixelcraft-brandkit/references/logo-methods.md +98 -0
- package/skills/pixelcraft-brandkit/references/pixel-art-logos.md +82 -0
- package/skills/pixelcraft-brandkit/references/prompt-template.md +85 -0
- package/skills/pixelcraft-brandkit/references/qa-checklist.md +88 -0
- package/skills/pixelcraft-brandkit/references/visual-modes.md +123 -0
- package/skills/pixelcraft-chat-ui/SKILL.md +53 -0
- package/skills/pixelcraft-chat-ui/references/conversation-design.md +78 -0
- package/skills/pixelcraft-chat-ui/references/mobile-business-platforms.md +87 -0
- package/skills/pixelcraft-chat-ui/references/slack-discord.md +96 -0
- package/skills/pixelcraft-constrained/SKILL.md +51 -0
- package/skills/pixelcraft-constrained/references/specialized-hardware.md +66 -0
- package/skills/pixelcraft-constrained/references/tv-wearables.md +84 -0
- package/skills/pixelcraft-constrained/references/voice-ui.md +63 -0
- package/skills/pixelcraft-craft/SKILL.md +44 -0
- package/skills/pixelcraft-craft/references/color.md +69 -0
- package/skills/pixelcraft-craft/references/imagery-icons.md +37 -0
- package/skills/pixelcraft-craft/references/layout-quality.md +65 -0
- package/skills/pixelcraft-craft/references/layout.md +41 -0
- package/skills/pixelcraft-craft/references/motion.md +76 -0
- package/skills/pixelcraft-craft/references/typography.md +71 -0
- package/skills/pixelcraft-data-apps/SKILL.md +67 -0
- package/skills/pixelcraft-data-apps/references/dash.md +53 -0
- package/skills/pixelcraft-data-apps/references/evidence.md +75 -0
- package/skills/pixelcraft-data-apps/references/gradio.md +65 -0
- package/skills/pixelcraft-data-apps/references/julia-genie.md +54 -0
- package/skills/pixelcraft-data-apps/references/jupyter-widgets.md +53 -0
- package/skills/pixelcraft-data-apps/references/nicegui.md +63 -0
- package/skills/pixelcraft-data-apps/references/observable-framework.md +67 -0
- package/skills/pixelcraft-data-apps/references/panel.md +53 -0
- package/skills/pixelcraft-data-apps/references/r-shiny.md +54 -0
- package/skills/pixelcraft-data-apps/references/reflex.md +62 -0
- package/skills/pixelcraft-data-apps/references/shiny.md +53 -0
- package/skills/pixelcraft-data-apps/references/streamlit.md +65 -0
- package/skills/pixelcraft-dataviz/SKILL.md +63 -0
- package/skills/pixelcraft-dataviz/references/chart-choice.md +55 -0
- package/skills/pixelcraft-dataviz/references/color-accessibility.md +112 -0
- package/skills/pixelcraft-dataviz/references/encoding-tables-dashboards.md +97 -0
- package/skills/pixelcraft-dataviz/references/libraries.md +57 -0
- package/skills/pixelcraft-dataviz/references/realtime-graphs-maps-scale.md +99 -0
- package/skills/pixelcraft-desktop/SKILL.md +71 -0
- package/skills/pixelcraft-desktop/references/appkit.md +58 -0
- package/skills/pixelcraft-desktop/references/avalonia.md +59 -0
- package/skills/pixelcraft-desktop/references/cpp-gui.md +52 -0
- package/skills/pixelcraft-desktop/references/electron.md +54 -0
- package/skills/pixelcraft-desktop/references/go-gui.md +54 -0
- package/skills/pixelcraft-desktop/references/gtk.md +54 -0
- package/skills/pixelcraft-desktop/references/javafx-swing.md +52 -0
- package/skills/pixelcraft-desktop/references/qt-pyside-qml.md +61 -0
- package/skills/pixelcraft-desktop/references/rust-gui.md +65 -0
- package/skills/pixelcraft-desktop/references/tauri.md +54 -0
- package/skills/pixelcraft-desktop/references/uno-platform.md +52 -0
- package/skills/pixelcraft-desktop/references/winui-wpf.md +58 -0
- package/skills/pixelcraft-desktop/references/working-context.md +5 -0
- package/skills/pixelcraft-direction/SKILL.md +154 -0
- package/skills/pixelcraft-direction/references/composition-library.md +84 -0
- package/skills/pixelcraft-direction/references/direction-card.md +54 -0
- package/skills/pixelcraft-direction/references/direction-scoring.md +72 -0
- package/skills/pixelcraft-direction/references/movements.md +68 -0
- package/skills/pixelcraft-direction/references/repetition-history.md +75 -0
- package/skills/pixelcraft-direction/references/slop-fingerprints.md +58 -0
- package/skills/pixelcraft-direction/references/wildcards.md +47 -0
- package/skills/pixelcraft-document/SKILL.md +54 -0
- package/skills/pixelcraft-document/references/archetypes.md +83 -0
- package/skills/pixelcraft-document/references/pdf-tools.md +154 -0
- package/skills/pixelcraft-document/references/print-css.md +134 -0
- package/skills/pixelcraft-document/references/slides.md +102 -0
- package/skills/pixelcraft-email/SKILL.md +58 -0
- package/skills/pixelcraft-email/references/client-quirks.md +45 -0
- package/skills/pixelcraft-email/references/html-tables.md +53 -0
- package/skills/pixelcraft-email/references/mjml.md +52 -0
- package/skills/pixelcraft-email/references/react-email.md +53 -0
- package/skills/pixelcraft-extensions/SKILL.md +51 -0
- package/skills/pixelcraft-extensions/references/browser-extensions.md +31 -0
- package/skills/pixelcraft-extensions/references/figma-office.md +23 -0
- package/skills/pixelcraft-extensions/references/raycast.md +19 -0
- package/skills/pixelcraft-extensions/references/vscode-webviews.md +26 -0
- package/skills/pixelcraft-game-ui/SKILL.md +61 -0
- package/skills/pixelcraft-game-ui/references/bevy.md +52 -0
- package/skills/pixelcraft-game-ui/references/godot.md +57 -0
- package/skills/pixelcraft-game-ui/references/hud-principles.md +38 -0
- package/skills/pixelcraft-game-ui/references/love2d.md +51 -0
- package/skills/pixelcraft-game-ui/references/monogame.md +52 -0
- package/skills/pixelcraft-game-ui/references/unity-ui-toolkit.md +65 -0
- package/skills/pixelcraft-game-ui/references/unreal-umg.md +53 -0
- package/skills/pixelcraft-handoff/SKILL.md +49 -0
- package/skills/pixelcraft-handoff/references/design-translation.md +104 -0
- package/skills/pixelcraft-handoff/references/fidelity-tolerance.md +78 -0
- package/skills/pixelcraft-media/SKILL.md +52 -0
- package/skills/pixelcraft-media/references/banners-video.md +112 -0
- package/skills/pixelcraft-media/references/og-generation.md +107 -0
- package/skills/pixelcraft-media/references/social-cards.md +72 -0
- package/skills/pixelcraft-mobile/SKILL.md +69 -0
- package/skills/pixelcraft-mobile/references/dotnet-maui.md +63 -0
- package/skills/pixelcraft-mobile/references/flet.md +53 -0
- package/skills/pixelcraft-mobile/references/flutter.md +69 -0
- package/skills/pixelcraft-mobile/references/ionic-capacitor.md +65 -0
- package/skills/pixelcraft-mobile/references/jetpack-compose.md +61 -0
- package/skills/pixelcraft-mobile/references/kivy.md +59 -0
- package/skills/pixelcraft-mobile/references/kotlin-multiplatform.md +60 -0
- package/skills/pixelcraft-mobile/references/react-native-expo.md +71 -0
- package/skills/pixelcraft-mobile/references/swiftui.md +70 -0
- package/skills/pixelcraft-mobile/references/task-state-composition.md +5 -0
- package/skills/pixelcraft-mobile/references/uikit.md +58 -0
- package/skills/pixelcraft-patterns/SKILL.md +58 -0
- package/skills/pixelcraft-patterns/references/auth-onboarding.md +25 -0
- package/skills/pixelcraft-patterns/references/commerce.md +28 -0
- package/skills/pixelcraft-patterns/references/communication.md +26 -0
- package/skills/pixelcraft-patterns/references/creative-tools.md +29 -0
- package/skills/pixelcraft-patterns/references/dashboard-admin.md +31 -0
- package/skills/pixelcraft-patterns/references/marketing.md +32 -0
- package/skills/pixelcraft-patterns/references/pattern-selection.md +74 -0
- package/skills/pixelcraft-patterns/references/search-filtering.md +42 -0
- package/skills/pixelcraft-patterns/references/settings.md +23 -0
- package/skills/pixelcraft-patterns/references/tables-crud.md +43 -0
- package/skills/pixelcraft-plan/SKILL.md +67 -0
- package/skills/pixelcraft-plan/references/design-input.md +69 -0
- package/skills/pixelcraft-plan/references/plan-template.md +99 -0
- package/skills/pixelcraft-plan/references/repo-discovery.md +42 -0
- package/skills/pixelcraft-plan/references/stack-freshness.md +50 -0
- package/skills/pixelcraft-plan/references/stack-selection.md +42 -0
- package/skills/pixelcraft-review/SKILL.md +64 -0
- package/skills/pixelcraft-review/references/audit-report.md +50 -0
- package/skills/pixelcraft-review/references/critique-protocol.md +89 -0
- package/skills/pixelcraft-review/references/heuristics.md +18 -0
- package/skills/pixelcraft-review/references/personas.md +26 -0
- package/skills/pixelcraft-review/references/polish.md +38 -0
- package/skills/pixelcraft-review/scripts/fixtures/brand-critique-waivers.json +14 -0
- package/skills/pixelcraft-review/scripts/fixtures/brand-critique.css +18 -0
- package/skills/pixelcraft-review/scripts/fixtures/clean.html +43 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-after-block.css +4 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-at-rules.css +17 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-comments.css +10 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-html-quote-leak.html +12 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-invalid-replacements.css +27 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-nested-rules.css +19 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-not-visible-skip.css +8 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-outline-shorthands.css +11 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-unknown-and-border.css +15 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-unknown-last-wins.css +19 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-valid-replacements-extended.css +29 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-visible-no-replacement.css +3 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-visible-valid-replacements.css +9 -0
- package/skills/pixelcraft-review/scripts/fixtures/slop.html +28 -0
- package/skills/pixelcraft-review/scripts/slop-scan.mjs +586 -0
- package/skills/pixelcraft-spatial/SKILL.md +52 -0
- package/skills/pixelcraft-spatial/references/comfort-accessibility.md +98 -0
- package/skills/pixelcraft-spatial/references/platforms.md +77 -0
- package/skills/pixelcraft-tokens/SKILL.md +56 -0
- package/skills/pixelcraft-tokens/assets/tokens.example.json +71 -0
- package/skills/pixelcraft-tokens/assets/tokens.modes.example.json +47 -0
- package/skills/pixelcraft-tokens/references/adoption.md +55 -0
- package/skills/pixelcraft-tokens/references/format.md +54 -0
- package/skills/pixelcraft-tokens/references/governance.md +80 -0
- package/skills/pixelcraft-tokens/references/state-tokens.md +62 -0
- package/skills/pixelcraft-tokens/references/theme-presets.md +94 -0
- package/skills/pixelcraft-tokens/scripts/export-tokens.mjs +285 -0
- package/skills/pixelcraft-tui/SKILL.md +60 -0
- package/skills/pixelcraft-tui/references/bubbletea-lipgloss.md +60 -0
- package/skills/pixelcraft-tui/references/ink.md +60 -0
- package/skills/pixelcraft-tui/references/ratatui.md +62 -0
- package/skills/pixelcraft-tui/references/rich.md +62 -0
- package/skills/pixelcraft-tui/references/textual.md +67 -0
- package/skills/pixelcraft-ux/SKILL.md +46 -0
- package/skills/pixelcraft-ux/references/cognitive-walkthrough.md +70 -0
- package/skills/pixelcraft-ux/references/feedback-performance.md +30 -0
- package/skills/pixelcraft-ux/references/flows-ia.md +44 -0
- package/skills/pixelcraft-ux/references/forms.md +97 -0
- package/skills/pixelcraft-ux/references/i18n.md +183 -0
- package/skills/pixelcraft-ux/references/laws.md +18 -0
- package/skills/pixelcraft-ux/references/locale-test-matrix.md +60 -0
- package/skills/pixelcraft-ux/references/state-matrix.md +39 -0
- package/skills/pixelcraft-ux/references/usability-testing.md +84 -0
- package/skills/pixelcraft-ux/references/ux-writing.md +43 -0
- package/skills/pixelcraft-visual-qa/SKILL.md +82 -0
- package/skills/pixelcraft-visual-qa/references/baseline-governance.md +70 -0
- package/skills/pixelcraft-visual-qa/references/capture-desktop-game.md +38 -0
- package/skills/pixelcraft-visual-qa/references/capture-email.md +34 -0
- package/skills/pixelcraft-visual-qa/references/capture-mobile.md +35 -0
- package/skills/pixelcraft-visual-qa/references/capture-terminal.md +31 -0
- package/skills/pixelcraft-visual-qa/references/critique-rubric.md +71 -0
- package/skills/pixelcraft-visual-qa/references/finish-gate.md +35 -0
- package/skills/pixelcraft-visual-qa/references/measured-craft.md +30 -0
- package/skills/pixelcraft-visual-qa/references/performance-budgets.md +65 -0
- package/skills/pixelcraft-visual-qa/references/task-verification.md +81 -0
- package/skills/pixelcraft-visual-qa/scripts/finish-gate.mjs +135 -0
- package/skills/pixelcraft-visual-qa/scripts/fixtures/shoot-aria-modal.html +19 -0
- package/skills/pixelcraft-visual-qa/scripts/fixtures/shoot-audit.html +34 -0
- package/skills/pixelcraft-visual-qa/scripts/fixtures/shoot-modal.html +17 -0
- package/skills/pixelcraft-visual-qa/scripts/fixtures/style-inventory-deferred.js +1 -0
- package/skills/pixelcraft-visual-qa/scripts/fixtures/style-inventory-edge.html +52 -0
- package/skills/pixelcraft-visual-qa/scripts/fixtures/style-inventory.html +80 -0
- package/skills/pixelcraft-visual-qa/scripts/fixtures/style-inventory.js +8 -0
- package/skills/pixelcraft-visual-qa/scripts/shoot.mjs +513 -0
- package/skills/pixelcraft-visual-qa/scripts/style-inventory.mjs +1154 -0
- package/skills/pixelcraft-web/SKILL.md +76 -0
- package/skills/pixelcraft-web/references/adaptive-layout.md +25 -0
- package/skills/pixelcraft-web/references/angular.md +61 -0
- package/skills/pixelcraft-web/references/astro.md +62 -0
- package/skills/pixelcraft-web/references/clojurescript.md +53 -0
- package/skills/pixelcraft-web/references/elm.md +53 -0
- package/skills/pixelcraft-web/references/fsharp-fable.md +53 -0
- package/skills/pixelcraft-web/references/html-css.md +88 -0
- package/skills/pixelcraft-web/references/htmx-alpine.md +53 -0
- package/skills/pixelcraft-web/references/java-web.md +52 -0
- package/skills/pixelcraft-web/references/kotlin-web.md +53 -0
- package/skills/pixelcraft-web/references/leptos-yew.md +54 -0
- package/skills/pixelcraft-web/references/lit-web-components.md +61 -0
- package/skills/pixelcraft-web/references/pwa.md +225 -0
- package/skills/pixelcraft-web/references/qwik.md +54 -0
- package/skills/pixelcraft-web/references/react-next.md +69 -0
- package/skills/pixelcraft-web/references/scala-laminar.md +53 -0
- package/skills/pixelcraft-web/references/server-rendered.md +71 -0
- package/skills/pixelcraft-web/references/solid.md +60 -0
- package/skills/pixelcraft-web/references/svelte.md +61 -0
- package/skills/pixelcraft-web/references/tailwind.md +73 -0
- package/skills/pixelcraft-web/references/vue-nuxt.md +62 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Electron
|
|
2
|
+
|
|
3
|
+
## Token mapping
|
|
4
|
+
|
|
5
|
+
Use generated CSS variables in renderer UI. Main-process/native UI such as tray icons/menus/dialogs may need parallel semantic constants or native system colors. Avoid shipping secrets/platform logic into renderer merely to synchronize visuals.
|
|
6
|
+
|
|
7
|
+
## Layout and responsive idioms
|
|
8
|
+
|
|
9
|
+
Treat the BrowserWindow as desktop chrome: minimum/default size, resize/maximize/fullscreen, restore bounds, zoom factor, display DPI/movement, multi-window behavior, native vs frameless chrome. Renderer responsive CSS does not solve window/menu integration.
|
|
10
|
+
|
|
11
|
+
## Typography/custom fonts
|
|
12
|
+
|
|
13
|
+
Use web font loading with offline packaging/fallback expectations. Respect zoom/text scaling/high-DPI. Font behavior can differ across OS graphics stacks; inspect target OS rather than assuming Chromium sameness.
|
|
14
|
+
|
|
15
|
+
## Motion/reduced motion
|
|
16
|
+
|
|
17
|
+
Use CSS `prefers-reduced-motion` and verify Chromium receives the platform setting. Keep UI animation nonblocking and avoid expensive GPU/effects in large windows. Do not animate window chrome manipulation unless native/intentional.
|
|
18
|
+
|
|
19
|
+
## Accessibility specifics
|
|
20
|
+
|
|
21
|
+
Renderer semantics are necessary but not sufficient. Menus, shortcuts, tray, native dialogs, notifications, touch bar/dock/taskbar integration, screen reader/focus behavior across window boundaries, keyboard-only navigation, and custom titlebar controls require OS-level verification.
|
|
22
|
+
|
|
23
|
+
## States idiom
|
|
24
|
+
|
|
25
|
+
Model renderer state plus main-process state: startup failure, backend IPC errors, update/restart, offline, file permissions, crash recovery, second instance/deep link, background/tray, power suspend/resume. Preserve dirty document state before close.
|
|
26
|
+
|
|
27
|
+
## Forms idiom
|
|
28
|
+
|
|
29
|
+
Use standard web form practices in renderer. Validate clipboard/paste/password manager/autofill behavior in actual Electron runtime; do not block paste. File pickers/security permissions and drag/drop need explicit error recovery.
|
|
30
|
+
|
|
31
|
+
## Do/don't pairs
|
|
32
|
+
|
|
33
|
+
| Do | Don't |
|
|
34
|
+
|---|---|
|
|
35
|
+
| explicit IPC error/timeout state in renderer | renderer hanging forever when main process fails |
|
|
36
|
+
| native menu/shortcut equivalents for key commands | web-only shortcuts invisible to desktop users |
|
|
37
|
+
| accessible custom titlebar buttons/drag regions | frameless window with no reliable way to move/close |
|
|
38
|
+
| secure context isolation/preload boundary | exposing broad Node APIs to renderer for convenience |
|
|
39
|
+
| preserve unsaved state across close/crash | treating close as harmless navigation |
|
|
40
|
+
|
|
41
|
+
## Known traps
|
|
42
|
+
|
|
43
|
+
Security boundary shortcuts, main/renderer state divergence, memory/resource use, custom chrome accessibility, auto-updater interruption, multi-monitor DPI change, window restore invalid coordinates, keyboard shortcut conflicts, deep-link/second-instance cold start, blurry assets at scaling.
|
|
44
|
+
|
|
45
|
+
## Verification commands
|
|
46
|
+
|
|
47
|
+
```sh
|
|
48
|
+
npm run lint
|
|
49
|
+
npm run test -- --run
|
|
50
|
+
npm run build
|
|
51
|
+
npm start
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Use real OS/window-manager testing, keyboard/screen reader inspection, resize/DPI/multi-window matrices, packaged-app smoke tests, and crash/close/update flows for evidence.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Go GUI: Fyne, Wails, Gio
|
|
2
|
+
|
|
3
|
+
## Token mapping
|
|
4
|
+
|
|
5
|
+
Fyne: map semantic values into a custom `fyne.Theme` and use theme lookup rather than literals. Wails: use generated CSS variables inside the webview plus native shell integration. Gio: centralize semantic color/type constants in Go and apply through layout/widget styling.
|
|
6
|
+
|
|
7
|
+
## Layout and responsive idioms
|
|
8
|
+
|
|
9
|
+
Fyne uses containers/layouts and canvas scaling. Wails is a desktop webview shell—web layout plus menus/windowing/file-system integration. Gio is immediate-mode-ish layout with explicit constraints. Handle resize, minimum window size, high-DPI, multi-window, platform chrome, persistence.
|
|
10
|
+
|
|
11
|
+
## Typography/custom fonts
|
|
12
|
+
|
|
13
|
+
Register font collections/assets deliberately; verify glyph fallback, scaling, localization/IME. Webview fonts follow web rules. Gio/Fyne custom rendering needs explicit text-shaping validation.
|
|
14
|
+
|
|
15
|
+
## Motion/reduced motion
|
|
16
|
+
|
|
17
|
+
Use framework animation/timers sparingly and expose app-level reduced-motion where OS integration is uncertain. Avoid goroutine/frame-loop animation that ignores lifecycle, cancellation, and power.
|
|
18
|
+
|
|
19
|
+
## Accessibility specifics
|
|
20
|
+
|
|
21
|
+
Current Fyne API exposes an `Accessible` interface (`AccessibilityLabel`, `AccessibilityRole`) in recent versions, but support maturity/version coverage must be verified. Wails accessibility depends on emitted DOM plus webview/platform behavior. Gio/custom rendering requires explicit semantics and may not provide screen-reader support sufficient for productivity software. Never infer support from compilation.
|
|
22
|
+
|
|
23
|
+
## States idiom
|
|
24
|
+
|
|
25
|
+
Use explicit Go state ownership/channels/context cancellation for loading/error/offline/permission/concurrent work. Keep file/dirty/window-close/update state durable. Goroutine completion is not a UX state unless surfaced.
|
|
26
|
+
|
|
27
|
+
## Forms idiom
|
|
28
|
+
|
|
29
|
+
Use real framework controls where possible; validate labels/focus order/paste/IME/input preservation/error recovery. Wails can use native HTML forms inside webview. Custom canvas input is costly to make correct.
|
|
30
|
+
|
|
31
|
+
## Do/don't pairs
|
|
32
|
+
|
|
33
|
+
| Do | Don't |
|
|
34
|
+
|---|---|
|
|
35
|
+
| implement Fyne `AccessibilityLabel()` where supported | claiming screen-reader support because app launches |
|
|
36
|
+
| Wails semantic HTML form | custom div-only UI inside webview |
|
|
37
|
+
| context cancellation/progress state | orphaned goroutine mutating UI state |
|
|
38
|
+
| central Fyne/Gio theme constants | repeated literal colors at widget sites |
|
|
39
|
+
|
|
40
|
+
## Known traps
|
|
41
|
+
|
|
42
|
+
CGO/platform packaging, webview runtime differences, accessibility immaturity, goroutine race/lifetime bugs, high-DPI/font rasterization, custom chrome behavior, file permission/update flows, blurry assumptions from web screenshots.
|
|
43
|
+
|
|
44
|
+
## Verification commands
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
go test ./...
|
|
48
|
+
go vet ./...
|
|
49
|
+
fyne package 2>/dev/null || true
|
|
50
|
+
wails build 2>/dev/null || true
|
|
51
|
+
go run .
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Run actual desktop OS builds; inspect resize/DPI/window/menu integration, keyboard/focus/screen reader where applicable, crash/dirty close, offline/background cancellation, packaging/signing.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# GTK / libadwaita
|
|
2
|
+
|
|
3
|
+
## Token mapping
|
|
4
|
+
|
|
5
|
+
Use GTK CSS/custom properties where supported plus named colors/styles in resource/theme files. libadwaita semantic colors/style classes should be preferred over hard-coded colors because they integrate with dark/high-contrast/platform behavior. Map generated values once into theme constants/CSS.
|
|
6
|
+
|
|
7
|
+
## Layout and responsive idioms
|
|
8
|
+
|
|
9
|
+
Use GTK boxes/grid/panes/adaptive layout widgets and libadwaita breakpoint/adaptive containers where applicable. Handle resizing/minimum width, tiling/window manager behavior, header bar/content hierarchy, menus/shortcuts, high-DPI scaling, and desktop environment differences without assuming one chrome shape.
|
|
10
|
+
|
|
11
|
+
## Typography/custom fonts
|
|
12
|
+
|
|
13
|
+
Use system font settings/Pango text layout and semantic style classes. Custom fonts require correct resource registration/fallback. Pango markup must escape user content. Verify text scaling, line breaking, ellipsization, CJK/RTL shaping, and localization expansion.
|
|
14
|
+
|
|
15
|
+
## Motion/reduced motion
|
|
16
|
+
|
|
17
|
+
Use GTK/libadwaita animations sparingly and honor system reduced-animation settings where exposed by toolkit/platform. Never make progress/state depend solely on animation. Keep window resizing/interaction responsive.
|
|
18
|
+
|
|
19
|
+
## Accessibility specifics
|
|
20
|
+
|
|
21
|
+
Use accessible names/descriptions/roles where exposed, mnemonic/keyboard shortcuts, focus chain, standard controls, high-contrast theme behavior, screen reader (orca) verification, keyboard-only navigation, and AT-SPI-compatible custom widget behavior. Do not strip focus styling.
|
|
22
|
+
|
|
23
|
+
## States idiom
|
|
24
|
+
|
|
25
|
+
Model loading/error/empty/offline/permission/dirty file state explicitly. Long operations need cancellable async/task behavior that does not block the main loop. Window close/delete-event semantics, lock screen/suspend, file monitor/external modification, and multi-window state are desktop UX.
|
|
26
|
+
|
|
27
|
+
## Forms idiom
|
|
28
|
+
|
|
29
|
+
Use labeled entries/combos/checks/switches, validation timing and visible recovery copy, focus/mnemonic order, paste/IME behavior, and input preservation. Placeholder text is not a persistent label substitute in dense forms.
|
|
30
|
+
|
|
31
|
+
## Do/don't pairs
|
|
32
|
+
|
|
33
|
+
| Do | Don't |
|
|
34
|
+
|---|---|
|
|
35
|
+
| semantic style classes/named colors | hard-coded colors that break dark/high contrast |
|
|
36
|
+
| adaptive containers/breakpoints where appropriate | fixed desktop-width window pasted into tiling/mobile-like contexts |
|
|
37
|
+
| cancellable async operation with visible progress | blocking GTK main loop during long work |
|
|
38
|
+
| standard accessible controls/labels | custom-drawn controls with no AT-SPI exposure |
|
|
39
|
+
| explicit close/dirty document behavior | treating window close as harmless navigation |
|
|
40
|
+
|
|
41
|
+
## Known traps
|
|
42
|
+
|
|
43
|
+
Blocking main loop, theme/CSS specificity surprises, focus/mnemonic conflicts, adaptive layout assumptions, distro/desktop variation, dark/high-contrast breakage, window manager differences, custom widgets missing AT-SPI behavior, text shaping/ellipsis localization errors.
|
|
44
|
+
|
|
45
|
+
## Verification commands
|
|
46
|
+
|
|
47
|
+
```sh
|
|
48
|
+
meson test 2>/dev/null || true
|
|
49
|
+
cargo test 2>/dev/null || true
|
|
50
|
+
python -m pytest 2>/dev/null || true
|
|
51
|
+
./your-app 2>/dev/null || true
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Use actual GNOME/Linux environment inspection where relevant, orca/keyboard-only tests, resize/tiling/high-DPI checks, dark/high contrast themes, and window close/async cancellation evidence.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Java desktop: JavaFX and Swing
|
|
2
|
+
|
|
3
|
+
## Token mapping
|
|
4
|
+
|
|
5
|
+
JavaFX: map tokens to semantic CSS variables/rules in application stylesheets and themed control classes. Swing: centralize colors/fonts/insets in UI constants/Look-and-Feel defaults; avoid raw literals per component. Do not force JavaFX web-like styling onto native Swing conventions.
|
|
6
|
+
|
|
7
|
+
## Layout and responsive idioms
|
|
8
|
+
|
|
9
|
+
JavaFX uses scene-graph layout panes, constraints, responsive resizing, FXML/controller separation where appropriate. Swing uses layout managers—never absolute pixel layout. Handle minimum window size, DPI scaling, split panes, resize persistence, monitor changes.
|
|
10
|
+
|
|
11
|
+
## Typography/custom fonts
|
|
12
|
+
|
|
13
|
+
Register bundled font files explicitly; verify fallback/glyphs, fractional DPI scaling, platform text settings, localization expansion. Do not hard-code pixel font metrics into preferred sizes.
|
|
14
|
+
|
|
15
|
+
## Motion/reduced motion
|
|
16
|
+
|
|
17
|
+
JavaFX Timeline/Transition and Swing Timer need lifecycle/cancellation and reduced-motion application setting because desktop OS preference integration varies. Animation must not block EDT/UI thread or correctness.
|
|
18
|
+
|
|
19
|
+
## Accessibility specifics
|
|
20
|
+
|
|
21
|
+
JavaFX exposes `AccessibleRole`, `accessibleText`, and native accessibility integration for built-in controls; custom nodes must set role/text explicitly. Swing uses `AccessibleContext`/accessible names/descriptions. Keyboard focus traversal, mnemonic conflicts, high contrast, and screen readers require real OS testing.
|
|
22
|
+
|
|
23
|
+
## States idiom
|
|
24
|
+
|
|
25
|
+
Background work belongs off the UI thread with progress/cancel/error/offline/permission states. Preserve dirty document state on close/crash/update. Model empty/loading/partial/concurrent editing explicitly.
|
|
26
|
+
|
|
27
|
+
## Forms idiom
|
|
28
|
+
|
|
29
|
+
Use labeled controls, correct focus order, validation timing, input preservation, clipboard/paste/IME behavior, keyboard mnemonics/accelerators, and recoverable error copy. Never validate modally on every keystroke.
|
|
30
|
+
|
|
31
|
+
## Do/don't pairs
|
|
32
|
+
|
|
33
|
+
| Do | Don't |
|
|
34
|
+
|---|---|
|
|
35
|
+
| JavaFX `node.setAccessibleText("Save invoice")` | custom clickable Pane without role/text |
|
|
36
|
+
| Swing layout managers | `setBounds` pixel layout |
|
|
37
|
+
| background worker with cancellation | blocking EDT/UI thread during load |
|
|
38
|
+
| semantic stylesheet tokens | scattered inline `-fx-background-color` |
|
|
39
|
+
|
|
40
|
+
## Known traps
|
|
41
|
+
|
|
42
|
+
EDT/UI-thread blocking, memory leaks in listeners, DPI scaling blur, custom control accessibility gaps, native packaging/runtime module issues, shortcut conflicts, FXML/controller drift, Look-and-Feel inconsistency.
|
|
43
|
+
|
|
44
|
+
## Verification commands
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
./mvnw verify
|
|
48
|
+
./gradlew test build
|
|
49
|
+
./gradlew run
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Inspect actual Windows/macOS/Linux windows, resize/DPI/multi-monitor behavior, keyboard-only flow, Narrator/VoiceOver/or platform screen reader where required, crash/dirty-close recovery.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Qt / PySide / QML
|
|
2
|
+
|
|
3
|
+
## Token mapping
|
|
4
|
+
|
|
5
|
+
For Qt Widgets/PySide/QSS, generated Qt variables are preprocessor-style constants because QSS has no runtime CSS variables:
|
|
6
|
+
|
|
7
|
+
```qss
|
|
8
|
+
/* substitute @semantic-color-action before loading */
|
|
9
|
+
QPushButton { background: @semantic-color-action; }
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Use Qt resource/palette/theme mechanisms where possible. In QML, create a singleton/theme object or context property containing semantic colors, spacing, type roles, and motion values.
|
|
13
|
+
|
|
14
|
+
## Layout and responsive idioms
|
|
15
|
+
|
|
16
|
+
Widgets: use layout managers (`QVBoxLayout`, `QGridLayout`, size policies, splitter) rather than fixed geometry. QML: anchors/layouts/scaling behavior chosen deliberately. Handle resize/minimum size, high-DPI scaling, multiple monitors, platform style differences, and keyboard focus chain.
|
|
17
|
+
|
|
18
|
+
## Typography/custom fonts
|
|
19
|
+
|
|
20
|
+
Use `QFontDatabase` for font loading and platform font fallback. Qt scaling/point-vs-pixel behavior can vary by DPI/platform; verify actual output. QML font properties should use semantic roles rather than ad hoc pixelsize everywhere.
|
|
21
|
+
|
|
22
|
+
## Motion/reduced motion
|
|
23
|
+
|
|
24
|
+
Use QML animations/behaviors/NumberAnimation or Qt property animations purposefully. System reduced-motion exposure varies by platform/Qt version; provide application setting or platform-specific detection where necessary. Do not block input in modal animation loops.
|
|
25
|
+
|
|
26
|
+
## Accessibility specifics
|
|
27
|
+
|
|
28
|
+
Qt accessibility APIs expose name/description/role/state through accessible object layers. Set object names/accessibility metadata deliberately, preserve keyboard focus chain/shortcuts/mnemonics, use standard controls first, honor platform high-contrast themes, and test screen readers per OS. Custom painting needs explicit accessibility exposure.
|
|
29
|
+
|
|
30
|
+
## States idiom
|
|
31
|
+
|
|
32
|
+
Model loading/error/empty/offline/permission/dirty document state explicitly. Long work belongs in worker thread/task patterns with cancellation/progress; never block GUI thread. Multiwindow/document state, close confirmation, crash recovery, and drag/drop failure are UX states.
|
|
33
|
+
|
|
34
|
+
## Forms idiom
|
|
35
|
+
|
|
36
|
+
Use labeled line edits/combo boxes/form layouts, validators/input masks carefully, correct focus order, paste/IME behavior, validation timing, and input preservation. Do not use placeholder text as the only label where platform expectation is persistent labeling.
|
|
37
|
+
|
|
38
|
+
## Do/don't pairs
|
|
39
|
+
|
|
40
|
+
| Do | Don't |
|
|
41
|
+
|---|---|
|
|
42
|
+
| layout managers/size policies | fixed geometry copied from one screenshot |
|
|
43
|
+
| worker thread/progress/cancel for long work | blocking the GUI thread and freezing the window |
|
|
44
|
+
| semantic QML singleton/theme object | raw color constants in every component |
|
|
45
|
+
| explicit focus chain/mnemonics | mouse-only custom controls |
|
|
46
|
+
| platform high-contrast/theme testing | forcing custom paint/colors over system accessibility settings |
|
|
47
|
+
|
|
48
|
+
## Known traps
|
|
49
|
+
|
|
50
|
+
QSS unsupported variable assumptions, stylesheet cascading unpredictably, GUI-thread blocking, DPI scaling mismatch, font metric differences, object lifetime/deletion in Python/C++ boundary, focus proxy confusion, platform theme clash, accessibility metadata absent in custom widgets/QML items.
|
|
51
|
+
|
|
52
|
+
## Verification commands
|
|
53
|
+
|
|
54
|
+
```sh
|
|
55
|
+
python -m pytest 2>/dev/null || true
|
|
56
|
+
cmake --build build 2>/dev/null || true
|
|
57
|
+
qmltestrunner 2>/dev/null || true
|
|
58
|
+
python main.py 2>/dev/null || true
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Use real OS runs, Qt accessibility inspection where available, keyboard-only completion, high-DPI/multi-monitor/resize tests, screen readers, high-contrast themes, and window-state verification.
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Rust GUI: egui, Slint, Dioxus, iced
|
|
2
|
+
|
|
3
|
+
These frameworks have different rendering/state models. Do not treat “Rust GUI” as one platform.
|
|
4
|
+
|
|
5
|
+
## Token mapping
|
|
6
|
+
|
|
7
|
+
- egui: use semantic Rust constants/context style (`egui::Style`, `Visuals`) deliberately; immediate-mode styling can be set globally but inspect scope.
|
|
8
|
+
- Slint: use `.slint` global singletons/exported structs/palette-like properties for semantic values.
|
|
9
|
+
- Dioxus desktop: use generated CSS variables/web idioms plus desktop shell integration.
|
|
10
|
+
- iced: use theme/palette structs and semantic application constants.
|
|
11
|
+
|
|
12
|
+
Never smuggle raw repeated hex values into widgets because no dominant CSS layer exists.
|
|
13
|
+
|
|
14
|
+
## Layout and responsive idioms
|
|
15
|
+
|
|
16
|
+
- egui: immediate-mode layout is frame-local; explicit sizing/panels/columns/scroll areas matter.
|
|
17
|
+
- Slint: declarative layouts/constraint-like behavior and component reuse; verify resizing/high-DPI.
|
|
18
|
+
- Dioxus: web layout plus desktop window behavior.
|
|
19
|
+
- iced: Elm-like layout/widgets; pane/scroll/fill/shrink semantics must be explicit.
|
|
20
|
+
|
|
21
|
+
Handle resize/minimum size/high-DPI/window state/platform chrome separately from widget styling.
|
|
22
|
+
|
|
23
|
+
## Typography/custom fonts
|
|
24
|
+
|
|
25
|
+
Register/load fonts per framework/target and verify glyph fallback, scaling, localization, bitmap/vector rendering, and DPI behavior. Dense custom GUI often underinvests in font fallback—treat it as a floor issue.
|
|
26
|
+
|
|
27
|
+
## Motion/reduced motion
|
|
28
|
+
|
|
29
|
+
Implement motion intentionally per framework. Reduced-motion support is inconsistent; expose app-level reduced-motion setting when platform integration is uncertain. Never use continuous repaints/animation loops without lifecycle/power consideration.
|
|
30
|
+
|
|
31
|
+
## Accessibility specifics
|
|
32
|
+
|
|
33
|
+
Accessibility maturity varies sharply by framework/version/platform. Use semantic labels/roles where exposed, keyboard/focus navigation, platform integration, high-contrast/system theme awareness, and verify screen reader behavior honestly. Custom GPU/immediate-mode UI must not claim accessibility it has not implemented/tested.
|
|
34
|
+
|
|
35
|
+
## States idiom
|
|
36
|
+
|
|
37
|
+
Make application state explicit. Long-running work belongs in async/thread/task ownership with cancellation/progress/error propagation. Handle file permission/dirty state/offline/window close/update/crash recovery. Immediate-mode repaint state is not automatically durable application state.
|
|
38
|
+
|
|
39
|
+
## Forms idiom
|
|
40
|
+
|
|
41
|
+
Use real text input/control widgets where available; validate focus order, clipboard/paste/IME behavior, validation timing, input preservation, and error recovery. Custom text input is expensive to make correct—avoid unless essential.
|
|
42
|
+
|
|
43
|
+
## Do/don't pairs
|
|
44
|
+
|
|
45
|
+
| Do | Don't |
|
|
46
|
+
|---|---|
|
|
47
|
+
| use the framework's real button/text input primitives | hand-drawn clickable/text widgets without semantics |
|
|
48
|
+
| explicit async/cancel/error state | blocking or silently failing background work |
|
|
49
|
+
| semantic theme singleton/palette | raw color literals scattered through widgets |
|
|
50
|
+
| power-aware repaint/animation policy | continuous repaint loop for decorative motion |
|
|
51
|
+
| verify keyboard/screen reader per framework | claiming accessibility because Rust code compiles |
|
|
52
|
+
|
|
53
|
+
## Known traps
|
|
54
|
+
|
|
55
|
+
Accessibility gaps, IME/clipboard complexity, continuous repaint/power usage, async lifetime/cancellation bugs, font fallback/GPU rendering differences, high-DPI scaling, platform packaging/window chrome mismatch, immediate-mode state persistence confusion.
|
|
56
|
+
|
|
57
|
+
## Verification commands
|
|
58
|
+
|
|
59
|
+
```sh
|
|
60
|
+
cargo test
|
|
61
|
+
cargo clippy -- -D warnings 2>/dev/null || true
|
|
62
|
+
cargo run
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Use actual OS/device runs, keyboard/focus/screen-reader inspection where supported, resize/DPI/power behavior, close/crash/update flows, and framework-specific screenshots/golden tests where present.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Tauri
|
|
2
|
+
|
|
3
|
+
## Token mapping
|
|
4
|
+
|
|
5
|
+
Use generated CSS variables inside the webview exactly as web UI, but treat desktop shell colors/titlebar/menu behavior as separate integration. Rust/backend configuration may need matching semantic constants for native menus/tray/notifications; generate or mirror them deliberately rather than copying random hex strings.
|
|
6
|
+
|
|
7
|
+
## Layout and responsive idioms
|
|
8
|
+
|
|
9
|
+
Design browser layout plus window behavior: minimum width/height, resizing/maximized/fullscreen, split panes, DPI changes, multi-window state, custom/native titlebar decision. `tauri.conf.json` controls capabilities/windows only at configuration level; actual UX must handle runtime resize and restore.
|
|
10
|
+
|
|
11
|
+
## Typography/custom fonts
|
|
12
|
+
|
|
13
|
+
Use web font loading inside the webview, but package/license/fallback behavior must work offline where desktop expectations demand it. System font stacks are often appropriate for native feel. Verify text scaling/zoom behavior and high-DPI rendering.
|
|
14
|
+
|
|
15
|
+
## Motion/reduced motion
|
|
16
|
+
|
|
17
|
+
Use CSS/JS motion honoring `prefers-reduced-motion` in the webview. Desktop platform settings may not propagate identically in every runtime/version; verify actual webview behavior. Avoid animation that blocks window manipulation/input.
|
|
18
|
+
|
|
19
|
+
## Accessibility specifics
|
|
20
|
+
|
|
21
|
+
Web accessibility remains necessary but insufficient. Menus, tray icons, shortcuts, notifications, dialogs, file associations, custom titlebar controls, drag regions, and multi-window focus need platform verification. Use native dialogs/menu APIs where appropriate.
|
|
22
|
+
|
|
23
|
+
## States idiom
|
|
24
|
+
|
|
25
|
+
Model web content state plus desktop process state: backend availability/startup failure, updater status, file permission, deep link/file open cold start, offline state, background/tray mode, second instance, crash/restart. Preserve unsaved work before close.
|
|
26
|
+
|
|
27
|
+
## Forms idiom
|
|
28
|
+
|
|
29
|
+
Use web form rules inside the webview; integrate native file pickers/autofill limitations/clipboard behavior honestly. Validate input preservation across window close/minimize/reload/deep-link flows.
|
|
30
|
+
|
|
31
|
+
## Do/don't pairs
|
|
32
|
+
|
|
33
|
+
| Do | Don't |
|
|
34
|
+
|---|---|
|
|
35
|
+
| explicit drag region plus accessible window controls in custom chrome | invisible/half-working custom titlebar |
|
|
36
|
+
| backend startup/permission error surface | blank webview when Rust initialization fails |
|
|
37
|
+
| native menu/shortcut registration and display | browser-only hidden shortcuts with no desktop discovery |
|
|
38
|
+
| preserve unsaved document state on close | treating window close like browser tab refresh |
|
|
39
|
+
| test narrow/minimum window and high DPI | validating only fullscreen developer monitor layout |
|
|
40
|
+
|
|
41
|
+
## Known traps
|
|
42
|
+
|
|
43
|
+
Custom titlebar drag/double-click/system menu omissions, CSP/asset loading, webview version differences, updater/restart state, permissions/capability misconfiguration, tray lifecycle, multi-window focus leakage, file association/deep-link cold start, confusing dev/prod backend behavior.
|
|
44
|
+
|
|
45
|
+
## Verification commands
|
|
46
|
+
|
|
47
|
+
```sh
|
|
48
|
+
npm run build
|
|
49
|
+
cargo test --manifest-path src-tauri/Cargo.toml
|
|
50
|
+
cargo tauri dev
|
|
51
|
+
cargo tauri build
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Use real OS runs for window/menu/shortcut/high-DPI evidence; browser-only inspection is inner-webview evidence only.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Uno Platform
|
|
2
|
+
|
|
3
|
+
## Token mapping
|
|
4
|
+
|
|
5
|
+
Use XAML resource dictionaries/theme resources keyed semantically; export DTCG values into application resources rather than duplicating literals. Account for WinUI-style light/dark/high-contrast resource resolution across Uno targets.
|
|
6
|
+
|
|
7
|
+
## Layout and responsive idioms
|
|
8
|
+
|
|
9
|
+
Use XAML panels/adaptive layouts/visual states/navigation shell idioms. Test every target actually supported: Windows, WASM, mobile, macOS/Linux as applicable. Shared UI does not erase platform navigation, safe-area, windowing, input, and density differences.
|
|
10
|
+
|
|
11
|
+
## Typography/custom fonts
|
|
12
|
+
|
|
13
|
+
Declare fonts/assets per target and verify glyph fallback, scaling/DPI, localization. Font behavior can differ between native and Skia rendering.
|
|
14
|
+
|
|
15
|
+
## Motion/reduced motion
|
|
16
|
+
|
|
17
|
+
Use XAML/WinUI animation deliberately and respect platform reduced-motion/settings where exposed. Keep animation completion out of correctness-critical state and provide reduced alternatives.
|
|
18
|
+
|
|
19
|
+
## Accessibility specifics
|
|
20
|
+
|
|
21
|
+
Uno documentation states that it implements the WinUI UI Automation model across targets using `AutomationProperties`/peers, with varying maturity by renderer/platform. Set `AutomationProperties.Name`, headings, and semantic properties; prefer built-in controls because peers already exist. Verify exact target/rendering mode instead of assuming uniform support.
|
|
22
|
+
|
|
23
|
+
## States idiom
|
|
24
|
+
|
|
25
|
+
Use MVVM/application state for loading/error/empty/offline/permission/optimistic/concurrency. Handle suspension/resume, deep links, window close/minimize, multi-window where supported, session expiry, and navigation restoration.
|
|
26
|
+
|
|
27
|
+
## Forms idiom
|
|
28
|
+
|
|
29
|
+
Use real XAML input controls, labels/header metadata, validation timing, keyboard/focus order, paste/IME/input scope behavior, preserve input across navigation/errors, and expose errors accessibly.
|
|
30
|
+
|
|
31
|
+
## Do/don't pairs
|
|
32
|
+
|
|
33
|
+
| Do | Don't |
|
|
34
|
+
|---|---|
|
|
35
|
+
| `AutomationProperties.Name="Save invoice"` | image/canvas-only clickable surface |
|
|
36
|
+
| semantic resource dictionaries | repeated inline hex in XAML |
|
|
37
|
+
| explicit target matrix testing | assuming WASM/mobile/Desktop behave identically |
|
|
38
|
+
| platform-appropriate navigation/back | forcing one mobile pattern onto desktop windows |
|
|
39
|
+
|
|
40
|
+
## Known traps
|
|
41
|
+
|
|
42
|
+
Renderer parity gaps, conditional platform APIs, resource lookup differences, focus/navigation restoration, font/glyph differences, packaging/signing/store constraints, overestimating accessibility maturity on unfinished targets.
|
|
43
|
+
|
|
44
|
+
## Verification commands
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
dotnet test
|
|
48
|
+
dotnet build
|
|
49
|
+
dotnet run --framework <target>
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Inspect each shipped target/rendering mode, keyboard/focus/screen reader, high contrast/dark mode, resize/DPI/safe area, offline/suspend/resume/deep links, packaging validation.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# WinUI / WPF
|
|
2
|
+
|
|
3
|
+
## Token mapping
|
|
4
|
+
|
|
5
|
+
Use XAML resource dictionaries/theme resources:
|
|
6
|
+
|
|
7
|
+
```xml
|
|
8
|
+
<SolidColorBrush x:Key="SemanticActionBrush" Color="#FF0074CA" />
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Map generated color/dimension values once into resources, styles, control templates, and theme dictionaries. Respect system light/dark/high-contrast resources instead of hard-coding visual constants.
|
|
12
|
+
|
|
13
|
+
## Layout and responsive idioms
|
|
14
|
+
|
|
15
|
+
Use panels/grid/layout rounding/adaptive layout, visual states, window resize/minimum dimensions, DPI scaling, snapping/multimonitor behavior, navigation shell appropriate to Windows. Do not fixed-position dense enterprise UI for one monitor/DPI combination.
|
|
16
|
+
|
|
17
|
+
## Typography/custom fonts
|
|
18
|
+
|
|
19
|
+
Use FontFamily resources and Windows text scaling/DPI behavior. Verify ClearType/rendering, glyph coverage, line height, truncation/ellipsis, and localization expansion. Avoid hard-coded pixel-perfect text boxes for essential copy.
|
|
20
|
+
|
|
21
|
+
## Motion/reduced motion
|
|
22
|
+
|
|
23
|
+
Use WinUI/WPF animation/transition APIs purposefully. Respect system animation/accessibility settings where exposed and provide reduced behavior. Avoid animation that delays critical task feedback or cannot be interrupted.
|
|
24
|
+
|
|
25
|
+
## Accessibility specifics
|
|
26
|
+
|
|
27
|
+
Use UI Automation properties/patterns correctly: AutomationProperties.Name/HelpText/LabeledBy, control patterns, keyboard navigation/focus, accelerator/access keys, narrator verification, high contrast themes. Custom controls/templates must preserve UIA semantics rather than only looking correct.
|
|
28
|
+
|
|
29
|
+
## States idiom
|
|
30
|
+
|
|
31
|
+
Use MVVM async state explicitly: loading/error/empty/offline/permission/dirty/concurrency. Long operations need cancellation/progress and correct dispatcher threading. Handle window close/deactivation/session lock/resume, file locking, installer/update state, and input preservation.
|
|
32
|
+
|
|
33
|
+
## Forms idiom
|
|
34
|
+
|
|
35
|
+
Use labeled controls, validation/error templates/text, focus order/access keys, input scopes where appropriate, paste/autofill/IME behavior, and preserve invalid input. Error copy must explain recovery, not just red borders.
|
|
36
|
+
|
|
37
|
+
## Do/don't pairs
|
|
38
|
+
|
|
39
|
+
| Do | Don't |
|
|
40
|
+
|---|---|
|
|
41
|
+
| resource dictionary semantic brushes/styles | hard-coded colors scattered in XAML |
|
|
42
|
+
| UIA names/labeled-by relationships | custom template that removes accessible semantics |
|
|
43
|
+
| async command with cancellation/progress | blocking UI thread or fire-and-forget silent failure |
|
|
44
|
+
| validate close/dirty state explicitly | losing document work on window close |
|
|
45
|
+
| test high contrast/Narrator/keyboard | mouse-only visual QA on developer machine |
|
|
46
|
+
|
|
47
|
+
## Known traps
|
|
48
|
+
|
|
49
|
+
Binding failures hidden in output logs, dispatcher/thread mistakes, XAML style cascade/template breaking semantics, DPI scaling/layout rounding, high-contrast overrides, focus scope/accelerator conflicts, async lifecycle leaks, fixed layouts clipping localized text.
|
|
50
|
+
|
|
51
|
+
## Verification commands
|
|
52
|
+
|
|
53
|
+
```sh
|
|
54
|
+
dotnet build
|
|
55
|
+
dotnet test
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Use Windows runtime inspection, Narrator/UI Automation tooling, high contrast, DPI scaling, resize/multi-monitor behavior, keyboard-only completion, packaged/unpackaged smoke tests, and localization expansion screenshots as evidence.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Keep work and its context connected
|
|
2
|
+
|
|
3
|
+
In a tool with source and result panes, show the location or object a secondary pane refers to in both places: a debugger can mark the paused source line while the stack identifies the selected frame; a document inspector can identify the selected object while the canvas marks it. Avoid a detached pane that shows useful details but leaves their subject ambiguous. A subtle mark and a label are often enough; do not use color alone to indicate the active object.
|
|
4
|
+
|
|
5
|
+
At the minimum supported window size the secondary view may become a tab or temporary disclosure. Select a result, switch or collapse the pane, then return via keyboard: the source location, selection and next available action should still agree. Capture both panes while linked and the collapsed state. A showcase screenshot can demonstrate the arrangement, not the keyboard or restoration behavior.
|