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

ScratchpadにUIインスペクターを追加 #14565

Merged
merged 19 commits into from
Sep 17, 2024

Conversation

FineArchs
Copy link
Contributor

@FineArchs FineArchs commented Sep 17, 2024

What

サンプル映像
「UIインスペクター」から、実行中のスクリプトで生成されたUIコンポーネントのインスタンスの一覧、およびそれらのプロパティを見ることができるようにします。

Why

Misskey Aiscript UIのデバッグは情報を得る手段が少なく難易度が高いため、ある程度補助があった方がよいと考えたため。

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

codecov bot commented Sep 17, 2024

Codecov Report

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

Project coverage is 19.72%. Comparing base (0e4b6d1) to head (3a6509f).
Report is 7 commits behind head on develop.

Files with missing lines Patch % Lines
packages/frontend/src/pages/scratchpad.vue 0.00% 59 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #14565      +/-   ##
===========================================
+ Coverage    19.54%   19.72%   +0.17%     
===========================================
  Files          713      713              
  Lines       100312   100375      +63     
  Branches       997      995       -2     
===========================================
+ Hits         19610    19802     +192     
+ Misses       80158    80031     -127     
+ Partials       544      542       -2     

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

@syuilo
Copy link
Member

syuilo commented Sep 17, 2024

名称はinspectorで良さそう

@FineArchs
Copy link
Contributor Author

名称はinspectorで良さそう

UI inspectorとかではなくてinspector単体でいいですか?
あと日本語ではカタカナにします?

@syuilo
Copy link
Member

syuilo commented Sep 17, 2024

UI Inspectorで良さそう
カタカナで良さそう

<MkContainer :foldable="true" :expanded="false">
<template #header>{{ i18n.ts.uiInspector }}</template>
<div :class="$style.uiInspector">
<div v-for="(c, i) in components" :key="i">
Copy link
Member

@syuilo syuilo Sep 17, 2024

Choose a reason for hiding this comment

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

Suggested change
<div v-for="(c, i) in components" :key="i">
<div v-for="c in components">

Copy link
Contributor Author

Choose a reason for hiding this comment

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

v-forを使うならkeyはとりあえずつけておいた方がいいみたいなイメージがありますが、今回は不要なのですか?

Copy link
Member

Choose a reason for hiding this comment

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

インデックスをkeyとして使うのはアンチパターンで、それ使うなら無い方がマシという感じ

Copy link
Contributor Author

Choose a reason for hiding this comment

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

なるほど、言われてみればインデックスをkeyにすると結局値との対応関係が保たれないですね
c.value.idではどうですか?

Copy link
Member

Choose a reason for hiding this comment

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

良さそう

FineArchs and others added 2 commits September 17, 2024 17:18
Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
@FineArchs FineArchs changed the title ScratchpadにUIコンポーネントモニターを追加 ScratchpadにUIインスペクターを追加 Sep 17, 2024
@syuilo syuilo merged commit daf9ae5 into misskey-dev:develop Sep 17, 2024
21 of 22 checks passed
@syuilo
Copy link
Member

syuilo commented Sep 17, 2024

👍🏻

@FineArchs FineArchs deleted the pad-uilist branch September 17, 2024 14:15
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