FlowFuse / node-red-dashboard

https://dashboard.flowfuse.com
Apache License 2.0
163 stars 35 forks source link

Feature to disable and make page invisible or vice versa does not work properly #866

Open diegodamacenosantos opened 1 month ago

diegodamacenosantos commented 1 month ago

Current Behavior

When sending a payload to "ui-control" to disable a page or make it invisible when accessing the same page using the page link, the resource is completely inoperative

Expected Behavior

When the payload is sent to "ui-control", disabling or making the page invisible, it must become inaccessible via the sidebar and any other method, including accessing the page via direct link. Access via direct link also cannot change the page's invisible or disabled status.

Steps To Reproduce

Using a normal inject connected to a function node with the desired usage information, it must be connected to a ui-control node to run the tests. Below is the suggested content of the function.

node.send({ payload: { pages: { enable: ['Casa'] } } });

Environment

Have you provided an initial effort estimate for this issue?

I have provided an initial effort estimate

Steve-Mcl commented 1 month ago

for reference (incl. demo flow and detailed info), related thread here: https://discourse.nodered.org/t/how-to-enable-and-disable-pages-in-dashboard-2-0/87952/18?u=steve-mcl

joepavitt commented 1 month ago

Adding some extra detail from the forum - this is more of a Feature Request, than bug. It does work as designed currently, but the request is that a disabled/hidden page in the navigation shouldn't be navigable to, at all...

The challenge here is that there are perfectly valid reasons to hide/disable a link in the left navigation, and still want to be able to navigate to a page directly. So, we need to consider the state options here and their respective meanings to ensure coverage of all use cases.