Skip to content

Conversation

henryksloan
Copy link
Contributor

@henryksloan henryksloan commented Jul 20, 2021

Closes #184

  • Added new ToolOptions widget that renders tool settings widgets
    • It holds and renders a TS map of each tool's settings
  • Added basic callback capability to the NumberInput item within the options
  • Added WASM bindings and messages to set all settings for a given tool

#284 documents the remaining work towards this feature. The tool option widgets will have to be connected to the backend through a standard messaging system, mapping each widget to a struct field or message (in the case of buttons).


This change is Reviewable

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jul 20, 2021

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: d328dc8
Status: ✅  Deploy successful!
Preview URL: https://320d2a58.graphite-master.pages.dev

View logs

@henryksloan henryksloan requested a review from TrueDoctor July 20, 2021 21:10
@TrueDoctor
Copy link
Member

I can't really comment on the js but the rust looks fine so far.

@henryksloan henryksloan requested a review from Keavon July 20, 2021 22:34
@henryksloan henryksloan mentioned this pull request Jul 20, 2021
@henryksloan henryksloan marked this pull request as ready for review July 21, 2021 02:39
@henryksloan henryksloan requested a review from TrueDoctor July 21, 2021 02:39
@henryksloan henryksloan merged commit 06c26f4 into master Jul 21, 2021
@henryksloan henryksloan deleted the tool-settings branch July 21, 2021 05:07
Keavon pushed a commit that referenced this pull request Jun 16, 2022
* Add JSON-backed options widget

* Add initial tool settings messaging to backend

* Add shape side selection with JSON deserialization

* Enforce minimum number of n-gon sides

* Make tool settings JSON errors safer

* Make tool settings JSON errors safer

* Refactor ToolOptions to ToolSettings

* Revert "Refactor ToolOptions to ToolSettings"

This reverts commit 651161f.

* Refactor all instances of "settings" to "options"

* Fix names and formatting

* Rearrange ToolOptions data to enforce types
Keavon pushed a commit that referenced this pull request Jul 30, 2023
* Add JSON-backed options widget

* Add initial tool settings messaging to backend

* Add shape side selection with JSON deserialization

* Enforce minimum number of n-gon sides

* Make tool settings JSON errors safer

* Make tool settings JSON errors safer

* Refactor ToolOptions to ToolSettings

* Revert "Refactor ToolOptions to ToolSettings"

This reverts commit 651161f.

* Refactor all instances of "settings" to "options"

* Fix names and formatting

* Rearrange ToolOptions data to enforce types
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add options bar widgets for tools to control tool behavior
3 participants