Repository navigation
App icons: one family for the four built-ins - #513
Merged
Merged
Conversation
The four apps that ship a built-in icon were drawn to three different rules. WP Explorer and Corkboard were silhouettes, art in currentColor that renderIcon() paints as a CSS mask so it takes the surface's own text colour. Games was fixed-colour, in four hues belonging to no palette the plugin ships. Trash had no custom icon at all and fell back to dashicons-trash, wearing WP core's language next to the shell's. Games could not invert on a light surface, a background-image having no colour to inherit, and collapsed outright under a desktop theme's icon tint: that path runs applyIconMask(), which keeps only the artwork's alpha, and every pixel of the old gamepad was opaque. It is redrawn so the detail comes from negative space instead. Corkboard's thread arced over its two notes and closed the top of the silhouette, and a closed top over two rectangles is a bag, which is what it looked like from 40px down. The board and the paper are gone; the mark is now the graph itself, one focused post with related ones fanned around it, matching what the window draws now that nodes are discs. Pin-led marks were drawn and rejected, since pushpin.svg belongs to pinned notes and would point at that feature instead. Trash gets its first custom icon, the same object redrawn to the house rule. The row actions inside the bin and the "Move to trash" context menu entries stay on dashicons-trash: those are menu glyphs among other menu glyphs and should match their neighbours. WP Explorer keeps its drawing and gets its spacing fixed. The mark was scaled 1.15x to 23 units on a panel with 30 units of clear height, leaving under one stroke width above and below. At scale 1 the clearance goes to five units. Vessel stroke comes down from 3.5 to 3 across the set. At 3.5 the outlines carried more weight than the shapes inside them; 2.8 was where the joins started to go fragile at 20px. Two docs went stale with this and are updated in the same change: javascript-reference.md cited the Games gamepad as the in-tree example of fixed-colour art, of which none remains, and hooks-reference.md told plugin authors to swap the bin's dashicon, which is now icon_svg.
test_corkboard_svg_keeps_its_pins_legible asserted two r="3" pin heads. The pins are gone, so it failed on CI. The property it was guarding is not gone: it protected the smallest painted element from being shrunk below what survives a 20px dock tile. That is now asserted against the discs, with a floor of r=5 and a strict largest-disc check so a tie for hub fails rather than being filtered away by an array_diff. Adds a silhouette guard across all four built-in icons. Games was the last fixed-colour holdout and there is now nothing in the shell that should carry a literal colour, so the rule is worth pinning: no fill="#" or stroke="#", a 64-unit viewBox, and a data URI the icon sanitizer accepts unchanged. Adds the bin's own both-surfaces check, matching the one the Corkboard already had, since the window icon and the tile are built from the same SVG through two different code paths.
The bin was 24 units tall narrowing to 59% of its top width, which drew a shallower, more conical tub than a bin actually is, and left an interior with no room to hold anything. It is now 27 tall narrowing to 71%, with the bottom corners rounded at 3.5 instead of 4. The lid, the handle and the stroke weight are untouched, so the mark still reads as the same object and still sits at the same optical size next to WP Explorer, Corkboard and Games. Taken much past 71% the walls go vertical and the silhouette starts reading as a bucket rather than a bin, which is the thing the taper was there to prevent. This sits at the edge of that.
nuriapenya
marked this pull request as ready for review
August 7, 2026 14:40
Collaborator
mmtr
approved these changes
Aug 7, 2026
The silhouette note claimed the shell no longer ships any fixed-colour art, so there was nothing left in-tree to copy from. Not true: both built-in games draw in literal hex, and src/games/launch.ts hands their art to renderIcon() through the window registration, so their title-bar icons take the background-image path the paragraph is describing. Point at those two instead.
The bin had one drawing and a count badge. The badge is positioned onto the artwork rather than beside it, so on a 20px dock tile the pill covered about 30% of the icon it was annotating. Replacing it with a second drawing says the same thing in the space the icon already owns. `openstation_recycle_bin_icon_svg()` now takes `$full`, which knocks the lid askew and drops three crumpled balls into the body. The balls are one path with three subpaths, so the mark stays at four elements. Their layout is staggered on purpose: two at the same height with a third centred below reads as a face. Both drawings ship in the shell config, so crossing zero is a local swap rather than a round trip, and the icon is right on the first paint. Adds `setArt( id, svg )` to the three rails, the counterpart to `setBadge` for a tile whose icon means something different depending on state. Same unified id space, same fan-to-all-rails contract, and the same survives-a-rebuild guarantee. Two things worth knowing: - The value is recorded before the tile is resolved. Setting art during boot is the normal case, since the rails append system tiles asynchronously, and the tile builders re-apply from the map. - `icons.setArt` paints both desktop layouts. Classic renders the `.os-icons` grid, Spatial renders an `<os-tile>` placement, and on a stock install the second one is what the user is looking at. `src/recycle-bin/badge.ts` becomes `icon-state.ts`, since it no longer badges. It keeps the count arithmetic exactly as it was, because the deltas still have to add up to know when it crosses back to zero, but only the sign of it now reaches the screen. The window-active suppression goes: that policy is right for a notification and wrong for a description of an object.
…h rails Three fixes, all found by writing the tests. `setArt` masked the art by hand, which silently rejected a dashicon class even though the docs say one is accepted: `applyIconMask` only takes URLs and data URIs. It now goes through `resolveIcon`, the same path a registered icon takes, so every icon shape works and a desktop theme's slot override is still honoured. `os/art-changed` fired even when the paint had bailed, so a subscriber could be told a tile changed when it had not. Publishing now happens only after a paint, and clearing art that was never set stays silent. Clearing with `''` dropped the override but left the swapped art on screen until the next rebuild. It now restores the registered icon immediately, the way `setBadge( id, 0 )` removes the pill immediately. The icon rail used `CSS.escape`, which is absent in jsdom and in older engines, so the first test to touch it threw on load rather than failing an assertion. Guarded, with the fallback escaping the two characters that can terminate a quoted attribute selector. Covers both rails: the record-before-resolve ordering, survival across `replaceItems()` and a full grid rebuild, the silent no-op for an id the rail does not own, and the icon rail painting Classic and Spatial from one call.
Collaborator
Author
|
@mmtr Small update on this one The count bubble is gone. It sat on top of the artwork rather than next to it, so at the smallest dock size it was covering about a third of the bin it was meant to be describing. The icon can say "there's something in here" on its own, and it gets the whole tile to say it in. The bin got a bit deeper. My first version came out shallower than a bin really is, and there was no room inside it to put anything. I tested it locally and it behaves the way you'd hope. With two things in the trash it shows full. Restore one and it stays full. Restore the last one and it goes back to empty. No refresh needed anywhere. LMK if that works! |
AGENTS.md asks for an example under docs/examples/ whenever a change adds a public surface that doesn't have one. `setBadge` has dock-badge.md; `setArt` had nothing. Covers registering a tile with its resting icon, shipping both drawings in the shell config so a swap is local, the fan-to-all-rails call, and the four properties that are easy to get wrong: setting art before the tile renders, survival across a live menu refresh, the icon rail covering both desktop layouts, and what `''` does. Also says why there is no "show 0 while my window is active" recipe here. That policy is right for a notification and wrong for a description of an object.
mmtr
added a commit
that referenced
this pull request
Aug 11, 2026
Pressing a note started a rubber-band on the desktop area, and `capturePointer()` retargets the rest of the gesture to the canvas — so the release and the synthesized click never reached the control the user pressed. Every button on a note was dead to the mouse: colour, lock, convert, and the new trash button. Keyboard activation still worked, which is why it survived earlier testing. Notes are the third floating layer over the canvas after windows and widgets, and were the only one missing from the marquee's exclude list. Pre-existing on trunk, not introduced here: the exclude list predates the notes layer. The trash button just gave it a more obvious way to show up. Also drops the "badge" wording from the notes broadcast. Trunk replaced the bin's numeric badge with full/empty artwork (#513); the same broadcast still drives it, but the count no longer reaches the screen. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
mmtr
added a commit
that referenced
this pull request
Aug 11, 2026
* Notes: Merge the sticky-note surface into pinned notes
Removes the Guidelines-backed sticky notes and folds the two things it
did better into pinned notes: a "New note" wallpaper context-menu entry
and per-desktop scoping.
Sticky notes rode Gutenberg's Guidelines experiment. Gutenberg renamed
that storage primitive from wp_guideline to wp_knowledge, so the
availability gate returned false everywhere and the layer never booted,
leaving one dead notes surface next to a working one.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* Notes: Fix the desktop toggle's lifecycle, placement, and empty-note tilt
Four fixes to the per-desktop work, all found in a real browser:
- Subscribe to DESKTOP_CREATED, and let one method own whether the
toggle is present. It was built once at paint, gated on the desktop
count, so adding a desktop mid-session never grew it in. A note bound
while the session had one desktop was then stranded: hidden on the new
desktop, with no control on the old one to unbind it, until a reload.
- Move the toggle from the meta row to the footer. The pushpin is 56px
wide, centred, jittered by up to 10px and painted above the paper's
chrome, so it covers note-relative x 62-138. A fourth control in the
right-aligned meta row pushed the visibility lock underneath it, where
elementFromPoint resolves to the pin and a click does nothing. Affects
any owner with edit_posts on a multi-desktop session.
- Seed the paper jitter from the drop position when a note has no text.
The wallpaper menu always creates empty notes and hashNoteSeed('')
is a constant, so every note from the new primary creation path got
an identical tilt and pin angle.
- Say what clampPosition actually guarantees in the testing steps: the
vertical clamp reserves a fixed 120px against a note that is ~230px
tall, so a note pinned near the bottom edge is clipped. Pre-existing
and unchanged here, but the menu makes it much easier to reach.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* Notes: Drop per-desktop scoping, fix the bin drop + badge, add a trash button
Reverts the virtual-desktop binding. Notes are visible on every desktop
again, as on trunk: the `_wpd_note_desktop` meta, the `desktop` wire
field, the footer toggle and the DESKTOP_* wiring are all gone. The
wallpaper "New note" entry stays.
Three fixes on top:
- Register a bin drop target on every surface that represents the
Trash, not just the first selector match. The classic layout renders
the bin as a wallpaper tile AND a dock system tile at once, so
resolving "the" bin to one element left the dock tile with nothing
attached: dragging a note onto the dock Trash lit up nothing and did
nothing on release. Files were affected the same way.
- Publish `os.wpd_note.changed` when a note is trashed, restored, or
converted. The Recycle Bin badge counts deltas off that topic for
every post type the bin captures, and `wpd_note` is one of them, so
without it the server's count moved and the dock badge kept whatever
it had at boot. Verified in a browser: badge and REST /count now
agree after a drag-to-bin.
- Add a "Move to Trash" button to the note, next to the other actions.
It confirms first, then takes the same path as drag-to-bin. It sits
in the footer rather than the meta row because the pushpin covers
note-relative x 62-138 and a fourth control in the right-aligned meta
row lands underneath it, unreachable with a pointer.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* Notes: Reveal the trash button on hover, like the other note controls
It sat at a constant 0.75 opacity while the colour dot, visibility and
convert buttons fade in with the meta row, so every note carried a
permanently visible trash icon.
It can't live inside `.os-pinned-note__meta` and inherit that reveal
(the pushpin covers the meta row's left half), so the fade is repeated
on the button. Resting at 0.75 when revealed matches what a meta-row
button resolves to: the row fades to 1 and each button sits at 0.75
inside it.
The button's own :hover is scoped through the note. Bare
`.os-pinned-note__trash:hover` is (0,2,0) and the reveal rule is
(0,3,0), so it would never have reached full opacity — you are always
hovering the note when you hover its button.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* Notes: Trim the docs and comments added by this branch
Cuts ~100 lines of prose that restated the code or repeated an
explanation already given elsewhere:
- The pushpin geometry behind the trash button's placement was spelled
out in three places. It lives in notes.css now, next to the rule it
justifies; layer.ts points at it.
- The "synthetic MouseEvent carries no position" reason was in two
docblocks and the handbook. Kept on the type that defines the
argument, plus one line in the docs.
- broadcast.ts had a 15-line header over a 20-line function.
- Dropped "notes are not scoped to a virtual desktop" from
architecture.md: it documents a feature that doesn't exist.
- files-on-desktop.md gained a second code sample that differed from
the first only in the argument being destructured. Folded into one.
- Test docblocks and inline comments that narrated the assertions.
* Selection: don't start a marquee on a pinned note
Pressing a note started a rubber-band on the desktop area, and
`capturePointer()` retargets the rest of the gesture to the canvas —
so the release and the synthesized click never reached the control the
user pressed. Every button on a note was dead to the mouse: colour,
lock, convert, and the new trash button. Keyboard activation still
worked, which is why it survived earlier testing.
Notes are the third floating layer over the canvas after windows and
widgets, and were the only one missing from the marquee's exclude list.
Pre-existing on trunk, not introduced here: the exclude list predates
the notes layer. The trash button just gave it a more obvious way to
show up.
Also drops the "badge" wording from the notes broadcast. Trunk replaced
the bin's numeric badge with full/empty artwork (#513); the same
broadcast still drives it, but the count no longer reaches the screen.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* Notes: Move the whole action cluster into the footer
The meta row now carries the colour dot alone; visibility, convert and
trash sit together in the footer, with the save-status chip pushed to
the trailing edge.
The pushpin is painted over the paper's chrome and covers the middle of
that right-aligned row, so it only ever had room for two controls clear
of the pin. Splitting the actions across two rows to fit was the wrong
trade: they belong together.
Grouping them in a `__actions` container also simplifies the reveal.
The group fades on hover/focus exactly like the meta row, so each
button keeps its own 0.75 → 1 hover on top, and the trash button loses
the scoped-hover specificity workaround it needed when it faded itself.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* Notes: Split the note's chrome into corners, and match the trash ink
The meta row now holds the save chip hard left and the colour dot hard
right — the two spots the pushpin doesn't cover — and the footer holds
the three actions alone.
Tightens the action cluster to no gap: each button is a 30px box around
a 20px glyph, so its own padding is already the spacing. Pitch goes
from 34px to 30px.
The trash glyph was painting a shade lighter than the lock and convert
beside it: those two fill from `--dm-note-ink`, while the trash used
`currentColor`, which resolved through `--os-ui-btn-color` to the
softer `--dm-note-ink-soft`. All three now measure rgb(51, 41, 11), and
the trash still reddens to #b32d2e on hover.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* Notes: Give the trash button the same hover as the other actions
It reddened to #b32d2e on hover while the lock and convert beside it
only brightened, so one action in the row changed hue and the other two
didn't. All three now do the same thing: opacity 0.75 → 1, glyph fixed
at the note's ink.
The danger cue was redundant anyway — the button opens a confirm dialog
that already carries it.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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.

Proposed changes
The four built-in app icons are redrawn to one rule: 64×64, drawn in
currentColor, an outlined vessel with solid content at stroke 3, five elements max.dashicons-trash, and its body is drawn deeper: 27 units tall narrowing to 71% of its top width, where the first pass was 24 tall at 59%.Every size, plus the light-surface and theme-tint cases
Why are these changes being made?
The new WP Explorer icon came out packed, and the built-ins wanted looking at as a set rather than one at a time. They were drawn to three different rules, and two of them had real bugs:
pushpin.svgbelongs to pinned notes.The row actions inside the bin and the "Move to trash" context-menu entries stay on
dashicons-trash. They are menu glyphs and should match their neighbours, not this icon.Testing instructions
wp-admin/profile.php) to a light one. All four should invert and stay legible; Games used to fail here.Try it