Skip to content

リアクションボタンをホバーした時のユーザー名を見えるようにした#9788

Merged
komagata merged 2 commits intomainfrom
bug/name-not-visible-when-hovering-reaction-btn
Mar 25, 2026
Merged

リアクションボタンをホバーした時のユーザー名を見えるようにした#9788
komagata merged 2 commits intomainfrom
bug/name-not-visible-when-hovering-reaction-btn

Conversation

@zecky1120
Copy link
Copy Markdown
Contributor

@zecky1120 zecky1120 commented Mar 12, 2026

Issue

概要

Q&Aページの回答・コメントの箇所でコメントを入れた後、リアクションボタンを付け加えマウスオーバーするとリアクションしたユーザー名が見えなかったが、CSSで調整し見えるようにした。

変更確認方法

  1. bug/name-not-visible-when-hovering-reaction-btnをローカルに取り込む
  2. Q&Aページへ移動し、質問するボタンをクリックします
  3. 質問を作成する
  4. その後、コメント欄に文章を入力した後4つほどリアクションを追加する
  5. この時、リアクションボタンをホバーした時ユーザー名がボタンの後ろになっていることを確認します
  6. bin/devを実行する
  7. リアクションボタンをホバーするとボタンの前にユーザー名が前になっていることを確認します

Screenshot

変更前

default.mov

変更後

default.mov

Summary by CodeRabbit

リリースノート

  • スタイル
    • マウス利用時(ファインポインタ)の条件で、リアクションのホバー表示におけるツールチップの表示位置と表示レイヤー(重なり順)を調整しました。これにより、ユーザー名ポップアップの表示安定性と視認性が向上します。

@zecky1120 zecky1120 self-assigned this Mar 12, 2026
@github-actions github-actions bot requested a review from okuramasafumi March 12, 2026 12:27
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 12, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: ae532bc7-e5e4-4e4c-a214-822a5e6dad91

📥 Commits

Reviewing files that changed from the base of the PR and between 31ae6c0 and 2d5202d.

📒 Files selected for processing (1)
  • app/assets/stylesheets/application/blocks/reaction/_reaction.css
🚧 Files skipped from review as they are similar to previous changes (1)
  • app/assets/stylesheets/application/blocks/reaction/_reaction.css

📝 Walkthrough

Walkthrough

ファインポインタ向けメディアクエリ内で、ホバー状態の .reactions__item-login-namesz-index: 2 を追加しました。表示動作(display: block)はそのままで、他のロジックやファイルには変更はありません。

Changes

Cohort / File(s) Summary
リアクション機能のスタイル
app/assets/stylesheets/application/blocks/reaction/_reaction.css
ファインポインタメディアクエリ内のホバー状態で .reactions__item-login-namesz-index: 2 を追加(既存の display: block は維持)。その他の変更なし。

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 分

Suggested reviewers

  • komagata

🐰 ホバーでひょいと、名前が浮かぶよ
小さな z-index、二重の舞台へ
重なりを整え、きらりと見える
ちいさな一行で、表示は整う
うさぎはぴょんと、変更を祝う 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed PRのタイトルは、リアクションボタンホバー時にユーザー名が見えるようになったという変更の主要な目的を明確に説明しており、変更セットに直接関連しています。
Description check ✅ Passed PR説明は、テンプレートのすべての必須セクション(Issue、概要、変更確認方法、Screenshot)を含み、詳細かつ完全に記載されています。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch bug/name-not-visible-when-hovering-reaction-btn

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
app/assets/stylesheets/application/blocks/reaction/_reaction.css (1)

58-63: z-index の修正は問題を適切に解決しています。position: absolute は冗長です。

z-index: 2 への変更により、ホバー時にツールチップが隣接するリアクションボタンの上に表示されるようになり、PR の目的を達成しています。

ただし、position: absolute はベーススタイル(82行目)で既に定義されているため、ここでの再宣言は不要です。削除しても動作に影響はありません。

♻️ 冗長な宣言を削除する提案
 `@media` (pointer: fine) {
   .reactions__item:hover .reactions__item-login-names {
     display: block;
-    position: absolute;
     z-index: 2;
   }
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/assets/stylesheets/application/blocks/reaction/_reaction.css` around
lines 58 - 63, Remove the redundant position declaration from the hover rule: in
the .reactions__item:hover .reactions__item-login-names selector keep the
z-index: 2 change but delete position: absolute since the base
.reactions__item-login-names rule already sets positioning; this avoids
duplicate CSS while preserving the intended tooltip stacking behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@app/assets/stylesheets/application/blocks/reaction/_reaction.css`:
- Around line 58-63: Remove the redundant position declaration from the hover
rule: in the .reactions__item:hover .reactions__item-login-names selector keep
the z-index: 2 change but delete position: absolute since the base
.reactions__item-login-names rule already sets positioning; this avoids
duplicate CSS while preserving the intended tooltip stacking behavior.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: aad098d4-0fc7-4dd4-8b69-997b1617c6ee

📥 Commits

Reviewing files that changed from the base of the PR and between 874caae and 31ae6c0.

📒 Files selected for processing (1)
  • app/assets/stylesheets/application/blocks/reaction/_reaction.css

Copy link
Copy Markdown
Contributor Author

@zecky1120 zecky1120 left a comment

Choose a reason for hiding this comment

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

@shibainurou
お疲れ様です! レビュー依頼をお願いしたいのですが、可能でしょうか。
難しければご連絡ください〜🙏

@zecky1120 zecky1120 requested a review from shibainurou March 13, 2026 11:21
@shibainurou
Copy link
Copy Markdown
Contributor

@machida cc: @zecky1120
お疲れ様です。この修正についてご相談させてください。

今回の修正
 ツールチップがボタンの裏に入ってしまうのでz-indexを2に変更している

相談内容
 ツールチップは基本的に最前面に出て欲しいはずなので2ではなく10ぐらいにしてもよいと考えているのですがいかがでしょうか? あまり考えにくいですが、今後新しいオブジェクトが追加されたときにまた同じ事象になるかも?と思っています。

@machida
Copy link
Copy Markdown
Member

machida commented Mar 22, 2026

@shibainurou 今回は2で大丈夫です。今回は発生している問題の解決にスコープを絞ろうと思います。次に問題が発生したら、適当な数字を振るのではなく、ルールを作り、そのルールに基づいた数字の割り振りをしたいと思います。

@shibainurou
Copy link
Copy Markdown
Contributor

@machida
ありがとうございます!

@zecky1120
お待たせしました。レビュー完了しました。修正内容に問題ありません!

@zecky1120
Copy link
Copy Markdown
Contributor Author

@okuramasafumi
開発チームメンバーのレビューが終わりましたので、こちらのレビューをお願いできますでしょうか。
よろしくお願いします!🙏

@okuramasafumi
Copy link
Copy Markdown
Contributor

LGTM!

@zecky1120
Copy link
Copy Markdown
Contributor Author

@komagata
お疲れ様です! レビューが終わりましたので、ステージング環境へマージお願いいたします〜😊

Copy link
Copy Markdown
Member

@komagata komagata left a comment

Choose a reason for hiding this comment

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

確認させていただきました。OKです〜🙆‍♂️

@komagata komagata merged commit 31a434d into main Mar 25, 2026
10 checks passed
@komagata komagata deleted the bug/name-not-visible-when-hovering-reaction-btn branch March 25, 2026 05:06
@github-actions github-actions bot mentioned this pull request Mar 25, 2026
27 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants