0

p13n: simplify showing sparkles

Tie the active state on the sparkle-placeholder directly to the
`thumbnailsLoading_` value.

For an image that was never returned because it was filtered out,
`isTileVisible` would return false, and the active state would be true.
This caused the `render` function on the sparkles to keep firing.

BUG=b:406321809
TEST=manual

Change-Id: Ib5eee802f10dde4fa7046033a45184cd6bf2587f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6410279
Auto-Submit: Erica Lee <ericamlee@google.com>
Reviewed-by: Jason Thai <jasontt@chromium.org>
Commit-Queue: Jason Thai <jasontt@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1439807}
This commit is contained in:
Erica Lee 2025-03-28 17:43:18 -07:00 committed by Chromium LUCI CQ
parent 6e9aba2838
commit 9ae5da0343

@ -212,7 +212,7 @@
</template>
<div class="loading-placeholder">
<sparkle-placeholder index="[[index]]"
active="[[!isTileVisible_(item, thumbnailsLoading_)]]">
active="[[thumbnailsLoading_]]">
</sparkle-placeholder>
</div>
<p hidden id="latestTextQueryDescription">