You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Imagine we have pydase app which controls a airplane cockpit. If we turn on a routine called 'auto-pilot', it would be great that we can set all properties related to manual steering of the airplane to be read-only. Once 'autopilot' is disengaged, those properties should be writable again
Describe the solution you'd like
Allow the user to temporarily set certain object to be read-only (i.e. grey-out the corresponding box).
Describe alternatives you've considered
Hope that the user is clever enough not to change parameters that he is not supposed to change.
The text was updated successfully, but these errors were encountered:
This decorator could be used across all nested class instances, as well.
Implementation
The decorator needs to be put on the setter function. This makes sure that only the read-only state of properties that can be set can be toggled. The decorator would add a protected attribute to the property specifying the event (either triggering the event or being triggered by the event). The core-logic of triggering the read-only state would happen in the observer (DataServiceObserver). This would involve
a function that collects the metadata from the properties (will be called when initialising the observer -> this will be static then)
a callback that sends notifications as soon as the event was triggered. The notifications will take the cached state of the (toggled) properties and send it with a toggled read-only value.
Alternatives
One could also imagine to handle the read-only functionality directly in the browser. The main reasons for not doing this are:
Client-Side Inconsistency and Decentralized Control: Managing the read-only state in the browser creates inconsistencies across different clients, such as Python scripts or other web clients, since these states are not synchronized with the backend (no single source of truth, no separation of concerns)
Potential Security Concerns: Client-side controls are generally more vulnerable to manipulation. Users might be able to bypass the "read-only" restrictions, which could lead to unauthorized actions if not properly handled by the server.
Is your feature request related to a problem? Please describe.
Imagine we have pydase app which controls a airplane cockpit. If we turn on a routine called 'auto-pilot', it would be great that we can set all properties related to manual steering of the airplane to be read-only. Once 'autopilot' is disengaged, those properties should be writable again
Describe the solution you'd like
Allow the user to temporarily set certain object to be read-only (i.e. grey-out the corresponding box).
Describe alternatives you've considered
Hope that the user is clever enough not to change parameters that he is not supposed to change.
The text was updated successfully, but these errors were encountered: