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

refactor: 拡張機能インストールのページの一部をコンポーネントとして分離 #14654

Merged
merged 8 commits into from
Oct 7, 2024

Conversation

FineArchs
Copy link
Contributor

@FineArchs FineArchs commented Sep 30, 2024

What

「外部サイトから(拡張機能を)インストール」のページの一部をコンポーネント化します。

Why

将来プラグインやテーマをインストールする窓口を増やす時にUIを流用可能にするため。
#12986 など

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 Sep 30, 2024
Copy link

codecov bot commented Sep 30, 2024

Codecov Report

Attention: Patch coverage is 0% with 250 lines in your changes missing coverage. Please review.

Project coverage is 19.50%. Comparing base (a3d236c) to head (fd58e9c).
Report is 261 commits behind head on develop.

Files with missing lines Patch % Lines
...s/frontend/src/components/MkExtensionInstaller.vue 0.00% 145 Missing and 1 partial ⚠️
...rc/components/MkExtensionInstaller.stories.impl.ts 0.00% 82 Missing and 1 partial ⚠️
packages/frontend/src/pages/install-extensions.vue 0.00% 21 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           develop   #14654       +/-   ##
============================================
- Coverage    41.74%   19.50%   -22.25%     
============================================
  Files         1549      718      -831     
  Lines       196555   101655    -94900     
  Branches      2767      989     -1778     
============================================
- Hits         82055    19826    -62229     
+ Misses      113939    81281    -32658     
+ Partials       561      548       -13     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment on lines 65 to 66
<!-- TODO: ハッシュ検証に失敗した場合の表示も作る -->
<!-- その場合、hashVerifiedがfalseなら失敗表示、undefinedなら表示なしで分けたい -->
Copy link
Contributor

Choose a reason for hiding this comment

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

ハッシュ検証のエラー画面出し分けはinstall-extensions.vueでやってるので、失敗した場合のハンドリングをここでやる必要はないかも

Copy link
Contributor Author

Choose a reason for hiding this comment

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

このコンポーネント分離は他の場所からも使用できるようにすることを念頭に置いています。
install-extensions.vue以外から使われる可能性があるので、場合によってはここでハンドリングすることもあると思います。

Copy link
Contributor

Choose a reason for hiding this comment

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

ならエラー画面もろとも引っ越す必要がありそう(ハッシュ検証に失敗した場合はそもそもインストールさせないので)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

すみません、色々混乱していました。
よく考えたらこのコンポーネントは表示専用に作っているのでエラーハンドリングを行わせる予定は最初から無かったですし、懸念事項は「props.hashVerifiedがboolean型なのを見て、falseにすれば失敗画面が出ると勘違いする人が出る」ことだったので単にコメントで注釈を書けばいいですね。その方向で修正します。

@kakkokari-gtyih
Copy link
Contributor

もしくはもっと柔軟にするべくハッシュ計算とかの部分をslot name="additionalInfo"とかにしておくのでもよさそう

@FineArchs
Copy link
Contributor Author

もしくはもっと柔軟にするべくハッシュ計算とかの部分をslot name="additionalInfo"とかにしておくのでもよさそう

そのようにしました。

@syuilo
Copy link
Member

syuilo commented Oct 3, 2024

これテストするのどうしたら良いかしら

@FineArchs
Copy link
Contributor Author

これテストするのどうしたら良いかしら

storybookで十分な気もしますが…

@syuilo syuilo merged commit ed89b4b into misskey-dev:develop Oct 7, 2024
21 of 23 checks passed
@syuilo
Copy link
Member

syuilo commented Oct 7, 2024

👍🏻

@FineArchs FineArchs deleted the sep-extInst branch October 7, 2024 05:05
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.

3 participants