Repository navigation
UX:收起取消 Star 操作并简化仓库界面提示 - #443
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthrough调整仓库卡片溢出菜单和网格菜单行为。问答历史数量改为在历史抽屉标题中显示。多种语言的仓库健康相关标签更新为“仓库概况”。 Changes仓库卡片操作
问答历史会话数量
仓库概况文案
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Feature Suggested reviewers: Merge Risk: ⚪ Minimal · up to No demonstrated issue blocks merging. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)✅ Passed checks (4 passed)
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 |
PR #443 审计报告与改进建议感谢对仓库操作和问答历史 UI 的优化!经代码审计及对比 CodeRabbit 检查结果,发现以下几点需要完善的问题,供作者参考修复: 1. CodeRabbit 预合并检查告警 (Docstring Coverage 0.00% < 80.00%)
/**
* Calculates the number of primary quick actions visible outside the overflow menu.
*
* Reserves one action slot for the persistent "More actions" menu button when
* width is constrained.
*
* @param width - Available width in pixels for the action row.
* @param primaryActionCount - Total count of primary actions available for display.
* @returns Number of actions to render inline before the overflow menu trigger.
*/2. 网格(Grid)模式下点击卡片空白收起操作菜单会误触发打开 README 模态框
3. 操作菜单顶部出现多余的孤立分割线
const hasPrimaryOverflowItems =
!showAnalyze ||
Boolean(onAskRepository && !showAsk) ||
!showSubscribe ||
!showEdit ||
!showReleases ||
!showDocs ||
!showGithub;
const hasUpperItems = hasPrimaryOverflowItems || showFindSimilarInMenu;
const hasItemsAboveUnstar = hasUpperItems || pluginActions.length > 0;
// 下拉菜单内条件渲染:
{pluginActions.length > 0 ? (
<>
{hasUpperItems ? <DropdownMenuSeparator /> : null}
<DropdownMenuLabel>{t('repositoryCard.plugin-actions')}</DropdownMenuLabel>
<PluginRepositoryActionItems actions={pluginActions} repository={repository} language={language} />
</>
) : null}
{hasItemsAboveUnstar ? <DropdownMenuSeparator /> : null}
<DropdownMenuItem className="text-destructive focus:text-destructive" disabled={unstarring} onSelect={() => void onUnstar()}>
<StarOff className={`mr-2 h-3.5 w-3.5 ${unstarring ? 'animate-pulse' : ''}`} />
{t('repositoryCard.unstar')}
</DropdownMenuItem>4. 清理 ResizeObserver useEffect 中的遗留过时依赖
5. 对齐 Grid 模式编辑按钮提示
editButtonTitle={displayContent.isCustomized ? t('repositoryCard.customized-edit-repository-info') : t('repositoryCard.edit-repository-info')} |
|
这五项已在 |
对应 #440。按讨论仅做三处小调整:取消 Star 始终放在操作菜单底部,与普通操作分隔,保留原有确认流程;“仓库健康事实”更名为“仓库概况”,仍留在 Release 侧栏供 Web/Docker 用户使用;移除问答历史入口的数字徽标,改在历史侧栏标题显示当前加载的会话数。
没有调整其他按钮顺序,也没有新增插件分类或常驻入口。
验证:相关 45 项测试、TypeScript 类型检查、i18n 和前端边界检查通过。
Summary by CodeRabbit