Name every icon by the pixel grid it is drawn for
Groundwork for redrawing the icons on their pixel grids. A name is now
<icon><px> (server14, server16, server24) and must match the size token
where it renders: 14 at --icon-size-sm, 16 at -md, 24 at -xl.
tdesignLoading is the one exception, since it spins. Every name not yet
redrawn aliases its TDesign glyph, so nothing changes on screen except
the manager-open overlay icon, which moves from lg to xl ("a status
mark on a card").
- pixel-icons.ts holds the redrawn glyphs, so far add14 (the + from
3f7145d, renamed from pixelAdd).
- TS code that picks icons takes Icon14 / Icon16 (menu items, file
glyphs, the copy arrow, toasts, transfer states), so build:ui
rejects a wrong name.
- icons.spec.ts checks every <ng-icon> in the skins: it has a size
token, and each literal name, both sides of a [name] ternary
included, is registered and drawn for that token's grid.
- TDesign's file1 is now fileText, since file1 plus a suffix would
read file114.
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -372,11 +372,15 @@ component; tokens → `ui/src/styles.css`.
|
||||
walker check the flag themselves.
|
||||
- `file-icons.ts` — extension → category map driving glyphs, colors
|
||||
(fixed `--icon-*` tokens from Oxide's hue scales) and the Kind column.
|
||||
- `icons.ts` — the one icon registry (TDesign, `@ng-icons/tdesign-icons`, plus one
|
||||
redrawn glyph: `pixelAdd`, TDesign's + on the 14px pixel grid so it stays sharp
|
||||
on 1x screens), passed to `provideIcons` in `app.config.ts`. Icon names are plain strings in templates and
|
||||
the build never checks them: an unregistered name renders nothing (console error
|
||||
only), so every name used anywhere must be listed here.
|
||||
- `icons.ts` — the one icon registry, passed to `provideIcons` in `app.config.ts`.
|
||||
A name is `<icon><px>`: the pixel grid its glyph is drawn for, which must match
|
||||
the size token where it renders (`server14` at `--icon-size-sm`, `server16` at
|
||||
`-md`, `server24` at `-xl`). The one exception is `tdesignLoading`, which spins.
|
||||
`pixel-icons.ts` holds the glyphs redrawn on their grids, and names not yet
|
||||
redrawn alias TDesign's (`@ng-icons/tdesign-icons`). Templates can't type-check
|
||||
icon names, and an unregistered one renders nothing (a console warning only), so
|
||||
`icons.spec.ts` checks every `<ng-icon>` in the skins. TS code that picks an icon
|
||||
takes the `Icon14` / `Icon16` types.
|
||||
- `platform.ts` — preload-global readers (`PLATFORM`, `APP_MODE`,
|
||||
`EDITOR_CONTEXT`, `IS_MAC`/`IS_MAC_CHROME`, `IS_WINDOWS`, `IS_LINUX`) +
|
||||
`blockNativeContextMenu` (kills WebKit's Reload/Inspect menu outside text
|
||||
|
||||
Reference in New Issue
Block a user