Skip to content

Remove Angular image copies now served by the shared xplat assets #877

Description

@ChronosSF

Task type

  • New topic / component documentation
  • Update existing topic (new release, API change, new feature)
  • Add missing platform variant (Angular / React / WebComponents / Blazor)
  • Improve existing content (clarity, examples, structure)
  • Add or update code samples
  • Other

Platform(s)

  • Angular
  • React
  • WebComponents
  • Blazor
  • All platforms

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:

  1. 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/.
  2. Require the two to be byte-identical.
  3. 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

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions