Skip to content

refactor: solid keymap (@fehmer)#8134

Open
fehmer wants to merge 66 commits into
masterfrom
feature/solid-keymap
Open

refactor: solid keymap (@fehmer)#8134
fehmer wants to merge 66 commits into
masterfrom
feature/solid-keymap

Conversation

@fehmer

@fehmer fehmer commented Jun 19, 2026

Copy link
Copy Markdown
Member

No description provided.

@monkeytypegeorge monkeytypegeorge added frontend User interface or web stuff packages Changes in local packages labels Jun 19, 2026
@fehmer fehmer added the force-ci Force CI to run on draft PRs label Jun 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Continuous integration check(s) failed. Please review the failing check's logs and make the necessary changes.

@github-actions github-actions Bot added waiting for update Pull requests or issues that require changes/comments before continuing and removed waiting for review Pull requests that require a review before continuing labels Jun 26, 2026
@fehmer fehmer force-pushed the feature/solid-keymap branch from a04867a to 889716f Compare June 26, 2026 10:06
@github-actions github-actions Bot removed the waiting for update Pull requests or issues that require changes/comments before continuing label Jun 26, 2026
@fehmer fehmer force-pushed the feature/solid-keymap branch from 889716f to 99e1138 Compare June 26, 2026 10:08
@github-actions

Copy link
Copy Markdown
Contributor

Continuous integration check(s) failed. Please review the failing check's logs and make the necessary changes.

@github-actions github-actions Bot added the waiting for update Pull requests or issues that require changes/comments before continuing label Jun 26, 2026
@github-actions github-actions Bot removed the waiting for update Pull requests or issues that require changes/comments before continuing label Jun 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Continuous integration check(s) failed. Please review the failing check's logs and make the necessary changes.

@github-actions github-actions Bot added the waiting for update Pull requests or issues that require changes/comments before continuing label Jun 26, 2026
@github-actions github-actions Bot removed the waiting for update Pull requests or issues that require changes/comments before continuing label Jun 26, 2026
@Miodec Miodec requested a review from Copilot June 29, 2026 11:10
@github-actions github-actions Bot added the waiting for review Pull requests that require a review before continuing label Jun 29, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors the frontend keymap from legacy DOM manipulation to a SolidJS component, consolidates modifier (Shift/Alt/Caps) tracking into a shared state module, and updates config/schema/contracts to match the new keymap behavior.

Changes:

  • Replace legacy #keymap implementation with Solid Keymap component + converter/layout definitions.
  • Migrate keymapShowTopRow config to keymapLayoutStyle (+ legacy config migration).
  • Centralize modifier tracking in states/modifiers.ts, wiring consumers (sound/opposite-shift/etc) to it.

Reviewed changes

Copilot reviewed 38 out of 38 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
packages/schemas/src/layouts.ts Key legends type/schema refactor; drop matrix layout schema
packages/schemas/src/configs.ts Replace keymapShowTopRow with keymapLayoutStyle
packages/contracts/src/index.ts Bump compatibility check header version
frontend/vitest.config.ts Add static mocking harness to setup
frontend/static/funbox/crt.css Update CRT keymap selector for new markup
frontend/src/ts/utils/misc.ts Add typed Object.values helper
frontend/src/ts/test/test-ui.ts Remove legacy keymap refresh call
frontend/src/ts/test/test-logic.ts Swap tracker resets to centralized modifier reset; signal setter fix
frontend/src/ts/test/shift-tracker.ts Read shift state from modifiers store
frontend/src/ts/test/layout-emulator.ts Use non-reactive keymap layout getter
frontend/src/ts/test/alt-tracker.ts Remove legacy alt tracker module
frontend/src/ts/states/test.ts Add keymap layout resource + flash/highlight state
frontend/src/ts/states/modifiers.ts New centralized modifier/caps tracking
frontend/src/ts/pages/test.ts Remove legacy keymap refresh call
frontend/src/ts/input/handlers/keydown.ts Use non-reactive keymap layout getter; remove mirror duplication
frontend/src/ts/index.ts Stop loading legacy keymap event handler
frontend/src/ts/event-handlers/keymap.ts Remove legacy click handler for keymap indicator
frontend/src/ts/elements/keymap.ts Remove legacy keymap renderer/logic
frontend/src/ts/controllers/sound-controller.ts Use centralized modifier state for octave shift
frontend/src/ts/constants/default-config.ts Default keymapLayoutStyle value
frontend/src/ts/config/utils.ts Migrate legacy keymapShowTopRow to keymapLayoutStyle
frontend/src/ts/config/metadata.tsx Rename config metadata entry to keymapLayoutStyle
frontend/src/ts/components/pages/test/keymapLayouts.ts New declarative keymap geometry definitions
frontend/src/ts/components/pages/test/keymapConverter.ts Convert layout JSON to rendered key definitions
frontend/src/ts/components/pages/test/Keymap.tsx New Solid keymap component + animations
frontend/src/ts/components/pages/settings/SettingsPage.tsx Settings UI uses keymapLayoutStyle
frontend/src/ts/components/mount.tsx Register/mount keymap component
frontend/src/ts/components/common/Button.tsx Add tabIndex prop passthrough
frontend/src/ts/commandline/lists.ts Commandline list uses keymapLayoutStyle
frontend/src/ts/commandline/commandline-metadata.ts Commandline metadata for keymapLayoutStyle display
frontend/src/styles/media-queries-purple.scss Remove legacy keymap sizing rules
frontend/src/styles/media-queries-brown.scss Remove legacy keymap sizing rules
frontend/src/styles/keymap.scss Remove legacy keymap stylesheet
frontend/src/styles/index.scss Stop importing legacy keymap styles
frontend/src/html/pages/test.html Replace #keymap with <mount data-component="keymap">
frontend/tests/root/config-metadata.spec.ts Update config metadata tests for new key
frontend/tests/components/pages/test/keymapConverter.spec.ts Add converter regression tests
frontend/tests/harness/mock-static.ts Mock static layout JSON loading for tests

Comment thread frontend/src/ts/states/modifiers.ts Outdated
import { fileURLToPath } from "url";
import { vi } from "vitest";

const BASE_DIR = resolve(fileURLToPath(import.meta.url), "../../../static");

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope

Comment thread frontend/src/ts/components/pages/test/Keymap.tsx Outdated
Comment thread frontend/src/ts/components/pages/test/Keymap.tsx Outdated
Comment thread frontend/static/funbox/crt.css Outdated
Comment thread packages/schemas/src/layouts.ts Outdated
const charDefinitionSchema = z.array(z.string().length(1)).min(1).max(4);
const KeyLegendsSchema = z.array(z.string().length(1)).min(1).max(4);
export type KeyLegends = z.infer<typeof KeyLegendsSchema>;
const row5CharDefinitionSchema = z.array(z.string().length(1)).min(1).max(4);
Comment thread frontend/src/ts/components/pages/test/keymapLayouts.ts Outdated
Comment thread frontend/src/ts/components/pages/test/keymapLayouts.ts Outdated
@github-actions github-actions Bot removed the waiting for review Pull requests that require a review before continuing label Jun 29, 2026
@monkeytypegeorge monkeytypegeorge added backend Server stuff local dev Related to the build process or dependencies labels Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

assets Languages, themes, layouts, etc. backend Server stuff force-ci Force CI to run on draft PRs frontend User interface or web stuff local dev Related to the build process or dependencies packages Changes in local packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants