Repository navigation
chore(deps): move to @meonode/ui 3.3.0 - #331
Merged
Merged
Conversation
@meonode/ui 3.1.3 → 3.3.0. In the browser, styled nodes resolve their classes without Emotion's css-prop components, so a styled node takes 3 fibers on the mount that inserts its rule and 2 after, where it took 4. Themed at-rule and selector keys resolve against the nearest provider; the site's 34 such keys are all `@media` on `theme.breakpoint`, under its one ThemeProvider. 3.2 adds a separate react-server build. stylis moves to 4.4.0 with it. lint, format:check, typecheck, test:coverage, content:check and examples:check pass.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #323
What changes
@meonode/ui3.1.3 → 3.3.0. No source changes. The lockfile adds a secondstylis, 4.4.0, nested under@meonode/ui: since 3.2.0 it asks for^4.4.0, which can't share the 4.2.0 that Emotion pins exactly. That isl7aromeo/meonode#136, planned for the next
@meonode/uipatch.What reaches the site:
inserts its rule and 2 after, where it took 4.
@mediaontheme.breakpoint(compact768px,wide1280px), under its oneThemeProvider.react-serverbuild, which the server components now resolve.How it was checked
Two production builds,
main(06dd486, 3.1.3) and this branch, compared on the same machine. Every capture below istaken once the page has hydrated (React's fiber on a header button), with the network settled.
Rendering. 13 pages (home, two guides, the API index, a kind page, a symbol page, a cheat sheet, the changelog, the
glossary, the playground, 4.2's API, a 4.1 release and the 404), each at 375, 767, 768, 1024, 1279, 1280 and 1440 px in
the light scheme and at 1280 px in the dark: 104 views.
opacity, visibility, shadow, display, position): 146,148 elements, none moved by more than 0.5 px, none restyled, none
added or gone.
mainand 3 onthis branch, each from its own build's first shot as much as from the other build's: the monospace face hadn't
swapped in when they were taken, so inline code shows the fallback, in the same boxes.
Client paths. On each build, the same steps, captured after each: a sidebar navigation from
guardstocomponentsand Back; the theme switched at runtime, light to dark and back; the phone navigation sheet, and the themeswitched inside it; the palette, empty and with a query; the sidebar filter; and a playground Run with its logs opened.
12 captures, 36,020 elements: none moved, none restyled, none added or gone, with the same CSS rules and bytes in each.
Their screenshots match too, except the playground's opened logs, whose timestamps differ between any two runs.
The harness was checked both ways: a second run on this branch matches the first in every box and style, and a run
with a restyle planted after hydration is caught (102 boxes moved, 84 elements restyled).
Server and client output. l7aromeo/meonode#136 notes that server components compile themed CSS with stylis 4.4
while Emotion runs 4.2 in the browser, so the two could disagree. On every capture above, 104 views and 12 client steps
on each build, the page's own URL is fetched again and its server HTML compared with the live page:
<style>elements and linked stylesheets) against every rule the browser holds:no selector holds text the server didn't send for it, on either build;
identically);
(the page itself, and the harness fetching it again).
Planted faults show each check fires: a rule the server never sent, a changed class and a mismatch report are each
reported.
Themed at-rules. The widths sit on both sides of both breakpoints the 34 keys use (767/768, 1279/1280). Every view's
set of
@mediaconditions is identical between the builds, and no element changes on either side of a breakpoint, soeach key resolves to the same query and no later block for the same property takes over.
Bytes. First-load JS grows by 4.4 KB gzipped on every page: 182.0 → 186.4 KB on a guide or API page, 182.4 → 186.7
KB on home, 186.8 → 191.2 KB on the playground, against the 220 KB budget (
bun run budget:js: 4616 pages, 0 over). Itis one shared chunk, 29.1 → 33.5 KB at the default gzip level
budget:jsuses; the others are unchanged. By module,each measured at
-9as the chunk gzipped with and without it (28,909 → 33,176 B for the whole chunk):@meonode/ui's own modules, +2,527 B (21,423 → 23,950). Among them ship the theme diagnostics and theunkeyed-list detector, about 4 KB gzipped file by file: development-only diagnostics whose guard isn't a constant a
bundler can fold. ui: development-only diagnostics ship in production bundles (~4 KB gzipped) l7aromeo/meonode#134 leaves them out of production builds while keeping
setDebugMode.stylis, +1,157 B net: its 4.4.0 module is 4,653 bytes raw, 2,039 B of the gzipped chunk, and Emotion'smodule, which held the one copy on 3.1.3, is 882 B smaller. ui: depends on a different stylis than Emotion, so apps ship two copies l7aromeo/meonode#136 removes it.
gzip shares its context across modules, so removing each module alone undercounts what they cost together: the
removals add up to 3.7 KB of the chunk's 4,267 B growth, not all of it. A later
@meonode/uibump that carries bothupstream fixes wins those bytes back. The renderer now imports
@emotion/utilsdirectly, which@emotion/reactalready bundles, so that adds nothing.
Largest paint. Measured locally on one machine, not in CI: the repository's own
@performancespec (Lighthousethrough the gzip edge hop, median of five runs, three for applied throttling), on each build:
//docs/4.1/defer/docs/4.1/testing/docs/4.1/api/controllers/ShardContext/docs/4.1/changelog/docs/4.1/changelog/4.1.0-beta.0Applied runs use the 10× CPU slowdown on both builds, so their differences are within run-to-run variation.
Checks.
bun run lint,format:check,typecheck,content:check,examples:check: pass.bun run test:coverage: 111 files, 972 tests pass. CI runs the build and e2e.