Skip to content

Add a unified messaging system for tool options #284

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

Closed
henryksloan opened this issue Jul 21, 2021 · 0 comments · Fixed by #361 or #499
Closed

Add a unified messaging system for tool options #284

henryksloan opened this issue Jul 21, 2021 · 0 comments · Fixed by #361 or #499
Assignees
Labels
Web Involves web programming (TypeScript, Svelte, CSS)
Milestone

Comments

@henryksloan
Copy link
Contributor

#283 completed all of #184 except for:

A unified approach to routing options changes to the backend, and the state of those options back to the frontend

Each tool should probably have an associated options struct on the frontend. Each tool option widget should probably have an onChange or analogous callback that updates the struct and then sends it to the backend. Updates to a tool's options within the backend should probably send a Response to the frontend, allowing it to update the tool's options struct. Persisting the option widgets should probably occur at this response handling step (see zoom and rotate).

The main question is how to associate each widget with a field in the struct. The easiest thing would probably be to somehow identify the field within the option object (e.g. NumberOption { ... option: "shape_type.Polygon.new_value" }), or possibly a choice between this approach and a custom callback.

Buttons should most likely be implemented by associating a string with the button, that will be translated to a variant of a new struct like OptionButtonMessage. It would be nice to have a button messages enum for each tool.

@henryksloan henryksloan added Feature Web Involves web programming (TypeScript, Svelte, CSS) labels Jul 21, 2021
@henryksloan henryksloan added this to the Sprint 6 (current) milestone Jul 21, 2021
@henryksloan henryksloan self-assigned this Jul 21, 2021
@Keavon Keavon changed the title Add a unified messaging system for tool option Add a unified messaging system for tool options Aug 12, 2021
@Keavon Keavon added P-Medium and removed P-High labels Aug 12, 2021
@Keavon Keavon linked a pull request Sep 7, 2021 that will close this issue
@0HyperCube 0HyperCube moved this to Completed This Sprint in Task Board Mar 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Web Involves web programming (TypeScript, Svelte, CSS)
Projects
Archived in project
3 participants