Repository navigation
Conversation
- 新增 TruncatedText 组件,实现智能文本截断提示功能,仅当文本被截断时才显示悬浮提示 - 为 AutoComplete 和 AutoCompleteSelect 组件添加 portalContainer 属性,解决在 Dialog 内无法滚动的问题 - 修改 PopoverContent 组件以支持容器指定,允许在对话框等复杂布局中正确处理弹出层 - 在 API 密钥配置对话框中集成 portalContainer,修复模型映射选择器的滚动问题 - 优化了自动完成组件的列表样式,移除固定高度,使其更灵活适应不同内容
Summary of ChangesHello @Silentely, 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! 本次拉取请求主要旨在提升用户界面体验,特别是针对自动完成组件和弹出层在复杂布局中的表现。通过引入一个智能文本截断组件,并为弹出层机制添加了可配置的容器支持,解决了在对话框内使用自动完成选择器时出现的滚动和显示问题。这些改进确保了长文本能够优雅地显示,并且弹出层在任何父容器中都能正确地定位和交互。 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.
Code Review
This pull request introduces a new TruncatedText component designed to display a tooltip only when its content is visually truncated, and integrates it into the AutoComplete and AutoCompleteSelect components. Additionally, it attempts to resolve a Popover scrolling issue within dialogs by adding a portalContainer prop to PopoverContent and passing a reference to the DialogContent element. However, the reviewer noted two key problems: the TruncatedText component lacks responsiveness to dynamic content or container resizing, suggesting a more robust implementation using useEffect and ResizeObserver; and the portalContainer solution for dialogs is currently ineffective because the DialogContent component does not forward refs, and useRef updates do not trigger necessary re-renders, recommending a useState with a callback ref approach and a separate modification to the DialogContent component.
- 在 TruncatedText 组件中使用 ResizeObserver 替代 mouseEnter/mouseLeave 事件,实现更准确的动态截断检测 - 重构 TruncatedText 组件使用 useEffect 管理生命周期,提升性能并确保容器大小变化时能正确响应 - 将 DialogContent 组件重构为使用 forwardRef 模式,提高代码可维护性和类型安全性 - 在 ApiKeysProfilesDialog 中适配对话框内容引用状态更新,确保 Popover 滚动功能正常工作 - 移除过时的 ref 类型,使用更合适的 HTMLDivElement 类型替代 DialogContentRef
修复在apikey密钥配置文件模型映射模型下拉列表无法滚动的问题


修复测试场模型名称过长被截断问题,增加悬浮组件显示完整名称