Skip to content
This repository has been archived by the owner on Jul 16, 2022. It is now read-only.

Define base classes for config dialogs #331

Open
atooni opened this issue Nov 4, 2021 · 1 comment
Open

Define base classes for config dialogs #331

atooni opened this issue Nov 4, 2021 · 1 comment
Labels
enhancement New feature or request ScalaJS Client Work to be done on the ScalaJS client zio2
Milestone

Comments

@atooni
Copy link
Member

atooni commented Nov 4, 2021

Picking this up from the ZMX channel.

While we are prototyping the first config dialogues, we should spend some time to create a proper datastructure / handler for config dialogues in general.

We have now introduced Commands to model the manipulation of the applications state, for example we have the AddDiagramor theUpdateDiagram` command, both of which modify the diagrams within the application state. We have already changed the application, so that the displayed diagrams are taken from the config and the configurable elements within a single diagram view are populated from the config as well.

Now we would like a Configure... button within the diagram view, which

  • would pop up a dialogue displaying the current values of all configurable elements for that view
  • let´s the user edit the values
  • if the user submits the changes creates an UpdateConfig command and passes it to the application´s command handler
  • The command handler updates the application state and the laminar magic will update the UI for us

More generally, whenever we display a configurable view, we want a Configure... button. The config should be modelled as a case class [T], so the dialogue could be viewed as a function T => T On top of that, a modification should generate one or more commands, so we could model that with T => Chunk[Command]

In other words, if we define a ModalDialogue[T] we can implement the logic how the dialogue is overlayed over the UI, the dataflow and just leave open the concrete implementation of the form and the mapping to the commands.

That would give us the same user experience for all dialogues and a single place to change the behavior of the dialogues in general.

@atooni atooni added enhancement New feature or request ScalaJS Client Work to be done on the ScalaJS client zio2 labels Nov 4, 2021
@atooni atooni added this to the Zio2-M1 milestone Nov 9, 2021
@atooni
Copy link
Member Author

atooni commented Nov 24, 2021

Groundwork is done in #347, needs some more polishing

@atooni atooni modified the milestones: Zio2-M1, Zio2-M2 Dec 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request ScalaJS Client Work to be done on the ScalaJS client zio2
Projects
None yet
Development

No branches or pull requests

1 participant