impierce / identity-wallet

A Tauri-based Identity Wallet for people to manage Decentralized Identities and Verifiable Credentials.
https://www.impierce.com
Apache License 2.0
17 stars 4 forks source link

fix: reduce flicker when loading credential images #233

Open maiertech opened 1 month ago

maiertech commented 1 month ago

Description of change

The previous handling of images loaded the fallback images immediately. The revised approach awaits a promise that returns the asset URL. The fallback image is shown only when no asset URL could be resolved.

If the asset URL can be resolved, the image is still rendered with a slight delay.

I tried an alternative approach to compute the asset URL in a SvelteKit page load function. But this did not work. Not clear why, but calling Tauri APIs crashes the load function.

The perceived flickering should be less because the fallback does not get rendered by default. But it is possible that you will perceive the delay when the image loads. This is unfortunately a limitation of client-side loading.

ScreenFlow

Links to any relevant issues

Fixes issue #182.

How the change has been tested

Screen record the app while clicking on badges in the Ferris profile. Then use the scrubber to scrub through the recorded images after clicking a badge. You should not see the fallback image loaded. However you will see no image loaded before that image gets loaded.

Definition of Done checklist

Add an x to the boxes that are relevant to your changes.

maiertech commented 1 month ago

I am switching this one back to draft because the fix needs to be tested on a real device first. Subject to getting tauri ios dev up and running on my machine.

maiertech commented 4 weeks ago

The background image effect seems to be the culprit for the perceived flicker.