mavo icon indicating copy to clipboard operation
mavo copied to clipboard

`mv-login` fired during the data loading breaks the autosave feature

Open DmitrySharabin opened this issue 3 years ago • 2 comments

Reduced testcase: https://codepen.io/dmitrysharabin/pen/ZExZaOJ

DmitrySharabin avatar Aug 24 '22 09:08 DmitrySharabin

It looks like a regression. The first bad commit is: https://github.com/mavoweb/mavo/commit/90a29897384c1d81199fe4c83f1cd43dd8941908.

DmitrySharabin avatar Aug 24 '22 09:08 DmitrySharabin

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 avatar Aug 25 '22 08:08 DmitrySharabin

@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.

LeaVerou avatar Sep 02 '23 12:09 LeaVerou

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-login is fired after? That sounds like a pretty easy fix.

After you described it, it really sounds easy. 😄

DmitrySharabin avatar Sep 02 '23 18:09 DmitrySharabin

@LeaVerou It looks like I could fix it. Could you please take a look?

DmitrySharabin avatar Sep 15 '23 10:09 DmitrySharabin