MetaCell / MetaCell/geppetto-meta

Ensure synched state between redux widgets state with flexLayout widget state

Open
#108 8 comments 0 reactions 1 assignee Claimed by @enicolasgomez View on GitHub
geppetto-client geppetto.js
Dominant language
JavaScript
Stars
6
Forks
4
PR merge metrics
No merged PRs in 30d

Description

1. Invalid states due to middleware and reducer, if middleware stops action but reducer carries on we get invalid widget states, need better error handling & clear understanding of what is allowed and what not

2. Redux widgets state is not in synch with layout state, user actions on the layout is not consistently propagated to widget state, e.g. rename or maximize.

Maximizing a widget by double clicking on the tab doesn't change the redux widget state to MAXIMIZED.

We would have to hook into the maximize action of flexLayout and dispatch a redux action that changes the widget state.

**Two cases:**
- a user can trigger a redux action that will then trigger a layout action programmatically
- a user can trigger a layout action by interacting with the layout itself (click on close icon)

**We have the following two action patterns:**

- REDUX_ACTION > FlexLayout-Action -> REDUX_ACTION (Programmatically or clicking on layout-external buttons)
- FlexLayout-Action -> REDUX_ACTION (By clicking on native layout icons)

FlexLayout-Action are actions triggered by FlexLayout itself. We hook into these actions with the `onAction` callback.

I think we better avoid to dispatch the event in 2 that we use in 1 to trigger the FlexLayout action.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.