Skip to content

Editor V3 - #11

Open
feildmaster wants to merge 279 commits into
masterfrom
v3
Open

feildmaster wants to merge 279 commits into
masterfrom
v3

Conversation

@feildmaster

@feildmaster feildmaster commented Apr 8, 2026 •

Copy link
Copy Markdown
Member

A rewrite of the editor, tons of new features.

Adds:

@github-actions

github-actions Bot commented Apr 8, 2026 •

Copy link
Copy Markdown

Visit the preview URL for this PR (updated for commit 037f27b):

https://undercard-509ba--pr11-v3-vvok3eag.web.app

(expires Sun, 11 Oct 2026 04:22:54 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 220eab77180a57ba7fbdd8c1eafdf1dfd73fb5dd

feildmaster and others added 30 commits September 28, 2026 01:12
The three text sizes are column spans against a 170px auto-fill grid, so
they were only distinct above ~866px of viewport. Below that they
collapsed into each other and the resize button appeared to do nothing.

Spans now shrink with the track count, which keeps all three distinct down
to 3 tracks. At 2 tracks there is no third width to have, so CSS publishes
how many sizes are reachable and the renderer skips the redundant one
rather than cycling through a no-op.

The size modifiers are scoped to .group so they outrank the base rule on
specificity; they previously tied with it and lost to the media query on
source order, which is what broke stretch between 526px and 865px.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Artifacts carry a rarity like cards do, shown as the header name colour:
common, legendary and token. The presets reuse the description palette, so
an artifact name matches the same keyword written in a description, and a
theme only has to change the colour once.

Stored as a rarity name rather than a colour, which leaves room for custom
colours later: the renderer already falls through to setting --ARTIFACT
inline for anything that parses as a hex, and that outranks the preset.

--ARTIFACT is now the name colour and the header background moved to
--ARTIFACT_BG. The presets are data attributes rather than classes because
description.css claims bare .LEGENDARY and .TOKEN globally, and those set
colour on the whole element rather than just the header.

CardModule's rarity selectors are scoped to their own panel; they searched
the entire dialog and would otherwise have matched the new selector, which
sits earlier in the document. fieldset.active needs an explicit display
because the shared data-type reveal rule assumes inline elements.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Picker mixed three jobs: the popover UI with its swatch history, anchoring
to a textarea caret, and splicing "#hex|}" into the description syntax. Only
the first is reusable, so the other two move to TextPicker and the base keeps
the shared flow behind overridables - source, read, write, cleanup, reset,
canCommit, isSource and setPosition.

ValuePicker is the second target: it anchors to a trigger element and emits
the chosen hex rather than writing text, which is what the soul and artifact
rarity panels need to offer custom colors.

The description behaviour moves verbatim; #removeEmpty becomes cleanup() and
#initButton loses its private marker so the base can wire swatches added
during a commit. The one class-level test follows TextPicker, since the base
no longer requires a text entry element.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The preset swatches were a module constant baked into buildSwatches, so every
picker offered the same ten colors. They are now a constructor option that
both subclasses forward, defaulting to the existing list.

PRESETS is exported so a caller can extend the defaults rather than replace
them. Recent colors stay shared across pickers, since those are the user's
history rather than a property of any one target.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The soul swatches carried their value as label text, so the module read
el.textContent and special-cased 'NONE' to mean empty. That leaves nowhere to
put a custom color, which is not expressible as a label.

They now carry data-soul like the artifact rarity options do, and the module
reads that instead. The empty value on NONE removes the special case, and the
lookup matches on the attribute rather than interpolating the soul name into a
class selector.

Classes stay for now since description.css colors the labels through them;
this only separates identity from presentation.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The soul and artifact rarity options had no selected state: the dim/highlight
pair was keyed on [data-rarity] and [data-tribe], which are icon grids, so the
artifact rarity spans picked up the image treatment and souls got nothing.

Dim now targets img[data-rarity] alone, and the text pickers underline their
selection instead. Underline over bold because a synthesised bold in a pixel
mono face changes glyph advance, shifting every option as the selection moves,
and thickens strokes without adding detail.

The soul fieldset also loses width: min-content, which shrank the box well
short of the others and stacked the options into a column. Its justify-self
went with it - the containing panel is display: inline, so it never applied.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Both panels gain a Custom option that opens the color picker anchored to it.
The renderers already fell through to a hex, and the modules already wrote
arbitrary strings, so this is the missing UI rather than new behaviour.

customColor holds the part that is easy to get wrong: the picker's hex is the
value being edited, while the swatch's remembered color is only a display
seed. Conflating them made cancel restore the remembered color instead of the
preset the user came from. Selection follows the value rather than the click,
so the Custom option is not marked active until a color is actually applied,
and cancelling reverts to the preset in one path rather than a special case.

Rarities moves to types.js beside Souls. TextModule needs it, and importing it
from TextRenderer would put a render -> editor edge back into the cycle that
already broke the app once today.

valuePicker.test.js covers the preview and cancel paths, shimming the Popover
API that happy-dom lacks. It caught getHex(null) throwing, which would have
hit every description color pick, since a default parameter does not fill in
for null.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The glyph's counters are holes, so whatever sits behind the button showed
through the cube. A filled copy of the glyph is no good either - FILL 1 is a
different silhouette than FILL 0 and does not cover the outline - so the
backing is a clip-path hexagon on a pseudo element, in the page background.
isolation keeps its negative z-index behind the glyph rather than the page.

Also drops the doc comments describing what the picker overridables and
customColor's parameters are for. The types stay; the prose belongs here.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Check existing skin images with a stored ETag instead of skipping them,
so changed art is picked up without deleting files by hand. The manifest
is local-only (scripts/skin-etags.ignore.json).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Use tag:ci-proxy for the tailnet join, and commit and push through a
local composite action wrapping scripts/commit.js instead of
EndBug/add-and-commit.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant