Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs for next/future/image migration guide #39309

Closed
wants to merge 8 commits into from

Conversation

styfle
Copy link
Member

@styfle styfle commented Aug 4, 2022

Follow up to #39270 to make the props collapse to newlines

@styfle styfle changed the title Update docs future image props Update docs for next/future/image migration guide Aug 4, 2022
@styfle styfle requested a review from leerob August 4, 2022 01:31
@leerob
Copy link
Member

leerob commented Aug 4, 2022

I'm not sure this would be the issue of how they're displayed on mobile, though. Should we try removing the table instead?

@styfle
Copy link
Member Author

styfle commented Aug 6, 2022

@leerob Do you like sections from the original #39270 commit better?

See Rendered Markdown →

@leerob
Copy link
Member

leerob commented Aug 6, 2022

I would suggest doing it like this:

Responsive

// next/image: <ImageLegacy src={src} layout="responsive" />
// next/image/future: Use `sizes` and `style` for the same behavior

<ImageFuture
  src={src}
  sizes="100vw"
  style={{ width: '100%', height: 'auto' }}
/>

@styfle
Copy link
Member Author

styfle commented Aug 8, 2022

@leerob are you suggesting using comments so the legacy code isn’t highlighted?

@leerob
Copy link
Member

leerob commented Aug 9, 2022

Correct - my thought is you're going here because you want to copy-paste the new version, so the code comment gives you the only one to reference.

@styfle
Copy link
Member Author

styfle commented Aug 10, 2022

Closing in favor of #39421

@styfle styfle closed this Aug 10, 2022
@styfle styfle deleted the update-docs-future-image-props branch August 10, 2022 20:33
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
created-by: Next.js team PRs by the Next.js team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants