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(frontend): popupMenuの項目作成時に三項演算子をなるべく使わないように #14554

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

kakkokari-gtyih
Copy link
Contributor

@kakkokari-gtyih kakkokari-gtyih commented Sep 15, 2024

What

書いてあるとおり

Why

読みやすさが上がる

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 15, 2024
@anatawa12
Copy link
Member

なんかパフォーマンスとかを気にしてそうしてると思ってたけど、そうじゃないならpushにするの強く賛成

オフトピ

(あとdivierをなんかいい感じにMenuItem[][]とかから生成できるともっと便利そうだと思ってたりするけど色々考えると面倒なので一旦なしで良さそう)

@syuilo
Copy link
Member

syuilo commented Sep 15, 2024

(あとdivierをなんかいい感じにMenuItem[][]とかから生成できるともっと便利そうだと思ってたりするけど色々考えると面倒なので一旦なしで良さそう)

これはやる予定

Copy link

codecov bot commented Sep 15, 2024

Codecov Report

Attention: Patch coverage is 6.56325% with 783 lines in your changes missing coverage. Please review.

Project coverage is 19.52%. Comparing base (837a8e1) to head (0f5b810).
Report is 7 commits behind head on develop.

Files with missing lines Patch % Lines
packages/frontend/src/scripts/get-note-menu.ts 0.58% 170 Missing ⚠️
packages/frontend/src/scripts/get-user-menu.ts 0.65% 152 Missing ⚠️
packages/frontend/src/ui/_common_/common.ts 0.00% 70 Missing ⚠️
packages/frontend/src/ui/deck/column.vue 0.00% 65 Missing ⚠️
packages/frontend/src/pages/page.vue 0.00% 62 Missing ⚠️
packages/frontend/src/ui/deck/tl-column.vue 0.00% 35 Missing ⚠️
packages/frontend/src/pages/gallery/post.vue 0.00% 30 Missing ⚠️
packages/frontend/src/components/MkMediaImage.vue 3.44% 28 Missing ⚠️
packages/frontend/src/account.ts 3.57% 27 Missing ⚠️
...ckages/frontend/src/scripts/get-drive-file-menu.ts 0.00% 23 Missing ⚠️
... and 16 more
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #14554      +/-   ##
===========================================
- Coverage    19.53%   19.52%   -0.02%     
===========================================
  Files          713      713              
  Lines       100287   100549     +262     
  Branches       997      997              
===========================================
+ Hits         19591    19631      +40     
- Misses       80152    80374     +222     
  Partials       544      544              

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

@kakkokari-gtyih
Copy link
Contributor Author

多分いけてると思うけど変換ミスがあるかもしれないので確認してから(そのためにdraftにしてある)

text: i18n.ts._pages.viewSource,
action: () => router.push(`/@${props.username}/pages/${props.pageName}/view-source`),
}, {
icon: 'ti ti-exclamation-circle',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

ここは本来こうあるべきだったので修正(自分にはページの編集画面へのリンク・他人にはソースを表示へのリンクが表示されるはずだった)

@kakkokari-gtyih kakkokari-gtyih marked this pull request as ready for review September 15, 2024 09:45
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