Skip to content

Remove unused files - #85197

Merged
ciampo merged 2 commits into
trunkfrom
chore/remove-unused-files
Oct 21, 2026
Merged

ciampo merged 2 commits into
trunkfrom
chore/remove-unused-files

Conversation

@manzoorwanijk

@manzoorwanijk manzoorwanijk commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

😂 This is a scary one, haha.

What?

Follow up to #85194, see also #85196

Removes 19 files that nothing imports and no package exports, across edit-site, block-editor, components, dataviews and a few others.

Why?

Knip reported them while exploring it in #85194. Each file was checked by hand for ESM imports, CommonJS requires, Sass @use and exports from package entry points or private APIs. The editor's pre-DataForm sidebar components stay, so #85081 can still be reverted during the beta cycle.

How?

  • Drops the @use line for the deleted pagination stylesheet in edit-site.
  • Prunes the stale ESLint suppressions for the deleted files.

Testing Instructions

  1. npm run clean:package-types && npm run typecheck
  2. npm run build
  3. npm run lint:js && npm run lint:css
  4. Open the site editor and confirm templates, template parts and Global Styles render as before.

Use of AI Tools

Claude Code ran Knip, verified the findings and made the changes; I reviewed them.

@github-actions github-actions Bot added [Package] Components /packages/components [Package] Editor /packages/editor [Package] Notices /packages/notices [Package] Format library /packages/format-library [Package] Block editor /packages/block-editor [Package] Edit Site /packages/edit-site [Package] DataViews /packages/dataviews [Package] Widget Dashboard /packages/widget-dashboard labels Oct 20, 2026
@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

🤖 PR meta 🤖

Preview in WordPress Playground

🎉 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: manzoorwanijk <manzoorwanijk@git.wordpress.org>
Co-authored-by: ciampo <mciampini@git.wordpress.org>
Co-authored-by: ntsekouras <ntsekouras@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>

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

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

📦 Bundle size

Size Change: -109 B (0%)

Total Size: 9.05 MB

📦 View Changed
Filename Size Change
build/styles/edit-site/style-rtl.css 21.6 kB -28 B (-0.13%)
build/styles/edit-site/style-rtl.min.css 17.5 kB -26 B (-0.15%)
build/styles/edit-site/style.css 21.7 kB -28 B (-0.13%)
build/styles/edit-site/style.min.css 17.5 kB -27 B (-0.15%)

3e817b2 Run

⚡ Performance

Show the results

Client side metrics exclude the server response time.

front-end-block-theme

Metric 93bbbb8 trunk % Change
timeToFirstByte 33.1 ms +20.54% -2.72% 33.55 ms +12.67% -4.32% -1.34%
largestContentfulPaint 60 ms +6.67% -6.67% 60 ms +3.33% -6.67% 0%
lcpMinusTtfb 23.8 ms +13.24% -1.89% 24.4 ms +14.55% -9.22% -2.46%
wpBeforeTemplate 17.78 ms +22.05% -2.53% 17.36 ms +26.04% -2.07% 2.42%
wpTemplate 12.67 ms +7.34% -4.74% 12.92 ms +6.04% -5.73% -1.93%
wpTotal 30.24 ms +20.17% -2.48% 30.74 ms +11.52% -4.68% -1.63%
wpMemoryUsage 7.65 MB +0% -0% 7.61 MB +0% -0% 0.46%
wpDbQueries 16 +0% -0% 16 +0% -0% 0%

front-end-classic-theme

Metric 93bbbb8 trunk % Change
timeToFirstByte 28.9 ms +5.54% -2.77% 29.15 ms +4.12% -2.92% -0.86%
largestContentfulPaint 64 ms +6.25% -0% 64 ms +3.13% -0% 0%
lcpMinusTtfb 35.9 ms +0.97% -2.23% 35.3 ms +2.69% -1.84% 1.7%
wpBeforeTemplate 15.9 ms +2.33% -0.82% 15.97 ms +1.94% -2% -0.44%
wpTemplate 10.24 ms +2.93% -3.81% 10.19 ms +4.61% -4.71% 0.49%
wpTotal 26.29 ms +5.67% -2.21% 26.58 ms +4.48% -2.97% -1.09%
wpMemoryUsage 6.34 MB +0% -0% 6.30 MB +0% -0% 0.57%
wpDbQueries 13 +0% -0% 13 +0% -0% 0%

media-processing

Metric 93bbbb8 trunk % Change
mediaProcessingJpeg 226.97 ms +0.49% -2.65% 220.38 ms +1.13% -3.41% 2.99%
mediaProcessingAvif 3640.44 ms +1.39% -0.68% 3705.54 ms +1.5% -0.6% -1.76%
mediaProcessingJpegToAvif 2535.2 ms +0.42% -1.32% 2540.75 ms +1.23% -2.36% -0.22%

media-upload

Metric 93bbbb8 trunk % Change
jpegUploadProcessing 1397.51 ms +0.75% -0.7% 1399.21 ms +0.55% -0.35% -0.12%
pngUploadProcessing 177.29 ms +5.59% -4.91% 171.87 ms +2.35% -2.85% 3.15%
largeJpegUploadProcessing 1396.85 ms +1.12% -0.9% 1411.35 ms +1.08% -1.47% -1.03%
multipleImageUploadProcessing 1477.28 ms +7.5% -0.81% 1477.76 ms +1.14% -2.18% -0.03%

post-editor

Metric 93bbbb8 trunk % Change
serverResponse 233.06 ms +6.84% -4.71% 226.18 ms +10.1% -3.76% 3.04%
firstPaint 305.46 ms +4.59% -38.91% 287.14 ms +3.85% -44.15% 6.38%
domContentLoaded 669.42 ms +3.38% -1.19% 652.66 ms +4.85% -1.1% 2.57%
loaded 670.08 ms +3.4% -1.16% 653.3 ms +4.85% -1.09% 2.57%
firstContentfulPaint 313.75 ms +2.23% -5.15% 303.94 ms +3.9% -4.96% 3.23%
firstBlock 1941.65 ms +1.28% -0.36% 1938.77 ms +3.81% -1.44% 0.15%
type 12.03 ms +1.33% -2.99% 12.35 ms +2.11% -5.02% -2.59%
typeWithoutInspector 12.27 ms +0.73% -1.47% 11.74 ms +4% -1.53% 4.51%
typeWithTopToolbar 15.66 ms +3.07% -3.38% 15.6 ms +2.18% -4.1% 0.38%
typeContainer 5.05 ms +6.34% -2.57% 5.21 ms +14.97% -9.4% -3.07%
focus 64.65 ms +11.57% -0.74% 68.43 ms +9.16% -5.74% -5.52%
firstFocus 133.22 ms +0% -0% 132.37 ms +0% -0% 0.64%
selectAll 337.14 ms +1.05% -0.34% 289.06 ms +2.57% -0.64% 16.63%
listViewOpen 43.42 ms +15.8% -8.8% 43.42 ms +3.85% -7% 0%
inserterOpen 25.72 ms +4.39% -10.11% 25.85 ms +5.65% -4.33% -0.5%
inserterHover 7.94 ms +4.28% -7.05% 7.84 ms +6.38% -6.51% 1.28%
inserterSearch 6.29 ms +4.13% -4.93% 5.97 ms +10.22% -3.69% 5.36%
loadPatterns 395.02 ms +6.05% -3.07% 388.28 ms +2.22% -0.94% 1.74%
wpTotal 226.55 ms +6.84% -4.78% 219.9 ms +10.43% -3.83% 3.02%
wpMemoryUsage 14.66 MB +0% -0% 14.63 MB +0% -0% 0.23%
wpDbQueries 55 +0% -0% 55 +0% -0% 0%

site-editor

Metric 93bbbb8 trunk % Change
serverResponse 503.66 ms +7.55% -2.26% 500.39 ms +3.61% -4.16% 0.65%
firstPaint 275.43 ms +74.96% -10.23% 270.41 ms +20.91% -10.22% 1.86%
domContentLoaded 1299.73 ms +2.08% -2.67% 1281.43 ms +1.86% -1.43% 1.43%
loaded 1300.76 ms +2.07% -2.66% 1282.66 ms +1.86% -1.45% 1.41%
firstContentfulPaint 521.03 ms +0.9% -1.58% 512.84 ms +3.88% -2.77% 1.6%
firstBlock 4863.09 ms +1.4% -1.45% 4830.7 ms +2.36% -0.76% 0.67%
type 17.99 ms +5.28% -1.5% 17.66 ms +6.63% -2.32% 1.87%
navigate 124.11 ms +12.62% -1.35% 122.15 ms +7.02% -1.33% 1.6%
loadPatterns 1276.48 ms +3.21% -4.89% 1221.86 ms +2.71% -7.69% 4.47%
loadPages 1016.83 ms +1.14% -2.61% 993.3 ms +1.44% -2.08% 2.37%
wpTotal 493.89 ms +7.64% -2.31% 490.47 ms +3.62% -4.24% 0.7%
wpMemoryUsage 12.70 MB +0% -0% 12.66 MB +0% -0% 0.29%
wpDbQueries 44 +0% -0% 44 +2.27% -0% 0%

3e817b2 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.

Regression: updating a specific option will only change its value and will not corrupt others in /test/e2e/specs/editor/various/core-settings.spec.js, passed after 1 failed attempt.
Error: expect(received).toStrictEqual(expected) // deep equality

- Expected  - 1
+ Received  + 1

  Array [
    "rewrite_rules",
-   "SERIALIZED DATA",
+   "",
  ]
    at forEach (/home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/core-settings.spec.js:46:26)
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/core-settings.spec.js:43:35
drags a multi-selection from anywhere inside it in /test/e2e/specs/editor/various/draggable-blocks.spec.js, passed after 1 failed attempt.
TypeError: Cannot read properties of null (reading 'y')
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/draggable-blocks.spec.js:824:57
    at dragSelectionBelowLanding (/home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/draggable-blocks.spec.js:823:3)
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/draggable-blocks.spec.js:844:3
keeps the blocks selected after dropping a multi-selection in /test/e2e/specs/editor/various/draggable-blocks.spec.js, passed after 1 failed attempt.
TypeError: Cannot read properties of null (reading 'y')
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/draggable-blocks.spec.js:824:57
    at dragSelectionBelowLanding (/home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/draggable-blocks.spec.js:823:3)
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/draggable-blocks.spec.js:908:3
refuses the drop and uploads nothing in /test/e2e/specs/editor/various/single-file-placeholder-drop.spec.js, passed after 1 failed attempt.
Error: expect(received).toHaveLength(expected)

Expected length: 0
Received length: 1
Received array:  [{"_links": {"about": [{"href": "http://localhost:8889/wp-json/wp/v2/types/attachment"}], "author": [{"embeddable": true, "href": "http://localhost:8889/wp-json/wp/v2/users/1"}], "collection": [{"href": "http://localhost:8889/wp-json/wp/v2/media"}], "curies": [{"href": "https://api.w.org/{rel}", "name": "wp", "templated": true}], "replies": [{"embeddable": true, "href": "http://localhost:8889/wp-json/wp/v2/comments?post=223"}], "self": [{"href": "http://localhost:8889/wp-json/wp/v2/media/223", "targetHints": {"allow": ["GET", "POST", "PUT", "PATCH", "DELETE"]}}], "wp:attached-to": [{"embeddable": true, "href": "http://localhost:8889/wp-json/wp/v2/posts/222", "id": 222, "post_type": "post"}]}, "alt_text": "", "author": 1, "caption": {"rendered": ""}, "class_list": ["post-223", "attachment", "type-attachment", "status-inherit", "hentry", "entry"], "comment_status": "open", "date": "2026-10-21T05:16:25", "date_gmt": "2026-10-21T05:16:25", "description": {"rendered": "<p class=\"attachment\"><a href='http://localhost:8889/wp-content/uploads/2026/10/55ffbbb9-25c5-4a06-8783-4688d9b32c74.png'><img loading=\"lazy\" decoding=\"async\" width=\"10\" height=\"10\" src=\"http://localhost:8889/wp-content/uploads/2026/10/55ffbbb9-25c5-4a06-8783-4688d9b32c74.png\" class=\"attachment-medium size-medium\" alt=\"\" style=\"width:100%;height:100%;max-width:10px;\" /></a></p>
"}, "featured_media": 0, "filename": "55ffbbb9-25c5-4a06-8783-4688d9b32c74.png", "filesize": 80, "guid": {"rendered": "http://localhost:8889/wp-content/uploads/2026/10/55ffbbb9-25c5-4a06-8783-4688d9b32c74.png"}, "id": 223, "link": "http://localhost:8889/?attachment_id=223", "media_details": {"file": "2026/10/55ffbbb9-25c5-4a06-8783-4688d9b32c74.png", "filesize": 80, "height": 10, "image_meta": {"alt": "", "aperture": "0", "camera": "", "caption": "", "copyright": "", "created_timestamp": "0", "credit": "", "focal_length": "0", "iso": "0", "keywords": [], "orientation": "0", "shutter_speed": "0", "title": ""}, "sizes": {}, "width": 10}, "media_type": "image", "meta": [], "mime_type": "image/png", "modified": "2026-10-21T05:16:25", "modified_gmt": "2026-10-21T05:16:25", "ping_status": "closed", "post": 222, "slug": "55ffbbb9-25c5-4a06-8783-4688d9b32c74", "source_url": "http://localhost:8889/wp-content/uploads/2026/10/55ffbbb9-25c5-4a06-8783-4688d9b32c74.png", "status": "inherit", "template": "", "title": {"rendered": "55ffbbb9-25c5-4a06-8783-4688d9b32c74"}, "type": "attachment"}]
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/single-file-placeholder-drop.spec.js:71:45

3e817b2 Run

@manzoorwanijk manzoorwanijk added the [Type] Code Quality Issues or PRs that relate to code quality label Oct 20, 2026
@manzoorwanijk manzoorwanijk self-assigned this Oct 20, 2026
@manzoorwanijk
manzoorwanijk marked this pull request as ready for review October 20, 2026 13:26
@Mamaduka

Copy link
Copy Markdown
Member

Components for the editor package are kept for now to allow easy revert of #85081 during the beta cycle if needed.

We also need to be careful and double-check that these components aren't public APIs.

@github-actions github-actions Bot removed the [Package] Editor /packages/editor label Oct 20, 2026

@ciampo ciampo left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks like all of the files being removed are effectively unused 🚀

Although I agree with George about being cautious with some revert-ready files

@ntsekouras ntsekouras left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

As George mentions some files were deliberately left and shouldn't be removed here.

If changes from #85081 land as expected in 7.2, we'll open a PR to remove them then (before the final release).

ntsekouras

This comment was marked as duplicate.

@manzoorwanijk
manzoorwanijk force-pushed the chore/remove-unused-files branch from 8935a14 to efb3125 Compare October 20, 2026 14:33
@manzoorwanijk

Copy link
Copy Markdown
Member Author

Thanks! The editor components are back as of efb3125

@manzoorwanijk
manzoorwanijk force-pushed the chore/remove-unused-files branch from 648cc23 to 3e817b2 Compare October 21, 2026 05:00
@ciampo

ciampo commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

@ntsekouras given that those files that you mentioned should not be deleted anymore in this PR, are we good to merge here? Or do you have any remaining concerns?

@ntsekouras
ntsekouras dismissed their stale review October 21, 2026 16:14

Files for Inspector were preserved.

@ntsekouras

Copy link
Copy Markdown
Contributor

@ntsekouras given that those files that you mentioned should not be deleted anymore in this PR, are we good to merge here? Or do you have any remaining concerns?

No. My only concern were the Inspector related files for possible easier revert of the new one, if needed during beta.

@ciampo
ciampo merged commit 168e4f4 into trunk Oct 21, 2026
114 of 117 checks passed
@ciampo
ciampo deleted the chore/remove-unused-files branch October 21, 2026 16:55
@github-actions github-actions Bot added this to the Gutenberg 24.4 milestone Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Block editor /packages/block-editor [Package] Components /packages/components [Package] DataViews /packages/dataviews [Package] Edit Site /packages/edit-site [Package] Format library /packages/format-library [Package] Notices /packages/notices [Package] Widget Dashboard /packages/widget-dashboard [Type] Code Quality Issues or PRs that relate to code quality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants