ref(browser): Restructure browser-utils by domain - #23071
Merged
Conversation
logaretm
force-pushed
the
awad/webvitals-restructure
branch
from
August 5, 2026 16:47
af2fd8a to
cc6aaf8
Compare
Contributor
size-limit report 📦
|
logaretm
force-pushed
the
awad/webvitals-restructure
branch
from
August 5, 2026 17:35
cc6aaf8 to
071799f
Compare
logaretm
force-pushed
the
awad/webvitals-restructure
branch
2 times, most recently
from
August 5, 2026 19:00
e1990b4 to
794433e
Compare
logaretm
force-pushed
the
awad/webvitals-restructure
branch
from
August 5, 2026 19:16
794433e to
7a246f5
Compare
logaretm
force-pushed
the
awad/webvitals-restructure
branch
from
August 5, 2026 19:44
7a246f5 to
12d0fc5
Compare
logaretm
marked this pull request as ready for review
August 5, 2026 20:05
logaretm
force-pushed
the
awad/webvitals-restructure
branch
from
August 6, 2026 14:06
12d0fc5 to
7c1f6aa
Compare
Reorganize browser-utils/src away from the catch-all metrics/ folder into clear domains: - instrumentation/ for event-source hooks (dom, history, location, xhr) plus the PerformanceObserver layer, renamed from metrics/instrument.ts to instrumentation/performanceObserver.ts to stop colliding with the folder - web-vitals/ for web-vital tracking, spans, inp, lcp, reportEvents, and the browser helpers merged into a single utils.ts - performance/ for generic performance-entry enrichment: entries, element/ user/resource timing, and shared utils browserMetrics.ts is split into web-vitals/tracking.ts and performance/ entries.ts, and utils.ts into web-vitals/reportEvents.ts and performance/ utils.ts. Public API (index.ts re-exports) is unchanged; only internal paths and the test tree move.
logaretm
force-pushed
the
awad/webvitals-restructure
branch
from
August 7, 2026 14:39
7c1f6aa to
8c7cea8
Compare
Lms24
approved these changes
Aug 7, 2026
Lms24
left a comment
Member
There was a problem hiding this comment.
nice, this looks much more logical now, thanks!
msonnb
approved these changes
Aug 7, 2026
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.
Reorganizes
browser-utils/srcaway from the catch-allmetrics/folder into clear domains:instrumentation/(dom/history/location/xhr + the PerformanceObserver layer),web-vitals/(tracking, spans, inp, lcp, reportEvents, and the helpers merged into one utils), andperformance/(entries, element/user/resource timing, shared utils).The reasoning is we will actually have some metric emitting logic in there and we don't want it to be confused with pre-existing logic like in #22397
Following up on pulling in
webvitalsas a dependency, I took this chance to clean up our structure and it does have some minor bundle-size improvements. The bundle increases are due to #23070 which explains where the increase is coming from and why we are willing to absorb it.