Skip to content

Pages: load hierarchical levels in both site editors - #83546

Closed
dinhtungdu wants to merge 1 commit into
fix/80360-hierarchy-paginationfrom
fix/80360-pages-integration
Closed

dinhtungdu wants to merge 1 commit into
fix/80360-hierarchy-paginationfrom
fix/80360-pages-integration

Conversation

@dinhtungdu

@dinhtungdu dinhtungdu commented Sep 26, 2026 •

Copy link
Copy Markdown
Member

Summary

Stacked on #83320.

  • Load roots and each expanded parent's direct children in separate batches in both Site Editors, with independent continuation and retry.
  • Retain X-WP-Total from the existing branch response; subtract accumulated unique direct children to show Show N more before the first continuation click. No extra requests for collapsed branches; pagination remains batched.
  • Keep the two editor hooks separate. Search, filters, grouped views, and list views remain flat; page actions and Quick Edit refresh loaded hierarchy.

Testing

At 0a150c7471360469f7928fe6badc1978b56a679c: 85 focused tests covering both hooks and DataViews, targeted JS lint, typecheck, build, and commit hooks passed. Tests cover initial counts, duplicate IDs, descendant exclusion, and unknown/invalid totals.

Current real Pages verification is blocked in both editors: the assigned site returns 404. The complete-stack Storybook browser run checked counts, batched loading, sibling placement, and compact alignment; it does not replace live REST/editor verification. Evidence: artifacts/show-n-more/.

Screenshots or screencast

Historical Pages captures from 11b30e473f9515bca7c7a2a081e644eab3b9ef38 (before the remaining-count update):

Classic Site Editor Pages hierarchy

Extensible Site Editor Pages hierarchy

@dinhtungdu dinhtungdu added [Package] Edit Site /packages/edit-site [Feature] DataViews Work surrounding upgrading and evolving views in the site editor and beyond labels Sep 26, 2026
@github-actions

github-actions Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

🤖 PR meta 🤖

📦 Bundle size

Size Change: +1.24 kB (+0.02%)

Total Size: 8.22 MB

📦 View Changed
Filename Size Change
build/scripts/edit-site/index.min.js 386 kB +1.24 kB (+0.32%)

From 50e4ec6, not the current head. Run

⚡ Performance

Show the results

Client side metrics exclude the server response time.

front-end-block-theme

Metric b3c528f fix/80360-hierarchy-pagination % Change
timeToFirstByte 48.2 ms +4.46% -2.9% 47.65 ms +5.14% -1.68% 1.15%
largestContentfulPaint 88 ms +0% -4.55% 80 ms +10% -0% 10%
lcpMinusTtfb 38.2 ms +7.72% -10.73% 32.65 ms +18.38% -5.05% 17%
wpBeforeTemplate 22.75 ms +10.15% -1.27% 22.74 ms +7.92% -1.72% 0.04%
wpTemplate 21.55 ms +3.2% -2.32% 21 ms +4.52% -0.9% 2.62%
wpTotal 44.74 ms +4.54% -3.26% 43.88 ms +5.61% -1.37% 1.96%
wpMemoryUsage 7.59 MB +0% -0% 7.58 MB +0% -0% 0.08%
wpDbQueries 17 +0% -0% 17 +0% -0% 0%

front-end-classic-theme

Metric b3c528f fix/80360-hierarchy-pagination % Change
timeToFirstByte 39.5 ms +3.04% -1.77% 35.25 ms +5.96% -0.85% 12.06%
largestContentfulPaint 92 ms +0% -2.17% 80 ms +2.5% -0% 15%
lcpMinusTtfb 51.65 ms +2.9% -2.13% 45 ms +1.89% -0.78% 14.78%
wpBeforeTemplate 20.42 ms +2.06% -1.27% 20.5 ms +4.34% -1.61% -0.39%
wpTemplate 15.85 ms +4.23% -1.14% 12.19 ms +2.63% -0.98% 30.02%
wpTotal 36.57 ms +3.72% -1.94% 32.64 ms +5.12% -1.01% 12.04%
wpMemoryUsage 6.21 MB +0% -0% 6.07 MB +0% -0% 2.37%
wpDbQueries 14 +0% -0% 10 +0% -0% 40%

media-processing

Metric b3c528f fix/80360-hierarchy-pagination % Change
mediaProcessingJpeg 406.48 ms +1.83% -0.72% 410.43 ms +0.78% -1.05% -0.96%
mediaProcessingAvif 6243.67 ms +0.34% -0.21% 6257.75 ms +0.11% -0.06% -0.23%
mediaProcessingJpegToAvif 4287.89 ms +0.15% -0.11% 4302.41 ms +0.34% -0.29% -0.34%

media-upload

Metric b3c528f fix/80360-hierarchy-pagination % Change
jpegUploadProcessing 1436.11 ms +35.37% -1.37% 1439.13 ms +1.57% -0.93% -0.21%
pngUploadProcessing 214.13 ms +6.94% -7.93% 205.62 ms +3.84% -6.51% 4.14%
largeJpegUploadProcessing 1416.46 ms +0.64% -0.72% 1419.33 ms +0.38% -0.2% -0.2%
multipleImageUploadProcessing 1546.69 ms +1.08% -1.47% 1571.65 ms +11.96% -0.48% -1.59%

post-editor

Metric b3c528f fix/80360-hierarchy-pagination % Change
serverResponse 527.63 ms +5.02% -2.03% 513.15 ms +4.19% -10.34% 2.82%
firstPaint 231.66 ms +5.28% -7.28% 233.1 ms +10.23% -16.03% -0.62%
domContentLoaded 1120.19 ms +1.27% -2.78% 1092.04 ms +1.21% -1.42% 2.58%
loaded 1121.51 ms +1.28% -2.77% 1093.44 ms +1.19% -1.43% 2.57%
firstContentfulPaint 454.02 ms +2.3% -1.37% 446.58 ms +3.65% -2.7% 1.67%
firstBlock 3365.31 ms +0.74% -0.91% 3241.63 ms +0.96% -1.07% 3.82%
type 21.79 ms +3.17% -3.63% 19.8 ms +5.2% -3.84% 10.05%
typeWithoutInspector 21.36 ms +4.59% -1.5% 19.86 ms +2.52% -1.71% 7.55%
typeWithTopToolbar 27.79 ms +8.2% -5.79% 25.26 ms +8.83% -12.03% 10.02%
typeContainer 9.97 ms +3.31% -11.03% 8.97 ms +7.47% -5.69% 11.15%
focus 79.57 ms +4.11% -5.09% 75.28 ms +12.98% -3.68% 5.7%
firstFocus 221.28 ms +0% -0% 201.44 ms +0% -0% 9.85%
selectAll 550.64 ms +3.37% -3.33% 517.79 ms +1.32% -2.7% 6.34%
listViewOpen 74 ms +1.88% -4.16% 75.42 ms +1.42% -3.71% -1.88%
inserterOpen 23.89 ms +10.21% -3.81% 23.51 ms +3.49% -1.57% 1.62%
inserterHover 3.3 ms +6.67% -15.15% 2.75 ms +12.36% -8.36% 20%
inserterSearch 8.27 ms +3.39% -5.8% 7.96 ms +3.02% -7.16% 3.89%
loadPatterns 635.39 ms +5.44% -1.12% 641.41 ms +4.9% -3.2% -0.94%
wpTotal 517.97 ms +5.01% -2.05% 502.98 ms +4.26% -10.4% 2.98%
wpMemoryUsage 13.13 MB +0% -0% 13.12 MB +0% -0% 0.07%
wpDbQueries 54 +0% -1.85% 54 +0% -0% 0%

site-editor

Metric b3c528f fix/80360-hierarchy-pagination % Change
serverResponse 275.16 ms +6.62% -6.14% 291.43 ms +4.21% -3.2% -5.58%
firstPaint 158.97 ms +32.05% -11.94% 168.91 ms +30.06% -10.18% -5.88%
domContentLoaded 753.47 ms +3.09% -0.87% 782.64 ms +1.86% -3.49% -3.73%
loaded 754.21 ms +3.11% -0.85% 783.57 ms +1.85% -3.51% -3.75%
firstContentfulPaint 314.15 ms +11.19% -2.55% 330.91 ms +1.74% -4.89% -5.06%
firstBlock 2679.13 ms +2.3% -1.76% 2749.5 ms +1.69% -2.09% -2.56%
type 16.86 ms +1.78% -8.01% 16.67 ms +5.4% -2.4% 1.14%
navigate 98.81 ms +7.76% -19.34% 96.48 ms +7.5% -18.9% 2.42%
loadPatterns 911.21 ms +3.89% -3.26% 951.66 ms +8.13% -3.43% -4.25%
loadPages 991.12 ms +3.28% -1.26% 1022.94 ms +2.68% -1.65% -3.11%
wpTotal 267.93 ms +6.78% -6.27% 284.13 ms +4.21% -3.3% -5.7%
wpMemoryUsage 12.11 MB +0% -0% 12.10 MB +0% -0% 0.04%
wpDbQueries 44 +0% -0% 44 +0% -0% 0%

From 50e4ec6, not the current head. Run

🏁 Flaky tests

Show the failures

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.

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

From 50e4ec6, not the current head. Run

@dinhtungdu
dinhtungdu force-pushed the fix/80360-hierarchy-pagination branch from b6bd5de to dbb968e Compare October 12, 2026 03:42
@dinhtungdu
dinhtungdu force-pushed the fix/80360-pages-integration branch from 0a150c7 to 507f788 Compare October 12, 2026 03:42
@dinhtungdu dinhtungdu closed this Oct 12, 2026
@dinhtungdu
dinhtungdu removed this pull request from stack #84117 October 12, 2026 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] DataViews Work surrounding upgrading and evolving views in the site editor and beyond [Package] Edit Site /packages/edit-site [Type] Feature New feature to highlight in changelogs.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant