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

fix: redesign cat ears #10039

Merged
merged 20 commits into from
Mar 23, 2023
Merged

fix: redesign cat ears #10039

merged 20 commits into from
Mar 23, 2023

Conversation

acid-chicken
Copy link
Member

@acid-chicken acid-chicken commented Feb 23, 2023

What

猫耳オブジェクトを丸型(猫耳カチューシャ状)に切り取られるようにする

耳の色がアバター全体の平均色でなく頭部から決定されるようにする

Close #10251

components-global-mkavatar--profile-page-catcomponents-global-mkavatar--profile-page-cat

サンプル位置

上から 10%, 左右からそれぞれ 20%

Why

アイコンが読み込まれていなかったり透明なアイコンを使用していると猫耳とは似つかない何かが見えるため

Additional info (optional)

Firefox, Safari は mask で切り取っている
Chrome は -webkit-mask, -webkit-mask-composite で切り取っている

@acid-chicken acid-chicken self-assigned this Feb 23, 2023
@github-actions github-actions bot added the packages/frontend Client side specific issue/PR label Feb 23, 2023
@syuilo
Copy link
Member

syuilo commented Feb 23, 2023

maskってiOSだとめちゃくちゃGPU使ってたけど今は解決したのかしら

@tamaina
Copy link
Contributor

tamaina commented Feb 23, 2023

ぼかし無効でこれもオンオフできるようにすれば良さそう?

#9976

@codecov
Copy link

codecov bot commented Feb 23, 2023

Codecov Report

Merging #10039 (8810c9c) into develop (41d1b1b) will increase coverage by 3.15%.
The diff coverage is 97.54%.

❗ Current head 8810c9c differs from pull request most recent head a804cf5. Consider uploading reports for the commit a804cf5 to get more accurate results

@@             Coverage Diff             @@
##           develop   #10039      +/-   ##
===========================================
+ Coverage    75.14%   78.30%   +3.15%     
===========================================
  Files          877      157     -720     
  Lines        85680    19003   -66677     
  Branches      5826      267    -5559     
===========================================
- Hits         64386    14880   -49506     
+ Misses       21294     4123   -17171     
Impacted Files Coverage Δ
...ckages/frontend/src/components/global/MkAvatar.vue 97.51% <97.54%> (+4.30%) ⬆️

... and 720 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@acid-chicken
Copy link
Member Author

アバターに透明箇所があるか判定した方がもしかしたら判定処理入れる方が軽いかもしれない?と思ったけどクロスオリジンで読まれる可能性があるから実現が難しそう

@acid-chicken
Copy link
Member Author

ぼかし無効でこれもオンオフできるようにすれば良さそう?

#9976

とりあえず紐づけた(はず)

@syuilo
Copy link
Member

syuilo commented Mar 1, 2023

現行の実装だと、背景が透明なアイコンを使用してる場合でも耳がフィットするという利点もあるから現行から変えるほどではないかも

@acid-chicken
Copy link
Member Author

現行の実装だと、背景が透明なアイコンを使用してる場合でも耳がフィットするという利点もあるから現行から変えるほどではないかも

ある程度透明領域でもフィットできる余地を残すためにギリギリでマスクせずに少し遊びを持たせてみた

@acid-chicken
Copy link
Member Author

マスクにブラーをかけた

@acid-chicken acid-chicken changed the title fix: viewing disgusting objects when user is a cat with having transparent avatar fix: redesign cat ear Mar 22, 2023
@acid-chicken acid-chicken changed the title fix: redesign cat ear fix: redesign cat ears Mar 22, 2023
@acid-chicken
Copy link
Member Author

ぼかし無効でこれもオンオフできるようにすれば良さそう?

#9976

とりあえず紐づけた(はず)

これが有効になっている際は加えて耳の色を付け根から取得するようにした

components-global-mkavatar--profile-page-catcomponents-global-mkavatar--profile-page-cat

@acid-chicken
Copy link
Member Author

@syuilo ping

@syuilo syuilo merged commit 7f9a41b into develop Mar 23, 2023
@syuilo syuilo deleted the acid-chicken-patch-1 branch March 23, 2023 09:06
@syuilo
Copy link
Member

syuilo commented Mar 23, 2023

🥰

na2na-p pushed a commit to na2na-p/misskey that referenced this pull request Apr 1, 2023
* fix: viewing disgusting objects when user is a cat with having transparent avatar

* chore: mask cat ears when useBlurEffect is enabled

* fix: typo

* style: add comment

* chore: shrink mask

* chore: blur mask

* refactor: minify

* chore: use SVG to determine ear color

* style: comment

* refactor: use `<component>`

* refactor: separate cat definitions

* refactor: use singleton SVG definitions

* perf: use CSS instead of SVG

* refactor: unused definer

* refactor: not used anymore

* refactor: minify

* refactor: minify

* fix: import
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.

Set the color of Cat's cat ears from the color of the joint
3 participants