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

perf(frontend): MkMediaListの高さ制限を調整 #11377

Merged
merged 1 commit into from
Jul 25, 2023

Conversation

tamaina
Copy link
Contributor

@tamaina tamaina commented Jul 25, 2023

What

  • MkMediaListの画像1枚の場合の高さ制限で、aspect-ratioを計算したりcssに任せたりするのではなくJavaScriptでheightを計算するように
  • 設定(mediaListWithOneImageAppearance)を変更した場合はリロードを促すように

Why

  • container-typeがスクロールコンテナではなくその内側に設定されてしまったためcqhが効いていなかったのを修正
  • 単純なheightにすることで描画時のパフォーマンス向上?

Additional info (optional)

Checklist

  • Read the contribution guide
  • Test working in a local environment
  • (If needed) Add story of storybook
  • (If needed) Update CHANGELOG.md
  • (If possible) Add tests

@github-actions github-actions bot added the packages/frontend Client side specific issue/PR label Jul 25, 2023
@codecov
Copy link

codecov bot commented Jul 25, 2023

Codecov Report

Merging #11377 (dfa140f) into develop (8851e90) will decrease coverage by 0.04%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop   #11377      +/-   ##
===========================================
- Coverage    77.71%   77.67%   -0.04%     
===========================================
  Files          920      918       -2     
  Lines        92734    92600     -134     
  Branches      7748     7748              
===========================================
- Hits         72064    71930     -134     
  Misses       20670    20670              
Files Changed Coverage Δ
packages/frontend/src/components/MkMediaList.vue 100.00% <100.00%> (ø)

... and 2 files with indirect coverage changes

@syuilo
Copy link
Member

syuilo commented Jul 25, 2023

p1.a9z.devで動作中?

@tamaina
Copy link
Contributor Author

tamaina commented Jul 25, 2023

yes

@tamaina tamaina changed the title perf(frontend): MkMediaListのアスペクト比制限を調整 perf(frontend): MkMediaListの高さ制限を調整 Jul 25, 2023
@syuilo syuilo merged commit 81ba841 into misskey-dev:develop Jul 25, 2023
17 checks passed
@syuilo
Copy link
Member

syuilo commented Jul 25, 2023

👍

@tamaina
Copy link
Contributor Author

tamaina commented Jul 25, 2023

clientWidthの取得が結構重めだけど省力化のアイデアがある

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packages/frontend Client side specific issue/PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants