Skip to content

CustomSelectControl: Deprecate the public components export - #87076

Open
ciampo wants to merge 2 commits into
trunkfrom
codex/deprecate-custom-select-control
Open

ciampo wants to merge 2 commits into
trunkfrom
codex/deprecate-custom-select-control

Conversation

@ciampo

@ciampo ciampo commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

See #80412.

What?

Soft-deprecate CustomSelectControl from @wordpress/components in WordPress 7.3. Use SelectControl from @wordpress/ui for new code, or compose Select for the small size.

Why?

Gutenberg's direct consumers have migrated. The public warning gives plugin and theme authors a migration guide while their existing controls continue to work.

How?

Wrap the public export with a deprecation warning. ValidatedCustomSelectControl continues to render the internal control without a warning. Move the legacy stories under Deprecated, keep their existing IDs, and update the ESLint guidance.

Proposed removal version

Veloria found 152 identifier matches across 32 plugins and two matches in one theme. These are search hits, and some are changelog entries or comments. I confirmed direct imports in Super Web Share and Blocksy. The draft proposes WordPress 7.6 to give consumers three release cycles to migrate. Recheck usage before removal.

Plugin search · Theme search

Testing Instructions

  1. Open this PR's Storybook at ?path=/story/components-customselectcontrol--default. Open the console and reload the story. Confirm it logs one deprecation warning with the migration guide link.
  2. Open the select and pick another option. Confirm the trigger shows the new selection.
  3. Open Migration Guide under Deprecated → CustomSelectControl and try the replacement examples.

Use of AI Tools

Codex implemented and tested the changes and drafted this description.

@ciampo ciampo added the Needs Dev Note Requires a developer note for a major WordPress release cycle label Nov 19, 2026 — with ChatGPT Codex Connector
@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

🤖 PR meta 🤖

Preview in WordPress Playground Preview in Storybook

🎉 Props

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: ciampo <mciampini@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.


Props Bot commands

You can trigger Props Bot actions by commenting on this PR:

  • @propsbot add <username> to give props to a GitHub user. Requires write access.
  • @propsbot remove <username> to leave a user out of the props. Requires write access.
  • @propsbot refresh to refresh this list. Adding the props-bot label works too.

Updated as activity occurs, without notifying anyone named here. Add the props-bot label to refresh.

📦 Bundle size

Size Change: +128 B (0%)

Total Size: 8.68 MB

📦 View Changed
Filename Size Change
build/scripts/components/index.min.js 345 kB +128 B (+0.04%)

966b717 Run

⚡ Performance

Show the results

Client side metrics exclude the server response time.

front-end-block-theme

Metric 97bbd41 trunk % Change
timeToFirstByte 32.8 ms +11.74% -2.59% 33.7 ms +12.76% -5.04% -2.67%
largestContentfulPaint 56 ms +7.14% -7.14% 58 ms +6.9% -10.34% -3.45%
lcpMinusTtfb 22.35 ms +12.08% -12.53% 23.6 ms +4.45% -15.25% -5.3%
wpBeforeTemplate 17.24 ms +9.8% -2.15% 17.42 ms +23.88% -3.1% -1.03%
wpTemplate 12.78 ms +5.95% -3.21% 12.75 ms +4.86% -4.39% 0.24%
wpTotal 30.04 ms +10.69% -2.56% 30.76 ms +13.82% -5.07% -2.34%
wpMemoryUsage 7.75 MB +0% -0% 7.71 MB +0% -0% 0.45%
wpDbQueries 16 +0% -0% 16 +0% -0% 0%

front-end-classic-theme

Metric 97bbd41 trunk % Change
timeToFirstByte 27.25 ms +9.54% -1.83% 27.55 ms +8.17% -1.09% -1.09%
largestContentfulPaint 52 ms +7.69% -0% 52 ms +0% -7.69% 0%
lcpMinusTtfb 24.4 ms +4.1% -7.38% 22.95 ms +7.84% -6.97% 6.32%
wpBeforeTemplate 15.16 ms +10.75% -0.92% 15.16 ms +5.54% -0.66% 0%
wpTemplate 9.65 ms +9.64% -3.73% 9.89 ms +2.73% -3.94% -2.43%
wpTotal 24.82 ms +9.19% -1.49% 25.12 ms +6.37% -1.27% -1.19%
wpMemoryUsage 6.44 MB +0% -0% 6.40 MB +0% -0% 0.56%
wpDbQueries 13 +0% -0% 13 +0% -0% 0%

media-processing

Metric 97bbd41 trunk % Change
mediaProcessingJpeg 211.82 ms +1.76% -0.47% 211.29 ms +1.43% -0.18% 0.25%
mediaProcessingAvif 3485.23 ms +1.37% -0.53% 3571.59 ms +0.53% -0.43% -2.42%
mediaProcessingJpegToAvif 2429.5 ms +0.41% -0.02% 2440.79 ms +0.13% -0.29% -0.46%

media-upload

Metric 97bbd41 trunk % Change
jpegUploadProcessing 1425.73 ms +1.32% -1.07% 967.24 ms +46.34% -1.66% 47.4%
pngUploadProcessing 178.64 ms +3.08% -2.97% 174.03 ms +8.65% -2.48% 2.65%
largeJpegUploadProcessing 1412.11 ms +0.23% -1.31% 1417.71 ms +0.93% -0.46% -0.4%
multipleImageUploadProcessing 1443.43 ms +1.1% -0.28% 1459.64 ms +0.65% -1.05% -1.11%

post-editor

Metric 97bbd41 trunk % Change
serverResponse 286.4 ms +1.47% -3.46% 266.71 ms +6.07% -4.06% 7.38%
firstPaint 323.51 ms +10.89% -9.39% 280.69 ms +12.97% -5.38% 15.26%
domContentLoaded 590.7 ms +12.18% -4.7% 553.62 ms +2.34% -2.37% 6.7%
loaded 591.57 ms +12.19% -4.7% 554.39 ms +2.35% -2.36% 6.71%
firstContentfulPaint 333.15 ms +21% -4.71% 320.43 ms +2.96% -3.83% 3.97%
firstBlock 1565.21 ms +6.16% -4.78% 1447.81 ms +0.93% -2.82% 8.11%
type 12.25 ms +6.37% -5.8% 12.43 ms +2.09% -8.13% -1.45%
typeWithoutInspector 12.18 ms +5.91% -8.7% 12.52 ms +8.87% -8.07% -2.72%
typeWithTopToolbar 16 ms +12.75% -8% 15.42 ms +7.52% -12.91% 3.76%
typeContainer 6.08 ms +2.63% -6.09% 6.22 ms +9.32% -11.25% -2.25%
focus 75.56 ms +5.2% -4.42% 69.44 ms +7.4% -1.97% 8.81%
firstFocus 160.99 ms +0% -0% 157.46 ms +0% -0% 2.24%
selectAll 236.71 ms +3.38% -2.93% 256.7 ms +2.91% -1.48% -7.79%
undo 18.19 ms +16.6% -5.28% 17.85 ms +2.91% -4.54% 1.9%
listViewOpen 47.64 ms +4.18% -11.21% 41.84 ms +5.52% -8.7% 13.86%
inserterOpen 26.34 ms +9.83% -8.24% 26.02 ms +18.95% -7.72% 1.23%
inserterHover 7.92 ms +6.82% -9.47% 8.05 ms +9.19% -5.96% -1.61%
inserterSearch 6.02 ms +6.31% -1.5% 6.1 ms +2.79% -2.62% -1.31%
loadPatterns 414.96 ms +8.62% -3.05% 417.2 ms +6.77% -2.68% -0.54%
wpTotal 278.74 ms +1.65% -3.35% 259.5 ms +6.26% -4.27% 7.41%
wpMemoryUsage 14.81 MB +0% -0% 14.77 MB +0% -0% 0.25%
wpDbQueries 55 +0% -0% 55 +0% -0% 0%

site-editor

Metric 97bbd41 trunk % Change
serverResponse 315.73 ms +3.58% -1.35% 312.27 ms +0.77% -10.32% 1.11%
firstPaint 356.46 ms +3.23% -6.04% 345 ms +6.37% -9.9% 3.32%
domContentLoaded 664.94 ms +1.54% -2.56% 644.99 ms +0.99% -0.97% 3.09%
loaded 665.67 ms +1.55% -2.56% 645.75 ms +0.99% -0.98% 3.08%
firstContentfulPaint 390.86 ms +3.06% -7.56% 366.63 ms +1.13% -1.78% 6.61%
firstBlock 1980.19 ms +2.98% -0.77% 1956.22 ms +1.82% -0.37% 1.23%
type 15.89 ms +4.97% -9.69% 15.46 ms +4.14% -10.41% 2.78%
navigate 87.39 ms +5.03% -5.6% 91.45 ms +10.87% -3.65% -4.44%
loadPatterns 1061.04 ms +2.43% -10.56% 1154.22 ms +14.6% -5.27% -8.07%
loadPages 980.87 ms +0.63% -1.15% 939.1 ms +6.37% -1.37% 4.45%
wpTotal 307.47 ms +3.48% -1.39% 304.01 ms +0.8% -10.64% 1.14%
wpMemoryUsage 12.82 MB +0% -0% 12.79 MB +0% -0% 0.25%
wpDbQueries 45 +0% -0% 45 +0% -0% 0%

966b717 Run

🏁 Flaky tests

Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

does not select blocks in the canvas preview when editing from the sidebar in /test/e2e/specs/site-editor/navigation-sidebar-list-view.spec.js, passed after 1 failed attempt.
Error: expect(locator).toBeFocused() failed

Locator: getByRole('combobox', { name: 'Search or type URL' })
Expected: focused
Timeout: 5000ms
Error: element(s) not found

Call log:
  - Expect "toBeFocused" getByRole('combobox', { name: 'Search or type URL' }) with timeout 5000ms
  - waiting for getByRole('combobox', { name: 'Search or type URL' })

    at LinkControl.useLinkControlSearch (/home/runner/work/gutenberg/gutenberg/test/e2e/specs/site-editor/navigation-sidebar-list-view.spec.js:416:47)
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/site-editor/navigation-sidebar-list-view.spec.js:179:21
should restore an older revision in /test/e2e/specs/editor/various/revisions.spec.js, passed after 1 failed attempt.
Error: expect(received).toMatchObject(expected)

- Expected  - 1
+ Received  + 1

  Array [
    Object {
      "attributes": Object {
-       "content": "Original content - Updated content - Autosaved",
+       "content": "Original content",
      },
      "name": "core/paragraph",
    },
  ]

Call Log:
- Timeout 5000ms exceeded while waiting on the predicate
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/revisions.spec.js:146:5
should select synced pattern in /test/e2e/specs/editor/various/writing-flow.spec.js, passed after 1 failed attempt.
Error: expect(locator).toBeFocused() failed

Locator:  locator('[name="editor-canvas"]').contentFrame().locator('[data-type="core/block"]')
Expected: focused
Received: inactive
Timeout:  5000ms

Call log:
  - Expect "toBeFocused" locator('[name="editor-canvas"]').contentFrame().locator('[data-type="core/block"]') with timeout 5000ms
  - waiting for locator('[name="editor-canvas"]').contentFrame().locator('[data-type="core/block"]')
    14 × locator resolved to <div tabindex="0" role="document" draggable="true" data-title="Pattern" data-type="core/block" data-is-drop-zone="true" aria-label="Block: Pattern" id="block-c3963934-77c5-47ff-98a8-5e484b5425d9" data-block="c3963934-77c5-47ff-98a8-5e484b5425d9" class="block-editor-block-list__block wp-block is-selected is-reusable block-library-block__reusable-block-container wp-block-block block-editor-block-list__layout">…</div>
       - unexpected value "inactive"

    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/writing-flow.spec.js:1464:5

966b717 Run

@github-actions github-actions Bot added [Package] Components /packages/components [Tool] ESLint plugin /packages/eslint-plugin labels Nov 19, 2026
@ciampo ciampo self-assigned this Nov 19, 2026
@ciampo ciampo added the [Type] Code Quality Issues or PRs that relate to code quality label Nov 19, 2026
@ciampo
ciampo marked this pull request as ready for review November 19, 2026 10:26
@ciampo
ciampo requested a review from a team as a code owner November 19, 2026 10:26
@github-actions
github-actions Bot requested a review from aduth November 19, 2026 10:27
Comment on lines +15 to +16
since: '7.3',
version: '7.6',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duration seems reasonable 👍

import UI from '@wordpress/ui';
import { Tabs } from '@wordpress/ui';
import { Radio, RadioGroup, RadioGroupControl } from '@wordpress/ui';
import { SelectControl } from '@wordpress/ui';

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem to add any new information as another example here.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This made me notice we actually don't publicly export some validated components, including the one for CustomSelectControl. Let me remove those from the package first (#87089), and then we won't need to have a separate deprecated.tsx.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good, I'll wait

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merged 👍

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Dev Note Requires a developer note for a major WordPress release cycle [Package] Components /packages/components [Tool] ESLint plugin /packages/eslint-plugin [Type] Code Quality Issues or PRs that relate to code quality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants