diff --git a/projects/packages/forms/changelog/fix-dsgcom-595-form-responses-masterbar-mobile b/projects/packages/forms/changelog/fix-dsgcom-595-form-responses-masterbar-mobile new file mode 100644 index 00000000000..e424157c6f9 --- /dev/null +++ b/projects/packages/forms/changelog/fix-dsgcom-595-form-responses-masterbar-mobile @@ -0,0 +1,4 @@ +Significance: patch +Type: fixed + +Fix the Form Responses quick link disappearing from the admin bar on mobile viewports, and align its icon with the native items. diff --git a/projects/packages/forms/src/contact-form/class-contact-form.php b/projects/packages/forms/src/contact-form/class-contact-form.php index de79f533b97..05ca7006bff 100644 --- a/projects/packages/forms/src/contact-form/class-contact-form.php +++ b/projects/packages/forms/src/contact-form/class-contact-form.php @@ -1310,6 +1310,16 @@ public static function add_quick_link_to_admin_bar( \WP_Admin_Bar $admin_bar ) { ), ) ); + + // On viewports <=782px, WordPress core hides every top-level admin bar item except a hardcoded + // allowlist of core nodes, so our custom node disappears. Re-show it and size the icon to match the + // native items (52px-wide box, centered ~28px glyph). The `.ab-icon` overrides use !important because + // the SVG carries its desktop sizing in an inline style attribute, which otherwise wins the cascade. + echo ''; } /**