refactor(display): delegate breakpoint math to createBreakpoints - #23210
Open
johnleider wants to merge 5 commits into
Open
johnleider wants to merge 5 commits into
johnleider wants to merge 5 commits into
Conversation
createDisplay still returns the instance components already read. Flag calculation now comes from @vuetify/v0 createBreakpoints, which follows matchMedia when the browser has it. Resize stays here. The v0 plugin subscribes by replacing app.mount, and createVuetify already owns that hook for the SSR flush.
@vuetify/v0 1.2.3 listens inside createBreakpoints. A second listener would run update twice per resize. The dependency floor is 1.2.3.
createBreakpoints attaches that listener on the first update(), which runs after createVuetify's scope has returned. A child scope created with the display is stopped with it.
Contributor
|
In practice, devs would need to make use of The solution (evaluating |
J-Sek
requested changes
Sep 25, 2026
Comment on lines
215
to
218
Contributor
The global mobile flag follows the CSS query. The component override was still comparing innerWidth, so the same lg threshold could disagree. The computed reads width, so it refreshes from the existing resize listener and does not subscribe to matchMedia itself.
J-Sek
previously approved these changes
Sep 25, 2026
matchMedia() does not subscribe. Removing this read would freeze the component mobile flag on resize.
J-Sek
approved these changes
Sep 25, 2026
This branch has not been deployed
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.
createDisplaystill returns the instance components already read:mobile,thresholds,platform, and the breakpoint flags. Flag calculation now comes fromcreateBreakpoints.Resize stays in Vuetify. The v0 plugin subscribes by replacing
app.mount, andcreateVuetifyalready owns that hook for the SSR flush. A booleanssr: trueis passed as a zero size, becausecreateBreakpointsonly accepts a size object.Checks use
matchMediawhen the browser has it, so zoom follows the CSS media query instead ofinnerWidth.