aglinxinyuan opened a new issue, #3895: URL: https://github.com/apache/texera/issues/3895
The current implementation of the grid toggle feature in the workflow editor is unnecessarily complex. **Current Behavior:** 1. When the user clicks the Toggle Grids button in the HTML, it triggers the onClickToggleGrids function. 2. Inside onClickToggleGrids, the toggleGrids function is called. 3. The toggleGrids function then triggers jointPaperGridsToggleStream to move to the next state. 4. In another component, there is a handleGridsToggle function that registers a callback subscribed to the jointPaperGridsToggleStream. 5. When the stream emits its next state, the grid visibility is toggled. This multi-step chain makes the logic harder to follow and maintain, without providing significant benefits. **Problem:** The toggle flow is overly indirect. Using a reactive stream (jointPaperGridsToggleStream) for this simple toggle introduces unnecessary coupling between components. **Proposed Simplification:** Simplify the logic by having onClickToggleGrids directly toggle the grid state. This removes redundant function calls and stream subscriptions, making the behavior more straightforward to maintain. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
