Repository navigation
fix(pricing): 修复排序菜单打开时导航栏横向位移 - #7145
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. WalkthroughChanges模型广场排序菜单
Estimated code review effort: 1 (Trivial) | ~3 minutes Merge Risk: ⚪ Minimal · up to This localized change disables modal scroll locking only for the pricing sort menu, preventing navigation-bar movement while preserving sorting behavior. No actionable merge-blocking risk remains after normal checks and review. Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Agent
Links
bodywidth changes mui/base-ui#2077scrollbar-gutter: stablemui/base-ui#4645User request
修复模型广场点击“名称 / 价格”排序下拉菜单时顶部导航栏左右晃动的问题;保持修改最小化,不添加自动化测试相关改动。
Out of scope — refuse
Kind
Issue facts
/pricing页面存在垂直滚动条时,打开或关闭“名称 / 价格”排序菜单会改变页面可用宽度,顶部固定导航栏随之横向位移。126.0.6478.26(64 位)、默认浅色主题中稳定复现。/pricing,排序菜单DropdownMenu的modal属性。Relay、billing、deployment 不适用。Change
将模型广场排序菜单的
DropdownMenu设置为modal={false}。Base UI 菜单默认使用 modal 模式;该模式打开时会管理文档滚动。此排序菜单不需要阻止页面其余区域交互,因此仅在该菜单关闭 modal 行为,避免滚动锁改变视口可用宽度,并保持修改局限在问题入口。Research
Duplicate / prior art
scrollbar、"layout shift"、"scroll lock"、dropdown navbar pricing、"model square" dropdown、模型广场 排序 下拉 导航栏、模型广场 晃动、模型广场 抖动、modal false pricing、#7144。Docs and code
web/AGENTS.md要求前端修改执行 typecheck、lint、format 和构建检查。web/src/features/pricing/components/pricing-toolbar.tsx是问题排序菜单的唯一入口。web/src/components/ui/dropdown-menu.tsx直接透传MenuPrimitive.Root.Props,因此可在调用点使用 Base UI 的modal属性。@base-ui/react/menu的modal默认值为true。PricingToolbar只有Pricing一个直接调用方,无受影响执行流程,风险为 LOW。Alternatives considered
DropdownMenu的默认 modal 行为。会改变所有下拉菜单的交互和焦点语义,范围过大。Files
web/src/features/pricing/components/pricing-toolbar.tsxBehavior
Verification
Only what was actually run.
cd web && bun install --frozen-lockfile:通过。cd web && bun run typecheck:通过。cd web && bun x oxlint -c .oxlintrc.json src/features/pricing/components/pricing-toolbar.tsx:0 errors;存在 1 个与本次改动无关的既有react(self-closing-comp)warning(第 137 行)。cd web && bun x oxfmt --check src/features/pricing/components/pricing-toolbar.tsx:通过。cd web && bun run build:通过。git diff --check origin/main...HEAD:通过。detect_changes(scope: compare, base_ref: origin/main):1 个符号、1 个文件、0 个受影响流程,LOW。/pricing,反复打开和关闭排序菜单;顶部导航栏不再横向位移,名称和价格排序选择正常。Risks
Scope check
Summary by CodeRabbit