Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Report][3.0.0-beta.2] HMR not getting applied when updating an element in various contexts #15163

Closed
TechAkayy opened this issue May 28, 2022 · 5 comments
Assignees
Labels
T: bug Functionality that does not work as intended/expected upstream Problem with a third party library that we may have to work around
Milestone

Comments

@TechAkayy
Copy link

TechAkayy commented May 28, 2022

Environment

Vuetify Version: 3.0.0-beta.2
Vue Version: 3.2.31
Browsers: Chrome 101.0.4951.64
OS: Mac OS 10.15.7

Steps to reproduce

HMR is mostly not getting applied when updating vuetify tags within v-for loops, and also in various contexts.

In the attached reproduction (please first fork the repo, and then make updates):

  • update v-btn's (within v-for loop) color from 'red' to 'green', and save the page, and HMR is not getting applied, and requires page refresh everytime to apply the update.
  • the v-slider (not within v-for loop). Try changing the step from '5' to '10', and save file, HMR doesn't apply, and requires page refresh for every atomic update like this.
vuetify-hmr-bug.mp4

I have also tried numerous other scenarios, where HMR mostly is not working well within various contexts. This impacts our DX a lot, especially when working on something (template & style sections, and not script section) where we want the state preserved.

Expected Behavior

HMR should apply correctly when updating vuetify tags within various contexts (eg, v-for loops), at least most of the time (if not 100% of the time)

Actual Behavior

HMR is mostly not getting applied when updating vuetify tags esp for elements within various contexts (eg, v-for loops)

Reproduction Link

https://stackblitz.com/github/TechAkayy/vuetify3-beta-hmr-bug?file=src%2FApp.vue

@KaelWD KaelWD added T: bug Functionality that does not work as intended/expected E: defaults Defaults composable and removed S: triage labels May 28, 2022
@KaelWD KaelWD added this to the v3.0.0-beta milestone May 28, 2022
@KaelWD KaelWD self-assigned this May 28, 2022
@KaelWD
Copy link
Member

KaelWD commented May 28, 2022

Vue bug, looks like vuejs/core#1942 wasn't fixed properly. vuejs/core#2359 added a check for instance.parent.type.__hmrId but in this case only instance.parent.parent.type.__hmrId is set because v-app is also a non-sfc component.

@KaelWD KaelWD added upstream Problem with a third party library that we may have to work around and removed E: defaults Defaults composable labels May 28, 2022
@TechAkayy
Copy link
Author

Good day @KaelWD, just wanted to understand what our protocol is for dealing with upstream bugs like this one.

Does the vuetify team collate bugs under the upstream tag, and raise it with the upstream repo? Or should I create a ticket with vuejs/core for this one?

I have been encountering these kinda HMR issues too frequent, so wondering if vuetify could have some workaround in place while the upstream fix is pending.

Note, I have updated the title of this card, as the HMR issues are not only happening with elements within v-for loops, but rather in various random contexts.

Thanks, have a good day!

@TechAkayy TechAkayy changed the title [Bug Report][3.0.0-beta.2] HMR not getting applied when updating an element within v-for [Bug Report][3.0.0-beta.2] HMR not getting applied when updating an element in various contexts Jun 5, 2022
@KaelWD
Copy link
Member

KaelWD commented Jun 6, 2022

There's already a pr: vuejs/core#4077
The only workaround would be for you to use patch-package to apply the fix.

@TechAkayy
Copy link
Author

Sweet. Thanks for the pointer @KaelWD

@johnleider
Copy link
Member

This is being closed because it has little to do with us. Watch vuejs/core#4077 for more relevant updates.

If you have any questions, please reach out to us in our Discord community.

@johnleider johnleider closed this as not planned Won't fix, can't repro, duplicate, stale Aug 17, 2022
@johnleider johnleider assigned johnleider and unassigned KaelWD Aug 17, 2022
@KaelWD KaelWD assigned KaelWD and unassigned johnleider Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: bug Functionality that does not work as intended/expected upstream Problem with a third party library that we may have to work around
Projects
None yet
Development

No branches or pull requests

3 participants