Name desktop objects after things, not after the software - #445
Conversation
Three built-in windows were named after the wrong thing, and the
names leaked the frame instead of naming what's inside it.
"My WordPress" — the "My" prefix is a 1995 Microsoft tic, and it
names the software rather than the thing. NeXT and Mac never labeled
the drive "My NeXTSTEP." It also breaks the fiction: the desktop
should contain objects, not a mention of the OS you're already
standing in. The pinned folder is now titled after the site itself —
whatever `get_bloginfo( 'name' )` returns.
"Recycle Bin" — Microsoft's word, and it fights WordPress's own
vocabulary, which is Trash. Recycling also implies the material comes
back as something else, which isn't what happens. Now: Trash. The
drag-to-bin ghost chip already said "Move to Trash", so the window
title now agrees with it.
"Content Graph" — data-structure jargon wearing an icon. Nobody's
desk has a Graph on it; it describes the schema, not the act. Now:
Corkboard.
Labels only. Module directories, window ids
(`desktop-mode-recycle-bin`, `desktop-mode-my-wordpress`,
`desktop-mode-content-graph`), REST routes, CSS classes, data
attributes, the `wp.desktop.myWordpress` JS API, and every
`desktop_mode_{recycle_bin,my_wordpress,content_graph}_*` hook keep
their spelling — a retitle is not a re-slug, and plugins bind to
those.
New `desktop_mode_site_title()` helper (+ `desktop_mode_site_title`
filter) is the single source for the site's name: it decodes the
entities `get_bloginfo()` returns, since titles land in `title=`
attributes and JS text nodes, and falls back to "WordPress" for a
site with no name. It feeds the folder window, its pinned icon, the
breadcrumb root, and the "Open in <site>" actions in the media detail
pane and the Corkboard panel — the last two get it via a new
`siteName` key on their window config.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015sKW1mu1SGg5k9oSHgxv5s
`dashicons-networking` draws an org chart — boxes joined by connector lines. That's the data structure, which is the same flaw the "Content Graph" name had; renaming the window without changing the glyph only fixed half of it. A corkboard holds index cards, so that's the icon. The pushpin was not available: `dashicons-admin-post` is the Posts icon, and a second pin-shaped glyph would read as Posts in the dock. The card is the other half of the same metaphor and reads as a sibling of Posts rather than a competitor — honest, since the Corkboard is a view of your posts. `dashicons-index-card` was unused anywhere in the plugin, so there's no collision in the dock, the taskbar, or the wallpaper grid. It also frees `dashicons-networking` from an accidental clash with the "Related" title-bar button (`src/related-entities/index.ts`), which keeps it and means connectedness legitimately. Grid-shaped alternatives were rejected: `grid-view` and `screenoptions` are already taken and collapse into the same checkerboard at 20px, and `layout` is UI jargon — the trap that made "Graph" wrong in the first place. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015sKW1mu1SGg5k9oSHgxv5s
|
Icon swapped: The pushpin wasn't available — The old glyph had the same flaw the old name did: Two side benefits:
Grid-shaped alternatives were rejected: Covered by a new assertion in |
Replaces the full-colour cork board with a monochrome one: an outlined board, two tilted notes, and a thread arcing between two pin heads. The thread is the window's subject — the links between pieces of content — and it is what stops the icon reading as a generic "documents" glyph. It arcs through the empty top half rather than running between the notes, where a 5px gap would swallow it. Monochrome needed a colour source. An SVG data URI is painted as a CSS `background-image`, and a background image has no colour to inherit — art drawn in `currentColor` would come out black, invisible on the dark dock. A fixed white would invert the problem and vanish on a light wallpaper or title bar, with no way for a theme to fix it. So `renderIcon()` learns one branch: an SVG whose markup names `currentColor` is painted as a CSS mask filled with `currentColor` instead. Only the alpha survives and the fill comes from whatever the surface is already using for text, so one drawing stays legible on the dark dock, on a light title bar, on hover, and under a theme that recolours the slot. The art declares its own intent. No registration flag, no payload key, no plumbing: `renderIcon` is the single canonical dispatcher and all five call sites (desktop icons, `<wpd-tile>`, OS Settings, window title bar, window chrome) already route through it. The declaration cannot drift out of sync with the drawing because it IS the drawing. This is the mechanism `applyIconMask` was written for — its docblock already describes `currentColor` as the interesting tint value, and notes that monochrome art is "invisible on a dark dock as an image and perfect as a mask". Until now only a desktop theme could reach it. Fixed-colour art is untouched: no `currentColor`, no mask, same background-image path as before. The Games icons render identically. Existing plugin SVGs containing `currentColor` render black or invisible today, so the new branch strictly improves them. Decoding is memoized — icons re-render on every dock and wallpaper repaint, and the answer per URI never changes — and the memo is bounded at 256 entries so a long tail of plugin icons can't grow it without limit. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015sKW1mu1SGg5k9oSHgxv5s
|
Corkboard icon is now a monochrome silhouette (a14a38d) — outlined board, two tilted notes, a thread arcing between two pin heads. The thread earns its placeIt's the window's actual subject — the links between pieces of content. Without it the icon says "pinboard"; with it, "connections". It arcs through the empty top half rather than running between the notes, where the 5px gap would have swallowed it at dock size. Monochrome needed a colour sourceAn SVG data URI is painted as a CSS So This is the mechanism Why this stayed smallThe art declares its own intent. No registration flag, no payload key, no plumbing — Compatibility
Tests & docs
Full suite: PHPUnit 1663/4265 green, Vitest 2476 green, typecheck + lint + build clean. |
Three built-in windows were named after the wrong thing, and the names leaked the frame instead of naming what's inside it.
get_bloginfo( 'name' )The drag-to-bin ghost chip already read Move to Trash, so the window title now agrees with the gesture that fills it.
Labels only — no slugs moved
Module directories, window ids (
desktop-mode-recycle-bin,desktop-mode-my-wordpress,desktop-mode-content-graph), REST routes, CSS classes,data-*attributes, thewp.desktop.myWordpressJS API, and everydesktop_mode_{recycle_bin,my_wordpress,content_graph}_*hook keep their spelling. A retitle is not a re-slug, and plugins bind to those.New:
desktop_mode_site_title()Single source for the site's name, with a matching
desktop_mode_site_titlefilter (Experimental). It decodes the HTML entitiesget_bloginfo()hands back — titles land intitle=attributes and JS-rendered text nodes, so leaving them encoded would render a literalBen &amp; Jerryon the desktop — and falls back toWordPressfor a site with no name.It feeds four surfaces in one hook: the folder window title, its pinned desktop icon, the window's breadcrumb root, and the "Open in <site>" actions in the media detail pane and the Corkboard's detail panel. The last two reach it through a new
siteNamekey on their respective window configs.Tests
tests/phpunit/tests/siteTitle.php— decode, trim, empty-site fallback, filter override, and the two junk-filter guards (non-string / empty string fall back to the real title rather than blanking every window).tests/phpunit/tests/desktopObjectTitles.php— the shipped titles for all three windows plus their icons, and that the window ids did not move.tests/phpunit/tests/myWordpress.php— the folder is titled after the site, anddesktop_mode_site_titleretitles window + icon + bundle config together.Verification
npm run test:php— 1659 tests, 4257 assertions, green (3 pre-existing skips).npm run test:js— 254 files, 2470 tests, green.npm run typecheck,npm run lint,npm run build— all clean.php -lon every changed PHP file.Docs updated in the same change:
hooks-reference.md(new filter, plus the Trash / Site folder / Corkboard section headings, with a note in each that the slugs are unchanged),javascript-reference.md,bridge-protocol.md,architecture.md,components-reference.md,desktop-themes.md,files-on-desktop.md,native-windows-proposal.md, three examples, and thereadme.txtfeature list. The#recycle-binanchor links inexamples/recycle-bin.mdwere repointed to#trash. Changelog entries inreadme.txtare historical and left alone.Not touched: the
dashicons-networkingicon on the Corkboard. Picking a new glyph is a design call beyond the rename — flagging it in case you want one.🤖 Generated with Claude Code
https://claude.ai/code/session_015sKW1mu1SGg5k9oSHgxv5s