- Issue created by @narendraR
- Merge request !747Issue #3508631: Refactor Project Data Fetching into a new Window-Scoped QueryManager โ (Merged) created by narendraR
- ๐บ๐ธUnited States phenaproxima Massachusetts
That's pretty much exactly what I imagined! I have a couple of questions, and I think we need to be sure we're documenting this design properly, or it won't be clear to anyone why we have this window-scoped singleton.
- ๐ฎ๐ณIndia narendraR Jaipur, India
Thanks for the review, @phenaproxima! Iโve addressed the feedback and made some refinements.
- ๐บ๐ธUnited States phenaproxima Massachusetts
Okay - tentatively RTBCing. I think this is the final step before we need to do the bigger front-end lift, which is...somehow make all project objects react automatically to changes in the centralized cache. That's going to take some thinking and probably a fair amount of refactoring.
But, once this lands, all the other pieces are in place.
- ๐บ๐ธUnited States phenaproxima Massachusetts
I analyzed this a bit more and decided to proceed with turning QueryManager into a store (i.e., it fulfills Svelte's "store contract" by implementing a
subscribe()
method in a particular way). The idea is that it should invoke callbacks whenever project data in the centralized cache has changed. - ๐บ๐ธUnited States chrisfromredfin Portland, Maine
A few comments:
- This introduces quite a bit of flickering in the UI that I think is a UI regression/bug.
- When activating multiple projects in one fell swoop, it seems to only mark the first one as "Installed." However, the front-end seems to be reacting to the correct statuses from the backend, since the `/activate?_wrapper_format=drupal_ajax` being returned is showing "active" for the first result, but only "present" for the remainder in the list. Note that if you mix-and-match; that is, if you pick two that are already in the filesystem and two that need to be required in, then it activates the local ones first (in the same way, only first one is reflected correctly in the UI), then it activates the required ones (and again shows same behavior, only the first one of that "batch" is reflected correctly in the UI). And again, this is because of what's coming back from the AJAX system. I believe the UI is properly doing "what it's told," but it's being told wrong.
- ๐บ๐ธUnited States phenaproxima Massachusetts
OK, I think this will improve things.
- I can't quite reproduce the flickering, but I suspect that using Svelte's indexing to help reduce diffing will improve it. So I tried that.
- The module activation bug is legitimate and was related to the fact that ModuleActivator is holding on to an outdated container. I fixed this by forcing it to pull the new module handler and module list from the global service wrapper. This is a known pitfall of the container being changeable during a single request (and indeed, if activating multiple projects at once, that is likely to happen). I confirmed that it is fixed in manual testing, but added a low-level test for good measure.
- ๐บ๐ธUnited States tim.plunkett Philadelphia
tim.plunkett โ made their first commit to this issueโs fork.
- ๐บ๐ธUnited States tim.plunkett Philadelphia
Reverted my commit, will address in follow-up. This is good to go
-
tim.plunkett โ
committed ddbe9cd2 on 2.0.x authored by
narendrar โ
Issue #3508631 by phenaproxima, narendrar, chrisfromredfin: Load project...
-
tim.plunkett โ
committed ddbe9cd2 on 2.0.x authored by
narendrar โ
Automatically closed - issue fixed for 2 weeks with no activity.