-
Notifications
You must be signed in to change notification settings - Fork 37
feat: adapt semantic close #83
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
base: master
Are you sure you want to change the base?
feat: adapt semantic close #83
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. Walkthrough在 DefaultPanel 的关闭按钮上新增对 Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
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. Comment |
Summary of ChangesHello @Arktomson, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the customization options for the close button within tour steps. It introduces the ability to apply custom CSS classes and inline styles directly to the close button, and formally recognizes 'close' as a semantic element. This change provides developers with more control over the appearance and behavior of the tour step's close functionality. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this 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 correctly adds support for semantic styling of the close button, allowing className and style customization. The implementation is consistent with existing patterns in the codebase. My main feedback is to add test coverage for this new feature to ensure its correctness and prevent future regressions.
src/TourStep/DefaultPanel.tsx
Outdated
| className={classNames(`${prefixCls}-close`, tourClassNames?.close)} | ||
| style={styles?.close} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While the implementation for applying custom className and style to the close button is correct, this pull request is missing corresponding tests to verify the new functionality. Please add a test case to ensure that tourClassNames.close and styles.close are applied as expected. You could extend the existing 'support custom styles' test in tests/index.test.tsx for this.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #83 +/- ##
=======================================
Coverage 99.07% 99.07%
=======================================
Files 10 10
Lines 217 217
Branches 97 98 +1
=======================================
Hits 215 215
Misses 2 2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
ok
…---Original---
From: ***@***.***>
Date: Sat, Sep 27, 2025 11:27 AM
To: ***@***.***>;
Cc: "sheng ***@***.******@***.***>;
Subject: Re: [react-component/tour] feat: adapt semantic close (PR #83)
@coding-ice commented on this pull request.
In src/TourStep/DefaultPanel.tsx:
> @@ -41,7 +41,8 @@ export default function DefaultPanel(props: DefaultPanelProps) { onClick={onClose} aria-label="Close" {...ariaProps} - className={`${prefixCls}-close`} + className={classNames(`${prefixCls}-close`, tourClassNames?.close)}
测试用例需要补一下
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
|
同步一下上游分支 |
… arktomson/semantic-close
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
同步一下上游分支吧 |
|
@Arktomson is attempting to deploy a commit to the React Component Team on Vercel. A member of the Team first needs to authorize it. |
|
@coding-ice 合一下不 |
Summary by CodeRabbit
新功能
测试