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

enhance(frontend): CWの注釈テキストが入力されていない場合はPostボタンを非アクティブに #15639

Merged

Conversation

r-ca
Copy link
Contributor

@r-ca r-ca commented Mar 9, 2025

What

  • CW有効時, CWテキストが入力されていない状態ではPostボタンがアクティブにならないように
  • CW無効時, CWテキストの最大文字数をチェックしないように
    • 空文字チェックを行う条件としてCW有効状態を使用しているため、そこに最大文字数チェックも含めた形です

image

Why

Resolve #14151

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 Mar 9, 2025
Copy link

codecov bot commented Mar 9, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 15.34%. Comparing base (f797765) to head (5400cdd).
Report is 2 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff              @@
##           develop   #15639       +/-   ##
============================================
- Coverage    41.89%   15.34%   -26.55%     
============================================
  Files         1625      787      -838     
  Lines       165998    72307    -93691     
  Branches      4107     1279     -2828     
============================================
- Hits         69545    11099    -58446     
+ Misses       95975    60783    -35192     
+ Partials       478      425       -53     

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

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@r-ca
Copy link
Contributor Author

r-ca commented Mar 9, 2025

CW無効時, CWテキストの最大文字数をチェックしないように

Issueの本題からは逸れるものですが、(個人的には)逆にこの行だけを条件式から外したままにするほうが違和感を感じるので、一旦含めた形にしました。
挙動が変わるため、こちらも一応CHANGELOGには含めています。

@r-ca
Copy link
Contributor Author

r-ca commented Mar 9, 2025

この変更で(おそらく)cwNotationRequiredが不要になるはずですが、i18n関係をどこまで消すべきなのかよくわかっていないので一旦そのままにしています

@r-ca r-ca changed the title enhance: CWの注釈テキストが入力されていない場合はPostボタンを非アクティブに enhance(frontend): CWの注釈テキストが入力されていない場合はPostボタンを非アクティブに Mar 9, 2025
Copy link
Contributor

@tai-cha tai-cha left a comment

Choose a reason for hiding this comment

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

UI上投稿できないことが明確になってわかりやすくなりそうです
コードの変更も良さそうに思います

i18nに関しては消してもいいし、CWがないときにはフォームにチュートリアルが出る仕様などにするのもよいかもしれませんが一旦このままでも個人的にはいいと思います

@mi-gh-maintainer mi-gh-maintainer bot merged commit 6841cdf into misskey-dev:develop Mar 10, 2025
9 checks passed
Copy link

Thank you 🙏

DA-TENSHI pushed a commit to SHINANOSKEY-Projekt/SHINANOSKEY that referenced this pull request Mar 10, 2025
…15639)

* add condition to disable post button when CW text is empty

* standardize condition by using 1<= inserted of 0<

* unify CW text length condition to improve readability

* add missing CW state check

* fix state check, add empty/null check, improve max length validation

* simplify CW validation by removing minimum length check

* Update CHANGELOG

* remove CW text validation in post()

---------

Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
Ruruke pushed a commit to Ruruke/rukey that referenced this pull request Mar 11, 2025
…15639)

* add condition to disable post button when CW text is empty

* standardize condition by using 1<= inserted of 0<

* unify CW text length condition to improve readability

* add missing CW state check

* fix state check, add empty/null check, improve max length validation

* simplify CW validation by removing minimum length check

* Update CHANGELOG

* remove CW text validation in post()

---------

Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
harumaki2000 pushed a commit to harumaki2000/misskey-layp that referenced this pull request Mar 11, 2025
…15639)

* add condition to disable post button when CW text is empty

* standardize condition by using 1<= inserted of 0<

* unify CW text length condition to improve readability

* add missing CW state check

* fix state check, add empty/null check, improve max length validation

* simplify CW validation by removing minimum length check

* Update CHANGELOG

* remove CW text validation in post()

---------

Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
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
Development

Successfully merging this pull request may close these issues.

CWの注釈テキストが入力されていない場合はPostボタンを非アクティブに
4 participants