docs: document align.overflow option including alwaysByViewport#511
Conversation
|
@yoyo837 is attempting to deploy a commit to the React Component Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
WalkthroughREADME 更新了 Tooltip 组件的 变更内容Tooltip 属性文档补充
预期审查工作量🎯 1 (Trivial) | ⏱️ ~3 分钟 建议审查者
诗
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@README.md`:
- Line 86: 修复 README 中锚点不一致:将标题 `### align.overflow` 统一为可被 Markdown
渲染器识别的稳定锚点形式(例如改为 `### align overflow` 或在标题下添加显式锚点 HTML),并把当前使用的链接
`#align-overflow` 与该标题对齐;在涉及的片段(标题 `### align.overflow` 和引用该片段的链接
`#align-overflow`)中保持一致,确保另外提到的相同问题处(另一个引用处)一并同步修改。
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
There was a problem hiding this comment.
Code Review
This pull request updates the README.md to include detailed documentation for the align.overflow property, including a new configuration table and a usage example. The review feedback correctly identifies that the internal anchor links are broken due to how GitHub processes dots in markdown headers; suggestions were provided to rename the header and update the links to ensure proper navigation.
| | classNames | classNames?: { root?: string; container?: string;}; | | Semantic DOM class | | ||
| | styles | styles?: {root?: React.CSSProperties;container?: React.CSSProperties;}; | | Semantic DOM styles | | ||
|
|
||
| ### align.overflow |
There was a problem hiding this comment.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #511 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 3 3
Lines 36 36
Branches 14 14
=========================================
Hits 36 36 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR updates the README to document the align.overflow configuration (from dom-align), including the previously undocumented alwaysByViewport option, so consumers can correctly configure tooltip overflow behavior.
Changes:
- Updates the
alignprop description to referencedom-alignand link to a new overflow section. - Adds a new
align.overflowsection documentingadjustX,adjustY, andalwaysByViewport. - Adds a JSX usage example demonstrating
alwaysByViewport.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| | getTooltipContainer | (triggerNode: HTMLElement) => HTMLElement | () => document.body | get container of tooltip, default to body | | ||
| | destroyOnHidden | boolean | false | destroy tooltip when it is hidden | | ||
| | align | object | | align config of tooltip. Please ref demo for usage example | | ||
| | align | object | | align config of tooltip, ref [dom-align](https://github.com/yiminghe/dom-align). See [align overflow](#align-overflow) below | |
Change header from '### align.overflow' to '### Align Overflow' so the generated anchor #align-overflow matches the link in the props table.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Closes #363
Add documentation for the configuration, specifically the option from dom-align.
Changes
Summary by CodeRabbit