Skip to content

Port ACF's schema select2 dropdown JS so GEO pickers get the styled dropdown #507

Description

@ockham

What

SCF's GEO feature (src/AI/GEO/FieldSettings.php, gated by enable_schema) renders the Schema.org Property and Schema.org Output Format selects with 'ui' => 1, but the select2 dropdowns render unstyled: upstream tags them with schema-property-select-results / schema-output-format-select-results / schema-type-select-results dropdown classes (plus a "Type to search…" placeholder) from assets/src/js/_acf-internal-post-type.js, and SCF's copy of that file predates the schema code entirely.

Why now

#506 synced the sass partials from ACF 6.8.5, so the CSS for those dropdown classes (_admin-inputs.scss) already ships — it's just inert until the JS applies the classes. Porting the JS lights up the styled dropdown with zero further CSS work.

Where upstream has it

Free ACF repo, tag 6.8.5, assets/src/js/_acf-internal-post-type.js (~lines 60–110): a select2_args filter that sets dropdownCssClass for the schema selects, and a select2_init action that sets the search placeholder.

Acceptance

With enable_schema on, opening the Schema.org Property / Output Format dropdowns in the field settings shows the field-type-picker-style dropdown (rounded, shadowed, styled search) instead of the generic select2 look.

Found while reviewing #506 (the "Schema/GEO picker styles" family of its CSS delta is currently inert).

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions