Skip to content

[codex] Fill notification semantic class names#390

Merged
zombieJ merged 1 commit intomasterfrom
codex/fill-notification-semantic-classes
May 7, 2026
Merged

[codex] Fill notification semantic class names#390
zombieJ merged 1 commit intomasterfrom
codex/fill-notification-semantic-classes

Conversation

@zombieJ
Copy link
Copy Markdown
Member

@zombieJ zombieJ commented May 7, 2026

Summary

  • add the missing default rc-notification-notice-wrapper class to the wrapper semantic node
  • update wrapper semantic assertions to verify custom class names merge with the default class
  • add coverage that all Notification semantic nodes keep their default class names

Validation

  • npm test -- --run tests/index.test.tsx
  • npm test
  • npm run lint (passes with existing react-hooks warnings)

Summary by CodeRabbit

发布说明

  • Bug Fixes
    • 改进了通知组件的 CSS 类名应用方式,确保包装元素的样式类名前缀和用户提供的自定义类名能够正确应用和组合。

@vercel
Copy link
Copy Markdown

vercel Bot commented May 7, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
notification Error Error May 7, 2026 3:31am

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 7, 2026

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 526f6876-cbe0-499f-84ba-6795016df4e3

📥 Commits

Reviewing files that changed from the base of the PR and between c56bff8 and 8f902c9.

📒 Files selected for processing (2)
  • src/Notification.tsx
  • tests/index.test.tsx

演示

该 PR 更新了通知组件包装器元素的类名处理方式,使用 clsx 合并前缀类与用户提供的类,并添加了相应的测试用例以验证语义类名的正确应用。

变更

包装器元素语义类应用

层级 / 文件 总结
包装器元素类处理
src/Notification.tsx
包装器元素的 className 现在使用 clsx${noticePrefixCls}-wrapper 前缀与 classNames?.wrapper 组合。
测试验证
tests/index.test.tsx
更新了包装器元素样式/类的测试断言,并添加了新测试以验证所有主要通知语义插槽的默认类名。

预估代码审查工作量

🎯 2 (简单) | ⏱️ ~10 分钟

可能相关的 PR

  • react-component/notification#385:两个 PR 都修改了 Notification.tsx 的语义插槽/类名/样式处理(包括测试和 NotificationList 类名/样式合并),因此存在关联。

建议审查者

  • afc163

🐰 窝の通知 wrapper class,
前缀和用户の类合并,
clsx 来帮忙,
语义槽々有了名字,
测试验证都完美!

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/fill-notification-semantic-classes

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.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.19%. Comparing base (c56bff8) to head (8f902c9).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #390   +/-   ##
=======================================
  Coverage   99.19%   99.19%           
=======================================
  Files          13       13           
  Lines        1369     1372    +3     
  Branches      182      182           
=======================================
+ Hits         1358     1361    +3     
  Misses         11       11           

☔ 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.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request ensures that the notification component's wrapper div includes a default CSS class name alongside any user-provided class names. It also adds a comprehensive test suite to verify that all semantic sub-components of the notification maintain their expected default class names. I have no feedback to provide as there were no review comments.

@zombieJ zombieJ marked this pull request as ready for review May 7, 2026 03:54
@zombieJ zombieJ merged commit 1edb905 into master May 7, 2026
8 of 10 checks passed
@zombieJ zombieJ deleted the codex/fill-notification-semantic-classes branch May 7, 2026 03:54
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