Skip to content

fix(web): render font ligature icon instead of svgIcon in index progress overlay - #1055

Merged
kyasbal merged 2 commits into
GoogleCloudPlatform:mainfrom
kyasbal:push-wxutyxvumztu
Sep 28, 2026
Merged

kyasbal merged 2 commits into
GoogleCloudPlatform:mainfrom
kyasbal:push-wxutyxvumztu

Conversation

@kyasbal

@kyasbal kyasbal commented Sep 28, 2026

Copy link
Copy Markdown
Member

Background & Problem

When rendering the search index progress overlay in the bottom right corner, Angular Material threw runtime errors:

Error: Error retrieving icon :check_circle! Unable to find icon with the name ":check_circle"
Error: Error retrieving icon :sync! Unable to find icon with the name ":sync"

In IndexProgressLayoutComponent, the template bound [svgIcon]="isReady() ? 'check_circle' : 'sync'". Because svgIcon directs Angular Material to search MatIconRegistry for pre-registered SVG assets rather than font ligatures, passing standard Google Material Symbols names caused lookup failures.

Solution Approach

  • Updated IndexProgressLayoutComponent's template to render the icon name as font ligature text inside the <mat-icon> element ({{ isReady() ? "check_circle" : "sync" }}), aligning with KHI's Material Symbols font icon configuration.
  • Added explicit assertions in index-progress-layout.component.spec.ts ensuring that the icon displays 'sync' when indexing and 'check_circle' when ready.

Remaining Issues & Future Work

None.

@kyasbal
kyasbal requested a review from RyuSA as a code owner September 28, 2026 09:08
@kyasbal kyasbal added type:bug Something isn't working as expected area:frontend Web frontend application and UI components labels Sep 28, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the IndexProgressLayoutComponent to use text interpolation for the Angular Material icon instead of the svgIcon input, and updates the corresponding unit tests to assert the icon's text content. Feedback on the changes highlights that formatting the icon name interpolation across multiple lines introduces leading and trailing whitespace, which can prevent the browser from correctly resolving and rendering the font icon ligatures. It is recommended to keep the interpolation on a single line.

@kyasbal
kyasbal added this pull request to the merge queue Sep 28, 2026
Merged via the queue into GoogleCloudPlatform:main with commit 8b85c53 Sep 28, 2026
17 checks passed
@kyasbal
kyasbal deleted the push-wxutyxvumztu branch September 28, 2026 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:frontend Web frontend application and UI components type:bug Something isn't working as expected

1 participant