Skip to content

spanに付くclassがimgについていたのを修正#8979

Merged
machida merged 2 commits intomainfrom
bug/spanClassName
Jul 24, 2025
Merged

spanに付くclassがimgについていたのを修正#8979
machida merged 2 commits intomainfrom
bug/spanClassName

Conversation

@machida
Copy link
Copy Markdown
Member

@machida machida commented Jul 23, 2025

Summary by CodeRabbit

  • スタイル
    • 通知アイコンのユーザーアバター表示部分のクラス名を調整し、スタイリングを改善しました。

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jul 23, 2025

Walkthrough

Notifications.jsxNotification コンポーネント内で、ユーザーアイコンを囲む span 要素に付与されるクラス名が変更されました。従来の関数によるクラスに加え、新たに header-notifications-item__user-icon クラスが追加され、imgspanClassName 属性は削除されました。

Changes

ファイルパス 変更内容概要
app/javascript/components/NotificationsBell/Notifications.jsx ユーザーアイコン用 span のクラス名を追加・修正、img の不要な属性を削除

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐇 ピョンと跳ねてコードを見たら、
アイコンの枠がきれいになった。
クラスが増えて、すっきり整列、
余計な属性はサヨナラさ。
通知のベルも嬉しそう、
春風みたいな小さな修正!

Note

⚡️ Unit Test Generation - Beta

CodeRabbit's unit test generation is now available in Beta! Automatically generate comprehensive unit tests for your code changes, ensuring better test coverage and catching edge cases you might miss. Our AI analyzes your code structure and creates tests that follow best practices and your project's testing patterns. Learn more here, or just try it under ✨ Finishing Touches.


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5ea0435 and 0f35fc3.

📒 Files selected for processing (1)
  • app/javascript/components/NotificationsBell/Notifications.jsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • app/javascript/components/NotificationsBell/Notifications.jsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build_and_test
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch bug/spanClassName

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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.

Actionable comments posted: 0

🧹 Nitpick comments (2)
app/javascript/components/NotificationsBell/Notifications.jsx (2)

61-65: alt テキストを動的値にしてアクセシビリティ向上を

alt="User Icon" だと汎用的すぎるため、送信者名を含めるとスクリーンリーダー利用者に親切です。

-  alt="User Icon"
+  alt={`${notification.sender.name || 'ユーザー'} のアイコン`}

50-52: 無名関数の毎回生成を避けてレンダリングコストを削減

createdAtFromNowNotification 内部で定義し直すたびに新しい関数が生成されます。外側へ切り出すか util にまとめるとメモリ効率が向上します。

Also applies to: 70-71

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9e97a5a and 5ea0435.

📒 Files selected for processing (1)
  • app/javascript/components/NotificationsBell/Notifications.jsx (1 hunks)
🧬 Code Graph Analysis (1)
app/javascript/components/NotificationsBell/Notifications.jsx (1)
app/javascript/components/UserIconFrameClass.jsx (1)
  • UserIconFrameClass (1-5)
🧰 Additional context used
🧬 Code Graph Analysis (1)
app/javascript/components/NotificationsBell/Notifications.jsx (1)
app/javascript/components/UserIconFrameClass.jsx (1)
  • UserIconFrameClass (1-5)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build_and_test
🔇 Additional comments (1)
app/javascript/components/NotificationsBell/Notifications.jsx (1)

60-60: BEM クラス追加は妥当です 👍

header-notifications-item__user-icon の付与でスタイリングが一貫します。不整合や重複もなく安全にマージできます。

@machida machida self-assigned this Jul 23, 2025
@machida machida merged commit 19153f6 into main Jul 24, 2025
3 checks passed
@machida machida deleted the bug/spanClassName branch July 24, 2025 04:30
@github-actions github-actions bot mentioned this pull request Jul 24, 2025
87 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.

1 participant