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

ユーザーを一覧するところでアイコンをlazy loadする #4268

Open
mehm8128 opened this issue Apr 30, 2024 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@mehm8128
Copy link
Member

通知設定は#4062 で無理やりちょっと速くしたけど、アイコンをlazy loadすれば多分解決する
他にもナビゲーションバーのユーザー一覧とかでも速くなる

2つ壁があって、

  1. imgタグにloading='lazy'をつけるとなぜか型エラーになる
    https://github.com/traPtitech/traQ_S-UI/pull/4141/files#diff-e313ad9f03b774bebd98b91a97efa5d4bcdfda44d3d7fc37be2356eb61a36f95
    で直してるのでマージされたら直る。lazy loadを先に実装したかったらコピペすればOKだけど、レビューもしてほしい

  2. UserIconコンポーネントの構造がよくない
    ユーザーモーダルのアイコンのはみ出している部分をクリックすると閉じないように修正した #4190
    でちょっと言及してくれるので直してくれるかもしれないし直してくれないかもしれない
    ただのアイコンとボタンとしてのアイコンを同じコンポーネントで扱っているのと、それによってbackground-imageにsrcをしているのがよくない
    これによってlazy loadができなくなっているので、アイコンコンポーネントをimgタグで作ってlazy loadできるようにして、それを使うようなアイコンボタンコンポーネントを別で作るとよさそう

@mehm8128 mehm8128 added the enhancement New feature or request label Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant