Task type
Platform(s)
Description
Once #876 lands, @xplat-images resolves against the shared xplat asset folder, with the Angular locale's own image directory taking precedence. The images that were copied into the Angular tree purely to satisfy those imports are then redundant — the shared copy serves them.
They are not harmful (they simply keep winning precedence) but they are ~360 tracked binaries duplicating files that already exist in the repo, and keeping them preserves the habit that caused #873: someone syncs a topic, forgets the images, and a deploy finds out.
Deleting on checksum equality alone is not safe. A copy can be byte-identical to the shared xplat file and still be the target of a relative import from an Angular-native topic — those topics do not use @xplat-images at all, and removing the file would break them. Measured against vnext:
|
deletable |
keep: referenced relatively |
keep: localized override |
keep: no xplat counterpart |
tracked total |
en |
192 |
73 |
0 |
110 |
375 |
jp |
169 |
73 |
4 |
111 |
357 |
So 361 of the 516 checksum-identical copies are safe to remove; 155 are not, because tracked Angular files still reference them by relative path. The four JP localized overrides (general/nuget-*, marketing/*) must stay regardless — they differ from the shared copy and are what makes the locale-first precedence in #876 worth keeping.
Method used for the numbers above, conservative by construction:
- For each tracked file under
docs/angular/src/content/<lang>/images/, require a counterpart at the same relative path under docs/xplat/src/assets/images/.
- Require the two to be byte-identical.
- Exclude any whose filename appears anywhere in the tracked non-image Angular content files — that catches relative ESM imports, markdown image syntax and raw
src="…" alike. Filename matching rather than path resolution means collisions err towards keeping a file.
After #873 merges, the nine JP carousel images it adds also become deletable, taking the total to 370.
Acceptance criteria
- Delete only files that satisfy all three conditions above; re-derive the set at the time of the PR rather than reusing this list, since content moves.
angular:build:en and angular:build:jp both pass with DOCS_TOC_STRICT=true, with no ImageNotFound.
- Page-level spot check that a topic served by a deleted copy still renders its image from the shared folder.
- Keep the four JP localized overrides and every image with no xplat counterpart.
Related resources
Task type
Platform(s)
Description
Once #876 lands,
@xplat-imagesresolves against the shared xplat asset folder, with the Angular locale's own image directory taking precedence. The images that were copied into the Angular tree purely to satisfy those imports are then redundant — the shared copy serves them.They are not harmful (they simply keep winning precedence) but they are ~360 tracked binaries duplicating files that already exist in the repo, and keeping them preserves the habit that caused #873: someone syncs a topic, forgets the images, and a deploy finds out.
Deleting on checksum equality alone is not safe. A copy can be byte-identical to the shared xplat file and still be the target of a relative import from an Angular-native topic — those topics do not use
@xplat-imagesat all, and removing the file would break them. Measured againstvnext:enjpSo 361 of the 516 checksum-identical copies are safe to remove; 155 are not, because tracked Angular files still reference them by relative path. The four JP localized overrides (
general/nuget-*,marketing/*) must stay regardless — they differ from the shared copy and are what makes the locale-first precedence in #876 worth keeping.Method used for the numbers above, conservative by construction:
docs/angular/src/content/<lang>/images/, require a counterpart at the same relative path underdocs/xplat/src/assets/images/.src="…"alike. Filename matching rather than path resolution means collisions err towards keeping a file.After #873 merges, the nine JP carousel images it adds also become deletable, taking the total to 370.
Acceptance criteria
angular:build:enandangular:build:jpboth pass withDOCS_TOC_STRICT=true, with noImageNotFound.Related resources