Skip to content

chore: delete dead pre-v2 toolbar icon set (642 SVGs, ~2.6 MB) #188

Description

@moodyjmz

Summary

apps/*/main/resources/img/toolbar/2.5x/** — the pre-redesign upstream toolbar icon set — is dead. 642 tracked SVGs, ~2.6 MB, zero consumers anywhere in the repo. The live set is the sibling toolbar/v2/2.5x/**.

Directory SVGs Size
apps/common/main/resources/img/toolbar/2.5x 246 984K
apps/documenteditor/main/resources/img/toolbar/2.5x 123 492K
apps/presentationeditor/main/resources/img/toolbar/2.5x 117 500K
apps/spreadsheeteditor/main/resources/img/toolbar/2.5x 100 404K
apps/pdfeditor/main/resources/img/toolbar/2.5x 53 212K
apps/visioeditor/main/resources/img/toolbar/2.5x 3 12K
total 642 ~2.6 MB

Evidence

build/scripts/deploy-sprites.js is the only consumer of toolbar icon sources, and it globs exclusively from v2:

// build/scripts/deploy-sprites.js:93-94, 108, 115
const common = path.join(APPS, 'common', 'main', 'resources', 'img', 'toolbar', 'v2', '2.5x');
const editor = path.join(APPS, editorDir, 'main', 'resources', 'img', 'toolbar', 'v2', '2.5x');

Repo-wide grep for toolbar/2.5x across *.js, *.mjs, *.less, *.css, *.html, *.json, *.jsx, *.sh (excluding node_modules, deploy/) returns hits only in deploy-sprites.js, and every one of those is the v2 path. Nothing references the non-v2 tree.

Neither tree ships regardless: deploy-common.js:163 and deploy-resources.js:140 both copy main/resources/img with exclude: ['toolbar/**/*x/**/*'], which matches toolbar/2.5x/** and toolbar/v2/2.5x/** alike. Only the generated toolbar/icons.svg reaches BUILD_ROOT.

Provenance

The two trees are genuinely different content, not duplicates — diff -rq on apps/common alone reports ~248 differing or v2-only files. The non-v2 set was last touched by upstream commits (4838ad823e icons upload, e59585ebd8 [icons] upload). v2 carries recent Euro Office work (smart-picker toolbar button, b24d006080 / 4f5a6e326d).

Proposal

Delete all six main/resources/img/toolbar/2.5x/ directories in one commit.

While in there, two small unreferenced assets in apps/common/main/resources/img/controlsScroll_center.svg and its five PNG scale variants (.png, @1.25x, @1.5x, @1.75x, @2x). No references in apps/ or theme/. Worth a separate commit so the two concerns stay independently revertable.

Risk

Build-side: none. The exclusion globs already keep these out of BUILD_ROOT, and no code path resolves them.

The real cost is upstream merges. If ONLYOFFICE touches toolbar/2.5x/ in a future release we'll take delete/modify conflicts on up to 642 paths. That is a one-time git rm during the merge, and arguably clearer than silently carrying a set we don't build. Worth a deliberate call rather than an assumption — flagging it here rather than burying it in the PR.

Verification

node build/scripts/deploy-sprites.js

Icon counts per sprite must be unchanged, and git diff on the six committed toolbar/icons.svg files must be empty.

Related

Full SVG folder audit — every *.svg directory in the repo traced to a consumer or marked dead — recorded in cm-findings/web-apps/svg-folder-usage.md (local, git-ignored). Two corrections to CLAUDE.md's parked-issues list came out of it:

  • doc-formats/large/*.svg is not dead — it is referenced directly as CSS backgrounds from every editor's main/resources/less/filemenu.less. The logged 404 is a path-resolution bug (@{common-image-const-path} assumes a CSS output directory two levels off from where webpack now emits), same root cause as the dark-logo_s.svg and warnings_s.svg 404s.
  • pdfeditor's absence from MOBILE_EDITORS in build-pipeline.js and EDITORS in deploy-theme-images.js is correct, not a gap — it has no mobile/ or embed/ directory.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions