- Issue created by @wim leers
- Merge request !722Draft: Resolve #3509270 "Autosave list faster upon change" β (Closed) created by wim leers
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
There: I propose to simply make mutations to the layout (
POST
orPATCH
to/xb/api/layout/β¦
) to change: - π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
An alternate proposal
In preview.ts in previewApi.endpoints.postPreview.onQueryStarted trigger a clientside invalidation and force pendingChangesApi.endpoints.getAllPendingChanges to invalidate.
It would require adding a cache tag to getAllPendingChanges and using something like https://git.drupalcode.org/project/experience_builder/-/merge_requests/7... from onQueryStarted
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
#4: that works too, but does require an extra request. I know that the polling is still ongoing, and so this would just change the polling rhythm, if you will.
But β¦ #4 is inevitably more concurrent requests immediately after making changes. And hence also more Drupal bootstraps.
I think in my proposal, we can even reduce the polling frequency, to say, every 30 seconds. It'll still feel instantaneous.
- π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
Yes but it does require making use of RTK Query internals - https://redux-toolkit.js.org/rtk-query/usage/manual-cache-updates which as @balintbrews has pointed out
We recommend using automated re-fetching as a preference over manual cache updates in most situations.
- π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
Just to be clear, I'm not against manual cache updates, PreviewEnvelope was designed for this purpose
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
So you're saying: your MR fixes it with a
+13,0
diffstat, barely more than my OpenAPI-only change π€£Yeah, that's a no-brainer! Can't wait to test that tomorrow! π (Would be happy to insta-merge after manual testing, and to move what I proposed to a new issue for a distant future.)
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
Will test @larowlan's MR after lunch π
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
Well β¦ that totally works ππ€©
- πΊπΈUnited States hooroomoo
I may have found a regression so am looking into it. Clicking publish all changes shows the happy green smiley but then flashes back to show "Publish all changes" again
- π¬π§United Kingdom jessebaker
hooroomoo β credited jessebaker β .
- πΊπΈUnited States hooroomoo
Adding credit for @jessebaker for pointing me to the manualRetch that might not be necessary anymore and removing it fixed the regression i was looking at
- π¬π§United Kingdom longwave UK
@hooroomoo I've manually tested this and can't find any issues.. I can reproduce the delay on 0.x but with the MR in place it's gone, the Published > Changed label updates almost instantly.
- π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
I reverted @hooroomoo's changes after we tested in a zoom call and found the behaviour reported in #13 actually exists in HEAD too - π Auto save shows a change when there is not one Active
I've implemented the change of dispatch ordering per my review and that
a) fixes the bug from this issue
b) keeps things the same as they are in head for π Auto save shows a change when there is not one Active (i.e. it takes 10s for it to (wrongly) report 1 change - which is what was happening in #13 but immediately rather than after 10sI think this is ready to go
-
wim leers β
committed 62c73b33 on 0.x authored by
larowlan β
Issue #3509270 by larowlan, hooroomoo, wim leers, jessebaker: Status...
-
wim leers β
committed 62c73b33 on 0.x authored by
larowlan β
Automatically closed - issue fixed for 2 weeks with no activity.