Repository navigation
Conversation
首页信息流卡片的「更多反馈」点开后只露一条白边,五个反馈选项一个都点不到。 菜单是绝对定位浮层,挂在卡片最后一行按钮下方,而卡片容器带 overflow-hidden, 超出卡片边界的部分被整个裁掉了。 去掉卡片容器的 overflow-hidden,并把菜单抽成 FeedbackMenu 组件, 让「卡片不得裁剪浮层」这条约束能被测试锁住。 浏览器实测:修复前五个选项命中测试全部失败,修复后全部可点, 点「不感兴趣」反馈接口返回 201。
Owner
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
现象
首页信息流的内容卡片,底部「更多反馈」chevron 按钮点开后,按钮变成灰底(已展开态),但下拉菜单本体几乎看不见——只在卡片下边缘露出一条约 18px 高的白边。
五个反馈选项(精选好文 / 有价值 / 不感兴趣 / 不相关 / 过时了)实际一个都点不到,用户只能提交前两个快捷反馈。
根因
frontend/src/app/_components.tsx两处写法相撞:EditorialItem的Panel带overflow-hidden(Tailwind 迁移时随圆角一起加的)。FeedbackButtons的下拉菜单用absolute right-0 top-full,即向下展开。该按钮组在卡片最后一行,菜单整体落在卡片内容盒之外,于是被自己的容器裁掉。
修复
overflow-hidden(它只用于圆角裁剪,与浮层冲突),并在代码注释里写明原因。FeedbackMenu组件,让「承载浮层的卡片不得裁剪溢出」这条约束能被测试锁住。同类核对
按 issue 要求核对了仓库里其它绝对定位下拉:
admin/sources信源采集频率下拉SourceRow内有该下拉,但宿主SourceListPanel已被AdminTable取代、无引用,属死代码,当前界面不渲染today-picks卡片overflow-hidden,但卡片内无绝对定位下拉(按钮组均为常规流内元素);该裁剪用于before:左侧渐变条,属必要用途daily页「更多」下拉结论:首页这处是当前唯一真实存在的同类缺陷。
Verification
本地命令(分支
issue-208-feedback-dropdown-clip):cd frontend && npx tsc --noEmit— 通过cd frontend && npm run test:coverage— 47 个文件 / 380 个测试全过,覆盖率门禁达标make lint— ruff、格式、分层、口径一致、edition 命名、tsc 全部通过变异验证:把
overflow-hidden加回卡片,回归测试立刻变红(卡片容器不裁剪溢出失败),确认测试真能抓住这个缺陷。浏览器实测(本地起后端 + 前端,Playwright 驱动真实 Chromium):
elementFromPoint)全部失败,命中到的是卡片背景与相邻按钮;真实点击超时。POST /api/v1/feedback返回 201,提交{"content_id":47376,"feedback_type":"dislike"}成功。前后对照截图见下方。
备注
点击选项后菜单不自动收起、按钮不进入按下态,是既有行为,修复前后一致,不在本次范围内。