Skip to content

Components: Deprecate Tooltip - #85518

Draft
mirka wants to merge 4 commits into
trunkfrom
deprecate-components-tooltip
Draft

mirka wants to merge 4 commits into
trunkfrom
deprecate-components-tooltip

Conversation

@mirka

@mirka mirka commented Oct 25, 2026

Copy link
Copy Markdown
Member

What?

Deprecate Tooltip from @wordpress/components with a runtime warning, following the adapter approach in #83040.

Why?

Tooltip is already marked not recommended in Storybook and the use-recommended-components lint rule. New consumers should use Tooltip from @wordpress/ui.

How?

Route the public export through an adapter that warns of deprecation in WordPress 7.2 and planned removal in 7.4. Keep the internal implementation silent so components such as Button can continue using it. The adapter preserves the existing props, ref, and rendering behavior.

Move the Tooltip stories to Deprecated while preserving their URLs, and add the replacement notice to the README.

Testing Instructions

  1. Open Storybook and go to Components/@wordpress-components/Deprecated/Tooltip. Confirm the console logs wp.components.Tooltip is deprecated since version 7.2 and will be removed in version 7.4. Please use Tooltip from @wordpress/ui instead.
  2. Hover or focus the default anchor. Confirm the tooltip appears and Escape dismisses it. Check that Keyboard Shortcut displays its shortcut and Nested displays only the outer tooltip.
  3. In the Button story, set a label and enable showTooltip. Confirm its tooltip still appears and no wp.components.Tooltip deprecation warning is logged after a fresh page load.

Screenshots or screencast

The open tooltip looks the same before and after the deprecation.

Before After
Tooltip open below its anchor before deprecation Tooltip open below its anchor after deprecation

@mirka mirka added [Type] Enhancement A suggestion for improvement. [Package] Components /packages/components Needs Dev Note Requires a developer note for a major WordPress release cycle labels Oct 25, 2026
@mirka mirka self-assigned this Oct 25, 2026
@github-actions

github-actions Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

🤖 PR meta 🤖

Preview in WordPress Playground

📦 Bundle size

Size Change: +29 B (0%)

Total Size: 9.06 MB

📦 View Changed
Filename Size Change
build/scripts/components/index.min.js 372 kB +29 B (+0.01%)

6c2e5b6 Run

⚡ Performance

Show the results

Client side metrics exclude the server response time.

front-end-block-theme

Metric 508eada trunk % Change
timeToFirstByte 54.2 ms +12.45% -4.06% 55.4 ms +10.2% -1.62% -2.17%
largestContentfulPaint 88 ms +13.64% -4.55% 96 ms +6.25% -8.33% -8.33%
lcpMinusTtfb 33.7 ms +24.48% -4.75% 34.75 ms +22.45% -3.6% -3.02%
wpBeforeTemplate 28.69 ms +14.05% -0.84% 29.42 ms +10.33% -1.19% -2.48%
wpTemplate 20.66 ms +7.5% -3.1% 22.07 ms +3.35% -2.31% -6.39%
wpTotal 50.36 ms +12.31% -3.91% 51.36 ms +11.37% -1.38% -1.95%
wpMemoryUsage 7.68 MB +0% -0% 7.65 MB +0% -0% 0.43%
wpDbQueries 16 +0% -0% 16 +0% -0% 0%

front-end-classic-theme

Metric 508eada trunk % Change
timeToFirstByte 46.9 ms +6.18% -2.45% 46.65 ms +3.97% -0.64% 0.54%
largestContentfulPaint 102 ms +1.96% -1.96% 104 ms +0% -3.85% -1.92%
lcpMinusTtfb 54.95 ms +1.55% -2.27% 54.6 ms +4.3% -1.92% 0.64%
wpBeforeTemplate 27.21 ms +7.28% -2.39% 27.11 ms +4.61% -1.44% 0.37%
wpTemplate 16.41 ms +6.76% -2.44% 16.55 ms +1.45% -1.09% -0.85%
wpTotal 43.86 ms +6.77% -2.44% 43.61 ms +4.17% -0.87% 0.57%
wpMemoryUsage 6.37 MB +0% -0% 6.34 MB +0% -0% 0.53%
wpDbQueries 13 +0% -0% 13 +0% -0% 0%

media-processing

Metric 508eada trunk % Change
mediaProcessingJpeg 405.1 ms +0.54% -0.8% 406.91 ms +0.33% -1.79% -0.44%
mediaProcessingAvif 6111.56 ms +0.58% -0.02% 6113.56 ms +0.16% -0.15% -0.03%
mediaProcessingJpegToAvif 4219.59 ms +0.15% -0.13% 4221.97 ms +0.12% -0.08% -0.06%

media-upload

Metric 508eada trunk % Change
jpegUploadProcessing 1488.62 ms +30.28% -4.06% 1428.97 ms +1.81% -1.34% 4.17%
pngUploadProcessing 186.07 ms +22.82% -3.5% 201.25 ms +14.73% -14.1% -7.54%
largeJpegUploadProcessing 1429.75 ms +0.59% -1.14% 1427.14 ms +0.79% -0.35% 0.18%
multipleImageUploadProcessing 2058.99 ms +3.13% -7.18% 2065.57 ms +1.57% -1.77% -0.32%

post-editor

Metric 508eada trunk % Change
serverResponse 378.11 ms +2.43% -9.45% 358.68 ms +3.57% -4.34% 5.42%
firstPaint 322.9 ms +32.09% -42.28% 422.6 ms +1.59% -48.63% -23.59%
domContentLoaded 985.76 ms +4.28% -3.54% 944.45 ms +2.95% -2.31% 4.37%
loaded 986.69 ms +4.29% -3.53% 945.33 ms +2.95% -2.33% 4.38%
firstContentfulPaint 429.22 ms +2.64% -0.78% 426.57 ms +1.03% -1.21% 0.62%
firstBlock 2743.6 ms +2.76% -3.69% 2644.41 ms +2.41% -4.73% 3.75%
type 15.63 ms +0.83% -3.58% 15.48 ms +3.62% -3.1% 0.97%
typeWithoutInspector 15.75 ms +0.76% -2.92% 15.68 ms +2.42% -0.32% 0.45%
typeWithTopToolbar 20.2 ms +9.26% -1.49% 21.44 ms +4.57% -2.05% -5.78%
typeContainer 7.43 ms +7.94% -3.23% 7.58 ms +7.92% -5.01% -1.98%
focus 99.33 ms +3.27% -2.03% 98.98 ms +6.81% -4.99% 0.35%
firstFocus 187.76 ms +0% -0% 188.5 ms +0% -0% -0.39%
selectAll 418.59 ms +0.23% -3.06% 392.46 ms +2.72% -4.21% 6.66%
listViewOpen 64.33 ms +13.85% -7.43% 60.82 ms +2.3% -3.22% 5.77%
inserterOpen 34.77 ms +10.9% -3.71% 36.55 ms +3.72% -7.58% -4.87%
inserterHover 10.03 ms +16.85% -6.18% 10.9 ms +4.77% -6.51% -7.98%
inserterSearch 7.7 ms +10.26% -6.62% 7.92 ms +8.71% -8.84% -2.78%
loadPatterns 542.86 ms +6.29% -4.96% 542.45 ms +3.87% -2.71% 0.08%
wpTotal 369.22 ms +2.29% -9.63% 350.48 ms +3.11% -4.66% 5.35%
wpMemoryUsage 14.71 MB +0% -0% 14.68 MB +0% -0% 0.24%
wpDbQueries 55 +0% -0% 55 +0% -0% 0%

site-editor

Metric 508eada trunk % Change
serverResponse 498.76 ms +2.18% -5.54% 493.16 ms +4.15% -7.17% 1.14%
firstPaint 253.58 ms +3.14% -5.58% 265.6 ms +5.81% -9.57% -4.53%
domContentLoaded 1264.95 ms +0.4% -2.33% 1256.35 ms +2.53% -1.33% 0.68%
loaded 1266.3 ms +0.37% -2.34% 1257.29 ms +2.54% -1.34% 0.72%
firstContentfulPaint 505.96 ms +1.89% -14.94% 510.91 ms +1.94% -22.25% -0.97%
firstBlock 4513.13 ms +1.14% -0.44% 4531.7 ms +1.6% -0.44% -0.41%
type 19.2 ms +3.75% -5.31% 18.92 ms +4.81% -5.39% 1.48%
navigate 119.16 ms +11.51% -9.13% 117.74 ms +18.02% -3.71% 1.21%
loadPatterns 1250.26 ms +6.8% -5.55% 1223.68 ms +7.26% -1.2% 2.17%
loadPages 994.05 ms +1.94% -3.81% 987.19 ms +2.92% -6.08% 0.69%
wpTotal 489.56 ms +2.15% -5.69% 483.92 ms +4.27% -7.26% 1.17%
wpMemoryUsage 12.73 MB +0% -0% 12.70 MB +0% -0% 0.24%
wpDbQueries 44 +2.27% -0% 44 +2.27% -0% 0%

6c2e5b6 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.

Custom Completer: should allow newlines after multiple option completions in /test/e2e/specs/editor/various/autocomplete-and-mentions.spec.js, passed after 1 failed attempt.
Error: expect(received).toBe(expected) // Object.is equality

- Expected  - 2
+ Received  + 2

@@ -5,15 +5,15 @@
  <!-- wp:paragraph -->
  <p>🫐 test</p>
  <!-- /wp:paragraph -->

  <!-- wp:paragraph -->
- <p>🫐 test</p>
+ <p>~🍎 test</p>
  <!-- /wp:paragraph -->

  <!-- wp:paragraph -->
- <p>🫐 test</p>
+ <p>~🍎 test</p>
  <!-- /wp:paragraph -->

  <!-- wp:paragraph -->
  <p></p>
  <!-- /wp:paragraph -->

Call Log:
- Timeout 5000ms exceeded while waiting on the predicate
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/autocomplete-and-mentions.spec.js:466:6
Undo restores the post selection when another synced entity is loaded (RTC WebSocket) in /test/e2e/specs/editor/collaboration/collaboration-undo-redo.spec.ts, passed after 1 failed attempt.
Error: expect(received).toMatchObject(expected)

- Expected  - 2
+ Received  + 2

  Object {
    "attributeKey": "content",
    "blockIndex": 0,
    "content": "abcdef",
-   "endOffset": 3,
-   "offset": 3,
+   "endOffset": 6,
+   "offset": 6,
  }

Call Log:
- Timeout 5000ms exceeded while waiting on the predicate
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/collaboration/collaboration-undo-redo.spec.ts:363:5
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).toBeVisible() failed

Locator: getByRole('listbox', { name: 'Search results' })
Expected: visible
Timeout: 5000ms
Error: element(s) not found

Call log:
  - Expect "toBeVisible" getByRole('listbox', { name: 'Search results' }) with timeout 5000ms
  - waiting for getByRole('listbox', { name: 'Search results' })

    at LinkControl.useLinkControlSearch (/home/runner/work/gutenberg/gutenberg/test/e2e/specs/site-editor/navigation-sidebar-list-view.spec.js:396:33)
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/site-editor/navigation-sidebar-list-view.spec.js:179:3
should create paragraph on split at end and merge back with content in /test/e2e/specs/editor/blocks/list.spec.js, passed after 1 failed attempt.
Error: expect(received).toBe(expected) // Object.is equality

- Expected  - 1
+ Received  + 1

@@ -1,8 +1,8 @@
  <!-- wp:list -->
  <ul class="wp-block-list"><!-- wp:list-item -->
- <li>one</li>
+ <li>ne</li>
  <!-- /wp:list-item --></ul>
  <!-- /wp:list -->

  <!-- wp:paragraph -->
  <p></p>

Call Log:
- Timeout 5000ms exceeded while waiting on the predicate
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/blocks/list.spec.js:461:52
should cut and paste individual blocks with collapsed selection in /test/e2e/specs/editor/various/copy-cut-paste.spec.js, passed after 1 failed attempt.
Error: expect(string).toMatchSnapshot(expected) failed

  @@ -1,3 +1,3 @@
   <!-- wp:paragraph -->
  -<p>2Cut - collapsed selection</p>
  +<p>2</p>
   <!-- /wp:paragraph -->


    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/copy-cut-paste.spec.js:45:49
should insert a line break on shift+enter in /test/e2e/specs/editor/blocks/list.spec.js, passed after 1 failed attempt.
Error: expect(received).toBe(expected) // Object.is equality

- Expected  - 1
+ Received  + 1

  <!-- wp:list -->
  <ul class="wp-block-list"><!-- wp:list-item -->
- <li>a<br></li>
+ <li><br></li>
  <!-- /wp:list-item --></ul>
  <!-- /wp:list -->

Call Log:
- Timeout 5000ms exceeded while waiting on the predicate
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/blocks/list.spec.js:1210:52
should keep the list type when indenting an ordered list item in /test/e2e/specs/editor/blocks/list.spec.js, passed after 1 failed attempt.
Error: expect(received).toBe(expected) // Object.is equality

- Expected  - 1
+ Received  + 1

@@ -1,8 +1,8 @@
  <!-- wp:list {"ordered":true} -->
  <ol class="wp-block-list"><!-- wp:list-item -->
- <li>one<!-- wp:list {"ordered":true} -->
+ <li>ne<!-- wp:list {"ordered":true} -->
  <ol class="wp-block-list"><!-- wp:list-item -->
  <li>two</li>
  <!-- /wp:list-item --></ol>
  <!-- /wp:list --></li>
  <!-- /wp:list-item --></ol>

Call Log:
- Timeout 5000ms exceeded while waiting on the predicate
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/blocks/list.spec.js:916:52
should merge a following sibling list into the outermost list with Delete from a nested item (#77245) in /test/e2e/specs/editor/blocks/list.spec.js, passed after 1 failed attempt.
Error: expect(received).toMatchObject(expected)

- Expected  - 2
+ Received  + 2

@@ -8,11 +8,11 @@
          "innerBlocks": Array [
            Object {
              "innerBlocks": Array [
                Object {
                  "attributes": Object {
-                   "content": "b‸",
+                   "content": "b",
                  },
                  "name": "core/list-item",
                },
              ],
              "name": "core/list",
@@ -25,11 +25,11 @@
    },
    Object {
      "innerBlocks": Array [
        Object {
          "attributes": Object {
-           "content": "1",
+           "content": "‸1",
          },
          "innerBlocks": Array [
            Object {
              "innerBlocks": Array [
                Object {

Call Log:
- Timeout 5000ms exceeded while waiting on the predicate
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/blocks/list.spec.js:2854:41
should only mutate text data on input in /test/e2e/specs/editor/various/rich-text.spec.js, passed after 1 failed attempt.
Error: locator.evaluate: Error: The selection change event listener was never called.
    at eval (eval at evaluate (:311:30), <anonymous>:6:15)
    at UtilityScript.evaluate (<anonymous>:313:16)
    at UtilityScript.<anonymous> (<anonymous>:1:44)
    at eval (eval at evaluate (:311:30), <anonymous>:6:15)
    at UtilityScript.evaluate (<anonymous>:313:16)
    at UtilityScript.<anonymous> (<anonymous>:1:44)
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/rich-text.spec.js:407:42
should preserve dragged selection on move in /test/e2e/specs/editor/various/multi-block-selection.spec.js, passed after 1 failed attempt.
TimeoutError: locator.hover: Timeout 10000ms exceeded.
Call log:
  - waiting for locator('[name="editor-canvas"]').contentFrame().getByRole('document', { name: 'Block: Paragraph' }).nth(1)
    - locator resolved to <p role="document" data-empty="false" aria-multiline="true" aria-readonly="false" data-title="Paragraph" contenteditable="true" data-type="core/paragraph" aria-label="Block: Paragraph" data-wp-block-attribute-key="content" id="block-27efb716-e95f-496e-a81f-90de6e68e723" data-block="27efb716-e95f-496e-a81f-90de6e68e723" class="block-editor-rich-text__editable block-editor-block-list__block wp-block wp-block-paragraph rich-text">2</p>
  - attempting hover action
    2 × waiting for element to be visible and stable
      - element is visible and stable
      - scrolling into view if needed
      - done scrolling
      - <button id="_r_5u_" type="button" tabindex="-1" aria-label="Link" aria-pressed="false" aria-haspopup="true" aria-expanded="false" data-toolbar-item="true" class="components-button components-toolbar-button is-compact has-icon">…</button> from <div tabindex="-1" data-wp-c16t="true" data-wp-component="Popover" class="components-popover block-editor-block-popover block-editor-block-list__block-popover is-positioned is-unstyled">…</div> subtree intercepts pointer events
    - retrying hover action
    - waiting 20ms
    2 × waiting for element to be visible and stable
      - element is visible and stable
      - scrolling into view if needed
      - done scrolling
      - <button id="_r_5u_" type="button" tabindex="-1" aria-label="Link" aria-pressed="false" aria-haspopup="true" aria-expanded="false" data-toolbar-item="true" class="components-button components-toolbar-button is-compact has-icon">…</button> from <div tabindex="-1" data-wp-c16t="true" data-wp-component="Popover" class="components-popover block-editor-block-popover block-editor-block-list__block-popover is-positioned is-unstyled">…</div> subtree intercepts pointer events
    - retrying hover action
      - waiting 100ms
    13 × waiting for element to be visible and stable
       - element is visible and stable
       - scrolling into view if needed
       - done scrolling
       - <button id="_r_5u_" type="button" tabindex="-1" aria-label="Link" aria-pressed="false" aria-haspopup="true" aria-expanded="false" data-toolbar-item="true" class="components-button components-toolbar-button is-compact has-icon">…</button> from <div tabindex="-1" data-wp-c16t="true" data-wp-component="Popover" class="components-popover block-editor-block-popover block-editor-block-list__block-popover is-positioned is-unstyled">…</div> subtree intercepts pointer events
     - retrying hover action
       - waiting 500ms

    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/multi-block-selection.spec.js:816:20
should replace selected non-breaking spaces from the toolbar in /test/e2e/specs/editor/various/rich-text.spec.js, passed after 1 failed attempt.
Error: expect(received).toMatchObject(expected)

- Expected  - 1
+ Received  + 1

  Array [
    Object {
      "attributes": Object {
-       "content": "one two three",
+       "content": "ne two three",
      },
      "name": "core/paragraph",
    },
  ]

Call Log:
- Timeout 5000ms exceeded while waiting on the predicate
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/rich-text.spec.js:1050:41
should split into two with paragraph and merge lists in /test/e2e/specs/editor/blocks/list.spec.js, passed after 1 failed attempt.
Error: expect(received).toBe(expected) // Object.is equality

- Expected  - 1
+ Received  + 1

@@ -1,8 +1,8 @@
  <!-- wp:list -->
  <ul class="wp-block-list"><!-- wp:list-item -->
- <li>one</li>
+ <li>ne</li>
  <!-- /wp:list-item -->

  <!-- wp:list-item -->
  <li></li>
  <!-- /wp:list-item -->

Call Log:
- Timeout 5000ms exceeded while waiting on the predicate
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/blocks/list.spec.js:502:52
should update the URL from the last navigation if only varies in the URL fragment in /test/e2e/specs/interactivity/router-navigate.spec.ts, passed after 1 failed attempt.
Error: expect(locator).toHaveText(expected) failed

Locator:  getByTestId('title')
Expected: "Link 1"
Received: "Main"
Timeout:  5000ms

Call log:
  - Expect "toHaveText" getByTestId('title') with timeout 5000ms
  - waiting for getByTestId('title')
    14 × locator resolved to <h2 data-testid="title">Main</h2>
       - unexpected value "Main"

    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/interactivity/router-navigate.spec.ts:160:25
shows title and sync status while creating a new synced pattern in the post editor in /test/e2e/specs/editor/various/post-summary/post-summary.spec.js, passed after 1 failed attempt.
Error: expect(locator).toBeVisible() failed

Locator: getByRole('dialog', { name: 'Create pattern' })
Expected: visible
Timeout: 5000ms
Error: element(s) not found

Call log:
  - Expect "toBeVisible" getByRole('dialog', { name: 'Create pattern' }) with timeout 5000ms
  - waiting for getByRole('dialog', { name: 'Create pattern' })

    at createPatternFromModal (/home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/post-summary/post-summary.spec.js:179:26)
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/post-summary/post-summary.spec.js:101:4

6c2e5b6 Run

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 [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant