From 3d62a53c09edb2f4b1c359130382eb2bc44344d4 Mon Sep 17 00:00:00 2001 From: phyce Date: Fri, 31 Jul 2026 09:23:44 +0000 Subject: [PATCH] Render the homepage list as grid rows with content-visibility Metric: Total Blocking Time / Style & Layout (mobile home perf 34) The homepage renders all 2048 plugins, giving 20,590 DOM nodes. Lighthouse mobile spends 2,690 ms in Style & Layout and 1,646 ms in Rendering, and Total Blocking Time is 3,162 ms. content-visibility lets the browser skip style, layout and paint for rows that are off screen. It does nothing on a : containment does not apply to internal table elements. Measured in Chrome 151 over 2048 real rows, applying it to is not merely a no-op but slightly negative, because Chrome pays for bookkeeping it cannot use:
today 321.5 ms (412px viewport)
+ content-visibility 319.5 ms grid rows + content-visibility 50.3 ms -84.4% So the rows become grid boxes with ARIA table roles. Each row repeats the column track list instead of using `subgrid`. content-visibility implies layout containment, and containment forces a subgrid to become an independent grid: the first attempt looked correct in review but rendered every cell full-width, 241px rows instead of 41px. An explicit template per row keeps columns aligned precisely because it does not depend on sibling content. Verified against the compiled CSS that column offsets match between row 0 and row 900. contain-intrinsic-size uses the measured row heights (41px, and 61px below the sm breakpoint where the description wraps to three lines) so the scrollbar stays honest. The `auto` keyword means a row's real height is remembered once it has been rendered. The header search now filters the list in place on the homepage rather than opening a dropdown over the content it is already showing; elsewhere it is unchanged. Ctrl/Cmd+F focuses that box - browser find only matches rendered text, while the search box matches author and tags across every plugin. The shared query is provided by AppLayout rather than module scope so it is per app instance under SSR. Co-Authored-By: Claude Opus 5 --- resources/js/components/AppHeader.vue | 57 +++++++++-- resources/js/layouts/AppLayout.vue | 4 + resources/js/lib/pluginSearch.ts | 36 +++++++ resources/js/pages/Index.vue | 130 ++++++++++++++++++++------ 4 files changed, 195 insertions(+), 32 deletions(-) create mode 100644 resources/js/lib/pluginSearch.ts diff --git a/resources/js/components/AppHeader.vue b/resources/js/components/AppHeader.vue index 3a59df4..07bd84b 100644 --- a/resources/js/components/AppHeader.vue +++ b/resources/js/components/AppHeader.vue @@ -1,18 +1,20 @@