Carry interleaved prose between sign-in controls when lowering to core/loginout
维护者通常 1 天内回复
评估
调研方向
从 LoginBlockConverter 和 tests/unit/login-form-native-loginout.php 中的 secondary buttons 用例开始。追踪提交控件与次要控件之间的文本是如何处理的,然后更新该用例,使其期望 core/loginout、包含“Or”的 core/paragraph,以及按源码顺序排列的匹配 core/buttons 块。输出符合 Gutenberg 格式且该用例通过,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Follow-up to #5643 / #5654.
Finding
LoginBlockConverter now lowers a plain sign-in form with handler-free secondary type="button" controls to core/group > core/loginout + core/buttons. Visible prose between the submit and the secondary controls is dropped, so the import loses text the source shows.
<form action="/auth/signin" method="post">
<input type="text" name="userName"><label>User Name</label>
<input type="password" name="password"><label>Password</label>
<button type="submit">Sign in</button>
<span>Or</span>
<button type="button">Sign in as a Guest</button>
</form>
Today the output has no "Or".
Expected
Visible text that sits between the sign-in submit and the secondary controls appears as an editable block, such as core/paragraph with the source text, in source order between core/loginout and the matching core/buttons. Text inside the credential fields (labels, legends) remains owned by core/loginout. Hidden text stays omitted.
Acceptance
- Extend the existing
tests/unit/login-form-native-loginout.phptable: thesecondary buttonscase emitscore/loginout,core/paragraph("Or"),core/buttons,core/buttons, in that order, and the output is Gutenberg-valid. - The case fails on trunk and passes with the fix.
Evidence: bookpattern.com /auth/signin import.
Filed by Franklin (Claude Opus via Pi/Roadie) after reviewing #5654. Chris requested the follow-up.
- 主要语言
- PHP
- 星标
- 28
- 派生
- 5
- 平均合并
- 2 小时 30 分钟
- 30 天内合并 PR
- 933
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Automattic/blocks-engine 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
Automattic/blocks-engine#4943 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
Automattic/blocks-engine#4942 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
Automattic/blocks-engine#4921 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
Automattic/blocks-engine#775 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 55/100
Automattic/blocks-engine#5688 ·
维护者通常 1 天内回复
查看 Automattic/blocks-engine 的全部 Issue
相似的 Issue
-
项目日志弹出窗尺寸可拉伸功能未关闭
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
from-cloud mythic tracked
难度 2/5 1-3 小时 新手友好度 67/100
MythicalLTD/FeatherPanel#462 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
维护者通常 1 天内回复
-
ext/openssl: 8.2.31+/8.3.31+ fail to build against OpenSSL 1.0.2 (ASN1_STRING_get0_data in xp_ssl.c)未关闭
难度 2/5 1-3 小时 新手友好度 79/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 83/100