Skip to content

fix: remove key for picture/image to stop flicker when loading - #760

Merged
danielroe merged 4 commits into
nuxt:mainfrom
chrisspiegl:patch-1
Jun 12, 2023
Merged

fix: remove key for picture/image to stop flicker when loading#760
danielroe merged 4 commits into
nuxt:mainfrom
chrisspiegl:patch-1

Conversation

@chrisspiegl

Copy link
Copy Markdown
Contributor

Detailed description / discussion on #759

Set key via props.src instead of the computed src which leads to redraw of the img element upon replacement of the placeholder with the main image.

…mainSrc

Set `key` via `props.src` instead of the computed `src` which leads to redraw of the img element upon replacement of the placeholder with the main image.
@netlify

netlify Bot commented Mar 2, 2023

Copy link
Copy Markdown

Deploy Preview for nuxt-image ready!

Name Link
🔨 Latest commit 2a6264d
🔍 Latest deploy log https://app.netlify.com/sites/nuxt-image/deploys/648435630e782f000895aceb
😎 Deploy Preview https://deploy-preview-760--nuxt-image.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@pi0 pi0 changed the title Fix for #759 Prevent Flickr while replacing placeholder img with mainSrc. fix: prevent flickr while replacing placeholder img with mainSrc Mar 31, 2023
@pi0 pi0 added the bug Something isn't working label Mar 31, 2023

@danielroe danielroe left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks good to me - though I'm not sure why there is a key indeed.

I would suggest we remove it from here and <nuxt-picture> unless @pi0 thinks it is still required. (It was originally introduced in the Vue 2 version of this module.)

@danielroe
danielroe requested a review from pi0 June 8, 2023 10:51
@danielroe danielroe changed the title fix: prevent flickr while replacing placeholder img with mainSrc fix: remove key for picture/image to stop flicker when loading Jun 10, 2023

@pi0 pi0 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. For context the reason was to support Transitions (20ed72b) (@atinux might remember why we needed and do we still need or not since we were pair programming)

@pi0
pi0 requested a review from atinux June 12, 2023 09:30

@atinux atinux left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We will see if we need to add it back later but sounds good to me

@danielroe
danielroe merged commit 55ca3fc into nuxt:main Jun 12, 2023
@chrisspiegl
chrisspiegl deleted the patch-1 branch June 12, 2023 15:20
@danielroe danielroe mentioned this pull request Jun 20, 2023
@github-actions github-actions Bot mentioned this pull request Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants