Wp-calypso: Reduxify: Media

Created on 11 Feb 2020  ยท  10Comments  ยท  Source: Automattic/wp-calypso

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:

  • [x] library-selected-store - @tyxla, #40269
  • [ ] list-store
  • [ ] store
  • [x] validation-store - @tyxla, #39372
Media [Size] L [Type] Task

All 10 comments

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

  • #40271
  • #40272
  • #40273
  • #40274

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

Was this page helpful?
0 / 5 - 0 ratings