mavo
mavo copied to clipboard
`mv-login` fired during the data loading breaks the autosave feature
Reduced testcase: https://codepen.io/dmitrysharabin/pen/ZExZaOJ
It looks like a regression. The first bad commit is: https://github.com/mavoweb/mavo/commit/90a29897384c1d81199fe4c83f1cd43dd8941908.
Some observations on the nature of the issue:
mv-login event is fired during the process of loading data (when they are not fully loaded) after the autoSave state is dropped (for Mavo internal needs). The mv-load event leads to another invocation of the load() method. And since the data load was relaunched, the value of the autoSave property remained false and hasn't been restored to its previous state.
@DmitrySharabin do you have a sense of how much effort it is to fix this? Why is it tagged difficulty: hard?
Perhaps we could just make sure that if data is loading, mv-login is fired after? That sounds like a pretty easy fix.
Why is it tagged difficulty: hard?
Actually, it shouldn't be tagged as hard. I might have clicked the wrong tag previously and removed it later. There must be a tag with priority only.
Perhaps we could just make sure that if data is loading,
mv-loginis fired after? That sounds like a pretty easy fix.
After you described it, it really sounds easy. 😄
@LeaVerou It looks like I could fix it. Could you please take a look?