MetaCell / NetPyNE-UI

NetPyNE User interface
23 stars 7 forks source link

Widget Order #819

Closed enicolasgomez closed 6 months ago

enicolasgomez commented 6 months ago

Description

As described in https://metacell.atlassian.net/browse/NETPYNE-208 the left bar icons order is affected after running simulations and creating plots.

Problem

The middleware switchLayoutAction function interceeds with the reducer, this is an anti pattern and bad design as widgets shouldn't be controlled in the middleware while actions are fired in parallel from the reducer where the redux state is affected, producing the ordering side effect.

There seems to be an other issue with the LayoutManager itself as the widget positions came back altered, probably because of the previously mentioned side effect, there are positions with the same index.

Solution

in Drawer.js the sort call getMenu has been commented out. This is just a paleative as the inner problem remains and could have side effects. Fixing the real issue could take several hours and involve de App, Geppetto and the Layout Manager so this is as far as we can go given that release date dued.

ddelpiano commented 6 months ago

@enicolasgomez the selection of the widget open does not work as expected, when using the fix proposed the selection sometimes stays behind (selection is the square around the icon meaning that this is the widget open).

These are from the fix proposed

Screenshot 2024-02-29 at 11 45 09 Screenshot 2024-02-29 at 11 45 18 Screenshot 2024-02-29 at 11 45 23

Instead using the previous logic and geppetto-meta 1.2.0 this works fine.