lib/media contains 4 flux stores, coupled together, and they're used to power the media library and its functionality that's integrated in the classic post editor.
All those stores should be reduxified, and the relevant code ported to use the redux implementation:
library-selected-store - @tyxla, #40269list-storestorevalidation-store - @tyxla, #39372I've started working on reduxifying the media validation store in https://github.com/Automattic/wp-calypso/pull/39372 which is split for easier review and testing to the following PRs:
@tyxla are you also making sure they don't end up being part of monolithic store, and could easily be exported out from Calypso with rest of library? Asking because of @jameslnewell 's work.
@tyxla are you also making sure they don't end up being part of monolithic store, and could easily be exported out from Calypso with rest of library? Asking because of @jameslnewell 's work.
This is a good call, but we're not doing that right now. We're approaching it incrementally - reduxifying is one thing, and modularizing is another. It is on our radar, but IMHO it should be done step by step. FWIW, once those stores are reduxified, modularizing them shouldn't be a big deal.
Possibly related โ Document moving Media Library to Redux #26168
I'm reduxifying some more today. I've spent some time working on getting rid of the media library selected items store in #40269 which is split for easier review and testing to the following PRs:
I've started working on list-store. I'll update with PRs as I get them ready ๐
@saramarcondes that's awesome news, thanks for working on that ๐ !
Would you mind helping with reviewing and landing #40271, #40272, #40273, and #40274 first though? These remove one of the other media stores (the selected media items store) and have been pending for a review for a while ๐
Thanks a bunch! ๐
@tyxla Yup! I'm seeing some overlaps in the list-store work anyway. I'll switch back to focusing on the existing PRs.
Ace, thanks so much for picking those up โค๏ธ
closing this as we fully reduxified the media flux store