Closed CopyDemon closed 6 months ago
@dangunter ready for testing
Working from your fork/main, I see the fix, but I have a request because the current behavior is not intuitive. When I click on full-screen, what it's really doing afaict is minimizing the "stream table" into a button up at the top. I can undo it by clicking on that button again. But, it should really be possible to also undo it by clicking on the "full screen" button again. In other words, the normal behavior of such buttons is to act as a toggle between the two modes.
Working from your fork/main, I see the fix, but I have a request because the current behavior is not intuitive. When I click on full-screen, what it's really doing afaict is minimizing the "stream table" into a button up at the top. I can undo it by clicking on that button again. But, it should really be possible to also undo it by clicking on the "full screen" button again. In other words, the normal behavior of such buttons is to act as a toggle between the two modes.
@dangunter I understand your request and think it's a good idea. May I create a new pull request to address that issue?
@CopyDemon I think you should fix it here, since it's the same button. Also I noticed another bug. If you click the "maximize" button, then click the zoom out (minus), the diagram disappears, and zooming back in (plus) does nothing.
If it makes more sense to do this in the newer UI because it has the different layout engine, I guess I understand. But the more I use it, the more I think we don't want a "maximize" button at all, just a consistent "minimize" and "restore" functionality for any of the panels. The usual way to do this in an IDE like PyCharm, VS Code, or Jupyter Lab is to add a minimize button on the panel and add icons for each possible panel in a gutter on the left, so if you click on that icon it restores a minimized panel. However the current style of putting them as buttons along a top "gutter" would also work, with the advantage that full names don't require memory of icon meanings.
@dangunter I removed the maximize button from the Flowsheet component header and added a minimize button to the stream table header. Now, both the Flowsheet and stream table only have minimize buttons.
Please help me review the new changes.
@dangunter Fixed the issue where repeatedly minimizing the panel caused the zoom in and zoom out values to become excessively large. The root of this problem was that minimizing the panel triggered a React state change and re-rendered the DOM. Each DOM re-render initiated a new Toolbar class instance, which then assigned duplicate event listeners to the zoom in and zoom out buttons.
Fixes Fixed the malfunction of the Zoom button when the fv display is in full-screen mode.
Proposed changes:
How to test:
Build environment and start UI
pip install .
pip install -r requirements-dev.txt
m.fs.visualize("flowsheet_name")
Test UI
Those previous steps should bring flowsheet visualizer up in a browser window.
Legal Acknowledgement
By contributing to this software project, I agree to the following terms and conditions for my contribution: