Skip to content

修复密码强度长标签与强度条重叠的问题 - #23

Merged
239573049 merged 2 commits into
AIDotNet:mainfrom
auimus:codex/fix-password-strength-label-release
Oct 28, 2026
Merged

239573049 merged 2 commits into
AIDotNet:mainfrom
auimus:codex/fix-password-strength-label-release

Conversation

@auimus

@auimus auimus commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

PasswordStrength 将状态文字限制在 72 DIP 槽内,“符合输入要求”等本地化标签会向左溢出并吃掉与强度条之间的 12 DIP 间距。将 WordWidth 用作 MinWidth,让长标签按内容测量,同时保留短标签的原有最小槽宽、右对齐和原生动效,并同步三种语言的组件文档。

新增回归测试覆盖中英文及法文标签的长短切换、280/480 DIP 控件宽度和 Full/Off 动效;修复前 4 个新增场景均失败,修复后 Arc/Core 窄范围无窗口验证 35 项通过。另在 0.3.1-preview.2 包加等价应用兼容处理后,真实初始化页面的间距、步骤对齐及显隐流程 10 项通过;未运行包含 Mobile/Gallery 的完整解决方案测试。

- 将固定文字槽改为最小宽度,保留标签与强度条的间距
- 添加中英文及法文标签切换、窄宽布局与动效回归测试
- 同步三种语言的组件文档和令牌说明
@239573049

Copy link
Copy Markdown
Member

感谢修复!方向没问题:把 Width 改成 MinWidth,短标签保持原来的 72 DIP 槽宽和右对齐,长标签按内容测量,改动很小。

CI 里有两处失败是这个 PR 引起的,我在本地都复现了:

  1. GalleryDocsTests(译文过期)
    改了 en-US.md 之后,zh-CN.md 和 zh-TW.md 的 source-hash 需要重新生成:

    python3 -I tools/docs/dochash.py --stamp \
      gallery/TKCode.Arc.Gallery/Docs/TextFields/PasswordStrength/zh-CN.md \
      gallery/TKCode.Arc.Gallery/Docs/TextFields/PasswordStrength/zh-TW.md

    新哈希是 5ec2a501d220。

  2. Localized_Strength_Labels_Keep_Their_Gap_And_Fit_The_Field(宽度 280 失败)
    无窗口测试的字体每个字符约 13 px,“Exigences respectées” 在测试里宽 260 px,加上 12 DIP 间距后,280 宽的控件本来就放不下,强度条被挤成 0 宽。这是测试字体造成的,不是组件的问题。建议把这个标签换成较短的,比如 "Conforme":它仍然比 72 DIP 长,能验证槽位会随标签变宽,也能放进 280 宽。

另外有三个失败(GalleryBrowserFontTests、GalleryLlmsTests 缺 zh-TW/blocks/sidebar.md、GalleryGuidesTests 缺 source-hash)看起来和这个 PR 无关,我再对照 main 的 CI 确认,不用你处理。

文档里的英文句子也可以顺一下,比如 "a minimum 72 px slot that grows for localized labels at the end of the meter row" 可以改成 "At the end of the meter row, a slot at least 72 px wide that grows for localized labels"。

改完推上来我就合并。

Use Conforme for the French label so the existing 280/480 DIP and Full/Off
layout regression cases still exercise a label wider than 72 DIP without
exhausting the meter width in the headless font. Preserve all assertions
and the existing MinWidth implementation.

Clarify the English minimum-width description and regenerate both Chinese
source hashes with tools/docs/dochash.py. The final English hash is
1b9e076740df; 5ec2a501d220 was the hash before the wording improvement.

Validation on Windows (.NET SDK 11.0.100-rc.2.26504.105, runtime 10.0.14):
- Initial solution build succeeded (4 warnings, 0 errors).
- PasswordStrengthTests: 15 passed, including all 4 localized layout cases.
- GalleryDocsTests: 9 passed, including translation freshness; 1 failed
  because local XML API documentation was not generated (GDOC008).
- Core tests: 139 passed.
- Final source hashes, unchanged test matrix/assertions, and diff checked.

Attempts to rebuild with GenerateDocumentationFile=true were blocked by
Avalonia AVLN9999 (missing TKCode.Arc.Mobile intermediate DLL), including
serial and fresh-intermediate builds. Full control-suite validation is
therefore limited; no project/configuration changes or unrelated CI fixes
are included.
@239573049
239573049 merged commit b303b68 into AIDotNet:main Oct 28, 2026
5 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants