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

ImageコンポーネントにJSDocを追加 #314

Merged
merged 4 commits into from
Oct 19, 2023
Merged

Conversation

takashi0602
Copy link
Member

@takashi0602 takashi0602 commented Oct 18, 2023

close #248

概要

ややこしいloadingdecodingに関してJSDoc内で説明を追記しました。また、以下記事参考にdecodingの値はautoとしてブラウザに任せるようにし、loadingは都度Imageコンポーネント使用側で値を設定するよう型を修正しました。

https://zenn.dev/ixkaito/articles/deep-dive-into-decoding

記事をまとめると以下の通りでした。

  • 画像は基本非同期で読み込まれる
  • loading="lazy"は、ビューポート外にある画像に使う
  • decodingの値は"auto"としてブラウザに任せる
    • 必要に応じてsyncasyncを使い分けても良いが、現状このプロジェクトではautoで事足りるはず

@takashi0602 takashi0602 self-assigned this Oct 18, 2023
@uyupunpopunpo
Copy link
Contributor

Copy link
Member

@tyokinuhata tyokinuhata left a comment

Choose a reason for hiding this comment

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

👍 LGTM!

@takashi0602 takashi0602 merged commit 54ced8f into main Oct 19, 2023
3 checks passed
@takashi0602 takashi0602 deleted the refactor/248_image branch October 19, 2023 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Imageコンポーネントの使用方法をJSDocに記述する
3 participants