Repository navigation
feat(input): 测不准文字末尾的情形一律换位置不隐藏 —— 缩放祖先回落右下角,字体加载完、站点改样式后重新对齐(#668) - #720
Merged
Merged
Conversation
- 祖先带 transform 时,镜像量出的是没缩放的排版距离:屏幕尺寸与排版尺寸 差出 1px 以上即认定量不准,交给回落(ADR-0006:换位置,不是不显示)。 - 回落与钳制用的可见区域按屏幕尺寸与排版尺寸之比换算,缩放下回落位置 仍在框内侧右下角。 - 停手之后网页字体才加载完(document.fonts 的 loadingdone)、站点改了框的 行内样式或 class、经样式表或父容器改了框的尺寸,都重新对齐一次;还在 等停手时不量,沿用 #670 的时机。 端到端用的测试字体(每个字形 1em 宽的方块)由 fontTools 生成,放在夹具 目录,由用例控制它何时下载完成。 Co-Authored-By: zhexuancai-uts <261878103+zhexuancai-uts@users.noreply.github.com>
Co-Authored-By: zhexuancai-uts <261878103+zhexuancai-uts@users.noreply.github.com>
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.
问题
#665 保留了“量不出来就回落框内侧右下角”这条路,但会量不准的几种情形并没有走到它:
根因
修复
document.fonts的loadingdone;style/class属性变化;ResizeObserver,跳过 observe 时那次初始通知)。验证
#reply包进scale(0.5)的容器。圆点出现在屏幕上框的内侧右下角,误差不超过 1px;它在最上层,点下去照常翻译写回。修复前横向差 91px。style/class后重新对齐。pnpm test:115 个文件、1426 条,全部通过。pnpm typecheck通过。pnpm test:e2e:core:97 条通过,2 条跳过。Closes #668