Editor-only stylesheets fragment into one file per producer (9 of 30 theme CSS files on a 4-route site)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- php
- Lĩnh vực
- performance
Hướng nghiên cứu
Start with the onlyplants WORKFLOW notes mentioned in the issue and inspect EditorCanvasStylesheets::split, NavigationStyleProjector, and EvidenceRouteStylesheets::retire. Compare the two proposed approaches against the enqueue order and retirement behavior. Done means reducing editor-only stylesheet file count while preserving cascade order and correct retirement; the issue does not name a test or validation command.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
On the onlyplants import (4 routes, SSI proportionate_assets reports css_file_count 30 against a cap of 20), 9 of the 30 theme CSS files are loaded only in the editor. Visitors never request them, but each one is a separate file on disk and a separate request in the editor canvas:
| Generator | Files | Bytes each |
|---|---|---|
EditorCanvasStylesheets::split: .editor-canvas.css extracts |
6 | 242, 272, 280, 547, 1096, 1748 |
NavigationStyleProjector → editor-static-state-*, written per page as two sheets that differ only by source_role (engine-owned or not) |
2 | 778, 1094 |
editor-static-state shared-chrome-* (global, engine-owned) |
1 | 231 |
Four of the extracts are under 600 bytes, just above MIN_EXTRACT_BYTES = 200. The two per-page editor-static-state sheets share scope, placement (after-author) and target (editor), and are enqueued one after the other.
Expected
Editor-only rules that one route loads in one cascade run should arrive as one file, not one file per producer. Two options, either one rendering-neutral:
- Concatenate adjacent editor-only sheets that have the same scopes, placement and media. Concatenating in enqueue order preserves the cascade. The
source_roledistinction only matters toEvidenceRouteStylesheets::retire, so it can live per rule run rather than per file. - Reconsider the 200-byte extract floor. It was tuned for visitor bytes, but every extract also counts against the theme's file budget.
Evidence
Baseline: SSI a606a335c + BE trunk 50c79c1bd94, full onlyplants capture. Inventory and measurements are in the import loop's onlyplants WORKFLOW notes. Related: #4563, #4589, #7205, Automattic/blocks-engine#7216 (the functions.php part of the same scorecard check).
- Ngôn ngữ chính
- PHP
- Star
- 31
- Fork
- 7
- Merge trung bình
- 3 giờ 40 phút
- Pull request đã merge (30 ngày)
- 813
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Automattic/blocks-engine
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Automattic/blocks-engine#4943 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Automattic/blocks-engine#4942 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Automattic/blocks-engine#4921 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Automattic/blocks-engine#775 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 12/100
Automattic/blocks-engine#7505 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Automattic/blocks-engine
Issue tương tự
-
OpenRouter errors returned in a 200 body are thrown as a plain AiExceptionCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
freescout-help-desk/freescout#5844 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
sync-en
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
sync-en
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Перевод устарел
Độ khó 2/5 1-2 ngày Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày