Repository navigation
fix(auth): prevent long quota note text from overflowing account names - #10087
Merged
farion1231 merged 1 commit intoNov 29, 2026
Merged
Conversation
Owner
|
感谢修复!长译文下额度提示压住账号名的原因找得很准,宽度扣掉右侧留白正好对上,还顺手补了悬停提示和回归测试。已合并,会随下个版本发布。 |
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.
Human Note / 本人说明
在实机验证 #10073 的时候把界面切到德文 + 宽松密度,看到授权中心里像「切到这个号后才能查额度」(
Wechsle zu diesem Konto, um sein Kontingent abzufragen)以及手动模式下的「点刷新查询额度」这种较长的提示文案会直接往左边溢出去,盖在账号邮箱上面,而且截断后悬停也看不到完整句子。查了一下AccountQuotaColumn的note分支,发现span在flex-col+self-end下带了右外边距me-[calc(var(--auth-quota-reset)+var(--auth-quota-gap))],但max-w-full没把这段右外边距减掉,导致超长文案向左撑出了列宽。这个小 PR 只把max-w改成减去右外边距并补上title悬停提示,同时在AccountQuotaColumn对应的单测里补上回归用例,不改其他状态、文案和后端。Summary / 概述
Fix leftward overflow and missing hover tooltip for long localized note strings in Auth Center's
AccountQuotaColumn(src/components/settings/auth/AccountQuota.tsx):state.kind === "note", the<span>sits inside.auth-quota-col.auth-quota-col-static(flex-col) withself-endandme-[calc(var(--auth-quota-reset)+var(--auth-quota-gap))], while constraining width withmax-w-full(from fix(auth): give account details room in the auth center rows #9369). Becausemax-w-fullresolves to 100% of the column width without subtracting the trailing margin, long translations across 6 of 8 locales (en,de,ja,ko,tr,ruforauthCenter.agy.quotaNotCurrentand/orquota.manualIdle) overflow leftward by up tovar(--auth-quota-reset) + var(--auth-quota-gap)(62px default / 68px comfortable) over the account login/email and have notitletooltip when truncated.max-w-fulltomax-w-[calc(100%-var(--auth-quota-reset)-var(--auth-quota-gap))]so the note stays within the static column width while keeping right-edge alignment with the value slot unchanged for shorter text.title={state.text}on thenote<span>(consistent withstate.kind === "failed"'s reason line) so truncated notes can be read on hover.failed,loading) across all 8 locales and both densities: neither usesself-endorme-[...], neither overflows/wraps, andfailed's reason line already usestruncate+title={state.reason}.WKWebView(WebKit) across default/comfortable densities, normal/wide (>=800px)/narrow (<=560px) container widths, RTL, and all 8 locales (0 overflows after fix; exact right-edge alignment with siblingrowsvalue cells preserved).describe("AccountQuotaColumn")intests/components/AuthCenterGroups.test.tsxcovering both explicitstate={{ kind: "note", text: ... }}andidle(quota.manualIdle) note rendering (.auth-quota-col-static, boundedmax-w,me-[...],truncate,self-end, nomax-w-full, andtitle).Related Issue / 关联 Issue
Refs #10073
(同步修复 #9369 引入的
AccountQuotaColumnnote分支max-w-full未扣除右外边距的问题。)Screenshots / 截图
note长译文向左溢出最多var(--auth-quota-reset) + var(--auth-quota-gap)(62px / 68px),盖住左侧账号邮箱,且无悬停全文提示note宽度被限制在100% - var(--auth-quota-reset) - var(--auth-quota-gap)内,在列内正常省略截断、不遮挡账号名,短文案右对齐位置不变,悬停title可查看完整提示Checklist / 检查清单
pnpm typecheckpasses / 通过 TypeScript 类型检查pnpm format:checkpasses / 通过代码格式检查(同时通过pnpm knip、pnpm build:renderer、pnpm test:unit348/348 files, 4626/4626 tests)cargo clippypasses (if Rust code changed) / 通过 Clippy 检查(如修改了 Rust 代码)(N/A — 本 PR 仅修改前端组件与前端单元测试,未改动 Rust 代码)