Carry interleaved prose between sign-in controls when lowering to core/loginout

Đang mở Phù hợp với người mới
#5,667 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@chubes4 đang làm issue này rồi.

Từ ngày 12/11/2026.

  • #5707 của @chubes4 — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
82/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
php
Lĩnh vực
backend

Hướng nghiên cứu

Bắt đầu với LoginBlockConverter và trường hợp secondary buttons trong tests/unit/login-form-native-loginout.php. Theo dõi cách xử lý văn bản giữa nút gửi và các điều khiển phụ, sau đó cập nhật trường hợp để mong đợi core/loginout, core/paragraph chứa “Or” và các khối core/buttons tương ứng theo thứ tự trong mã nguồn. Hoàn tất khi đầu ra hợp lệ với Gutenberg và trường hợp kiểm thử chạy thành công.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.php table: the secondary buttons case emits core/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.

Ngôn ngữ chính
PHP
Star
28
Fork
5
Merge trung bình
2 giờ 30 phút
Pull request đã merge (30 ngày)
933

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Automattic/blocks-engine

Tất cả issue của Automattic/blocks-engine

Issue tương tự

Thêm issue về PHP

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.