Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not add new group in Tab and Notebook layout pages #1544

Open
MaWa53 opened this issue Dec 19, 2024 · 6 comments
Open

Can not add new group in Tab and Notebook layout pages #1544

MaWa53 opened this issue Dec 19, 2024 · 6 comments
Labels
bug Something isn't working needs-triage Needs looking at to decide what to do

Comments

@MaWa53
Copy link

MaWa53 commented Dec 19, 2024

Current Behavior

Added page to layout using Grid Layout.
Then added three groups and filled them.
Decided to use Tabs Layout and changed the page.
As expected new tapped layout is displayed.
Wanted to add another group to that page, but the + Add Group button in that page Line is not shown.
Changed page back to Grid Layout. Button appears and new group can be added.
Assigned a button to the new group.
Changed page to Tabs layout.
New Tab with the ne button is displayed.
The same behaviour happens when you use Notebook layout.

Expected Behavior

Adding a group to a page should be possible in all 4 layout types.

Steps To Reproduce

See current behavior.

Environment

  • Dashboard version: 1.20.0
  • Node-RED version: 4.0.7
  • Node.js version: v20.18.0
  • npm version:
  • Platform/OS: raspberry Pi Bookworm
  • Browser: Firefox

Have you provided an initial effort estimate for this issue?

I am not a FlowFuse team member

@MaWa53 MaWa53 added bug Something isn't working needs-triage Needs looking at to decide what to do labels Dec 19, 2024
@MaWa53
Copy link
Author

MaWa53 commented Dec 20, 2024

Bad news: playing around with the layout styles of two pages like I described in my last post resulted in the loss of ALL groups in those pages.

Only a revert from my repository brought back the original linkages and costed me an afternoons work. :-(

@bartbutenaers
Copy link
Contributor

@MaWa53,

That sounds like a very nasty bug. I am not familiar with that part of the codebase, so perhaps my feedback below is nononses...

There was a bug introduced in Node-RED version 4.0.6 and solved in 4.0.8. That bug also had impact on the dashboard unfortunately (e.g. here). Since you are using 4.0.7 I was wondering if that could perhaps be the root cause. Perhaps not...

Do you have the opportunity somehow to install the latest 4.0.8 and try it again on some dummy pages, to make sure your work doesn't get lost again. Then at least we know if that was the problem.

If that still not solves it, I will try to reproduce it and have a look at the code somewhere this week...
Bart

@MaWa53
Copy link
Author

MaWa53 commented Dec 21, 2024

@bartbutenaers
Thank you for offering to help. But I decided to revert my current development back to dashboard 1.0.

So Bart, please use your time for your contributions and let those resposible for the dashboard->page->group->node linkage problems dive into a deep code review and testing.

I have now lost trust in the current status of Dashboard 2.0.
Not only the problem in the current issue but also the absolute step backwards in the way the new layout editor works, if one can even speak of such a thing.
The 1.0 editor allowed adding, removing, rearranging group elements without losing the group layout. You can use the mouse to change the size and position of the elements and the groups in the editor WITHOUT having to insert, rearrange or delete IMHO unnecessary spacers. A single deploy running the editor in one window and the Dashboard in an other immediately showed the edit result.

I regret to say that the 2.0 approach is useless for developing an evolving or optimizing / refactored mask layout. If you remove just a single element in the upper area, the entire layout will be shifted by the wrapping mechanism.

I had to collect these negative experiences with a relatively simple project. A collection of buttons to send grbl commands to a marlin 3D printer controller board to calibrate aka home the axes and to jog with an XYZ jog pad.
This only used dashboard 2.0 elements plus TCP and serialport.
No ui-SVG, no ui-table, no ui-etable, which I use in three older projects. I will therefore for now not change these to 2.0, following the motto: never change a running system.
Thank you Bart and Joe for your commitment and don't let complainers like me discourage you.
Please try to first make a clean switch from Angular v1.0 to VueJs and do not mix this interface change with a refactoring of the API, the UI and the fuctionality.
It's just the experience from more than 30 years of programming and software project experience and running an IT company.

After all, Christmas is just a few days away and there are certainly more important things to do than fixing Node-RED errors.
Merry Christmas!

@bartbutenaers
Copy link
Contributor

@MaWa53,

Sorry to hear that the current dashboard D2 isn't sufficient for your needs.
But this kind of issues should really be solved, because data loss is the last thing users need...

If I understand correctly, Manfrad had 2 separate issues with D2, when switching between layouts on a page:

  1. The "Add group" icon in the sidebar disappears for that page. I can confirm that happens, and I will try to find the cause myself.

  2. All the groups were lost in his page. I did a quick test (hopefully in the same way as Manfred did but not sure), and I "think" I don't have that issue myself. However I am using Node-RED version 4.0.2 and the config node bug was introduced in 4.0.6 and solved in 4.0.8. If anybody could find some time to try to reproduce the issue to test whether it is caused/solved by that Node-RED bug, that would be nice so we don't need to deep dive into the dashboard code... Thanks!

@MaWa53
Copy link
Author

MaWa53 commented Dec 22, 2024

The second issue is a bit different and I cannot describe how it happened.
None of the groups were lost. The two existing groups just had no MEMBERS associated to them. The member count shown at the right of the group name in the layout tree showed 0 and no tree child nodes were under the group entries.

I must confess I was so frustrated that I did not spend more time into finding the cause.
Because the lost members were added that day they were not in my backup on my local Source repository NAS. Fearing to run into the same problem with DB2.0 I decided to revert to the last saved version, install DB1 and unistall DB2 after replacing the DB2 controls I used with their DB1 equivalents and copying the usable properties.

BTW the DB2 controls do look better than their DB1 predesessors.

But my main goal is to create a wireless browser based front end for my CNC mill, my laser cutter and a reflow soldering machine under contruction.
Node-Reds TCP and Serial nodes work like a charm running on a raspi Zero W. With a virtual serial ports emulator on my PC I can run the PC Application (e.g. LightBurn) as if It was connected via USB plus the ability to do the setup at the machine using a pad or even a smartphone.
Thank you for your kind support and merry xmas.

@bartbutenaers
Copy link
Contributor

@MaWa53 ,
Marry xmas for your too!!
Yes understandable that people get frustrated after data gets lost...

Hopefully somebody can check whether issue 2 was caused by the Node-RED bug, based on Manfred's feedback. Thanks!!

Issue 1 should be solved by this pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-triage Needs looking at to decide what to do
Projects
Status: Backlog
Development

No branches or pull requests

2 participants