Repository navigation
feat(ui): タッチでも押したことが伝わる見た目(active)を付ける - #30
Merged
Merged
Conversation
- hover だけだった部品(Link・Card・Accordion・Checkbox / Radio / Switch・入力欄・NotificationBanner の閉じる)に、hover と同じ見た目の active: を足した - Button の enabled: を not-disabled: に替え、buttonVariants を <a> に当てても hover と押した見た目が出るようにした - テーマで端末のタップの塗りを消した。iOS Safari の touchstart の受け手を README に記載 - クラス監査に enabled-variant と hover-without-active を追加 bouzu(tkc310/bouzu#84・#89)での知見を反映。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S5dPLGGVzZyRz8dob3cTmz
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by tkc310 · project thread
変更内容
bouzu(tkc310/bouzu#84・#89)で見つかった「スマホで押しても見た目が変わらない」問題を、8341-ui の側で直します。
なぜ: Tailwind v4 の
hover:は@media (hover: hover)の端末でだけ効くので、タッチではボタン以外の押せる部品を押しても何も変わりませんでした。また、buttonVariantsを<a>に当てた「ボタンの見た目のリンク」は、Button の hover と押した見た目がenabled:で書かれていて:enabledが<a>に当たらないため、マウスでも押しても変わりませんでした。active:を足した: Link(下線も hover と同じ太さに)、Card(href)、Accordion、Checkbox / Radio / Switch(ラベルの文字を押しても四角・丸・トラックに出る)、入力欄、NotificationBanner の閉じるenabled:hover:/enabled:active:をnot-disabled:に替えた-webkit-tap-highlight-color)を消し、部品の active と二重にしないtouchstartの受け手が無いと:activeを当てないので、アプリ側でdocumentに passive の受け手を置く方法を README に書いた(インラインのontouchstartは CSP で止まるのでスクリプトで付ける)enabled:hover:の記述を直したStorybook プレビュー
なし(ホバーできない端末での押下時の見た目の変更のため、静止画では差が出ません。Storybook をスマホで開いて押すか、DevTools の
:activeで確かめてください)完了の定義
make checkとmake testが通る.changeset/press-feedback.md、patch)改善ループ
docs/improvement/log.mdに 1 行追記したenabled-variant(enabled:を禁止)とhover-without-active(hover:があるのにactive:が無い部品を止める)。main のままだと 9 件の error になることを確かめた。Button(リンクに当てたとき)・Link のテストGenerated by Claude Code