Forms: the Below form style is unregistered and its editor CSS selector never matches
I maintainer di solito rispondono entro 1 giorno
@enejb ci sta già lavorando.
Dal 18/8/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Summary
The "Below" form style is dead in two independent ways: it isn't registered as a block style, and the one CSS rule implementing it uses a selector that cannot match. Reviving it means fixing both.
1. The style isn't registered
projects/packages/forms/src/blocks/contact-form/index.jsx:
styles: [
{ name: 'default', label: __( 'Default', 'jetpack-forms' ), isDefault: true },
{ name: 'animated', label: __( 'Animated', 'jetpack-forms' ) },
{ name: 'outlined', label: __( 'Outlined', 'jetpack-forms' ) },
// Need to figure out some details. Putting on hold for now
// { name: 'below', label: 'Below' },
],
git log -S places that comment in fb1467d9f6 (Feb 2023); it has never been uncommented. So the style has never shipped, it can't be selected in the editor, and no saved content can carry is-style-below unless someone hand-authored it.
2. The editor rule can't match
projects/packages/forms/src/blocks/contact-form/editor.scss, nested under .jetpack-contact-form:
&.is-style-below {
.jetpack-field:not(.jetpack-field-checkbox) {
display: flex;
flex-direction: column-reverse;
}
}
&.is-style-below compiles to .jetpack-contact-form.is-style-below — both classes on the same element. In the editor they're on different elements. Measured in the canvas with the class hand-applied:
.jetpack-contact-form → "jetpack-contact-form has-no-jetpack-form-layout block-editor-block-list__layout …"
.is-style-below → "block-editor-block-list__block wp-block is-style-below wp-block-jetpack-contact-form"
sameElement: false styleClassIsAncestorOfJcf: true
The outlined and animated rules immediately above use the ancestor form (.is-style-outlined &), which is the shape that actually matches. Below is the odd one out. flex-direction on the field measured row, never column-reverse.
The front end is unaffected — it goes through render_below_label() rather than a CSS reversal.
What reviving it involves
- Correct the selector to the ancestor form used by the other two styles.
- Account for the current field DOM:
.jetpack-field's direct children are now.jetpack-field__control(label + input) and.contact-form__field-hints, so the reversal belongs on.jetpack-field__control(and.jetpack-field-dropdown__wrapperfor select) — otherwise it reverses the hints above the field instead of putting the input above the label. - Register the style in
index.jsx. - Resolve whatever "some details" the 2023 comment refers to.
Context
Found during review of #51122, which changed the field DOM and prompted a check of what depends on it. The fix was deliberately left out of that PR — switching on CSS for an unregistered style would change rendering for any hand-authored content using the class. See https://github.com/Automattic/jetpack/pull/51122#discussion_r3770245012.
- Lingua principale
- PHP
- Stelle
- 1.9k
- Fork
- 913
- Merge medio
- 1g 18h
- PR unite (30g)
- 809
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Automattic/jetpack
-
Bug Needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Automattic/jetpack#55870 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
Automattic/jetpack#55385 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
WAF: jetpack_waf_blocklog is created without the site's charset and collationForse già presa @jwebbdev l’ha presa 3 giorni fa. Aperta[Plugin] Protect Bug Customer Report
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
Automattic/jetpack#55365 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
[Package] Stats Admin [Type] Bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 86/100
Automattic/jetpack#54188 ·
I maintainer di solito rispondono entro 1 giorno
-
Bug Needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
Automattic/jetpack#53467 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Automattic/jetpack
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
SVG path arcs with an explicit zero radius throw DivisionByZeroErrorForse già presa @Syed-Shehroz-Sohail l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 5 giorni
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
sync-en
Difficoltà 1/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 2 giorni
-
Перевод устарел
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno