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

ModalDialogue for editing flex context #1267

Open
nhoening opened this issue Nov 29, 2024 · 1 comment · May be fixed by #1320
Open

ModalDialogue for editing flex context #1267

nhoening opened this issue Nov 29, 2024 · 1 comment · May be fixed by #1320
Assignees
Labels
Milestone

Comments

@nhoening
Copy link
Contributor

The UI for the JSON field in #1266. It is based on the design of Editing Graphs in #1212.

Basically, here we represent each field in the schema in a modal dialogue. Each field can be undefined (null - and thus be sent in the API).

Most fields are of type VariableQuantityField, which can be a value or a sensor ID in our case. So representing that option is the novel innovation in this PR.

Here is the description of the UI:

  • Each field in flex context gets its own card
  • Each card needs its own info icon to explain the field
  • the card for inflexible devices is the one most similar to editing graph cards, so start with that - it gets a few sensors set.
  • All 5 fields aside from inflexible_device_sensors can be in one of three states (which we should model with a toggle button - I like the second version): "Not set", "Fixed value", "Dynamic value".
  • Fixed value means a text field is shown for entering the fixed value (needs to be a number), plus a unit dropdown selector (with allowed units for that field).
  • Dynamic value means we can select one sensor on the right. (so if we select another, it replaces the previously selected one)
  • Each card has a set of valid units and if the user selects a sensor with the wrong unit they see a warning.
  • On the right we need a sensor search (much like for sensors_to_show)
  • inflexible device sensors is a special case: It requires a list of sensors. Actually, here much of the sensors_to_show logic can be applied directly.
@nhoening
Copy link
Contributor Author

Let me know if I should create a visual mock-up

@nhoening nhoening changed the title ModalDialgoue for editing flex context ModalDialogue for editing flex context Dec 2, 2024
@joshuaunity joshuaunity linked a pull request Feb 7, 2025 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants