[COMPASS-582] Convert collection store into a proper reflux store with associated actions Created: 20/Dec/16 Updated: 27/Oct/23 Resolved: 13/Oct/20 |
|
| Status: | Closed |
| Project: | Compass |
| Component/s: | Tech debt |
| Affects Version/s: | None |
| Fix Version/s: | No version |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Satyendra Sinha | Assignee: | Unassigned |
| Resolution: | Gone away | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Documentation Changes: | Not Needed | ||||||||
| Description |
|
The standard reflux pattern is the unidirectional cycle from component to action to store to component. Currently the collection store (internal-packages/app/stores/collection.js) is not using this reflux pattern properly. Primary reason to do this ticket are two folds:
There are two issues here:
Here are where the calls are being made:
After this we can either get rid of the collection store or convert it to a proper store that lives in /internal-packages/collections/lib/store |
| Comments |
| Comment by Satyendra Sinha [ 09/Jul/17 ] |
|
PR attempted to resolve this ticket but it was solving several problems at once and made it difficult to review. So let's split it into separate tickets:
After the above 3 are done explicitly add collection store to the collection package and connect to the component. as done in this and this commit. You may notice that the above PR funnels the instance store into the home store. This made sense at the time because then the sidebar, collection and collections store all listen to changes in the home store. The changes in the ticket mentioned above can also be done without making these 3 store listen to the home store and listening to the instance store directly but the way it is setup maybe less clean. |