Skip to content

Options bar widgets for tools to control tool behavior - #283

Merged
henryksloan merged 13 commits into
masterfrom
tool-settings
Jul 21, 2021
Merged

Options bar widgets for tools to control tool behavior#283
henryksloan merged 13 commits into
masterfrom
tool-settings

Conversation

@henryksloan

@henryksloanhenryksloan commented Jul 20, 2021

Copy link
Copy Markdown
Contributor

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

cloudflare-workers-and-pagesBot commented Jul 20, 2021

Copy link
Copy Markdown

Deploying with Cloudflare Pages Cloudflare Pages

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

View logs

Comment threadcore/editor/src/tool/tools/shape.rs Outdated
@TrueDoctor

Copy link
Copy Markdown
Member

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

@henryksloan
henryksloan requested a review from KeavonJuly 20, 2021 22:34
@henryksloanhenryksloan mentioned this pull request Jul 20, 2021
@henryksloan
henryksloan marked this pull request as ready for review July 21, 2021 02:39
Comment threadclient/web/src/components/widgets/options/ToolSettings.vue Outdated
Comment threadclient/web/src/components/widgets/options/ToolOptions.vue
Comment threadclient/web/src/components/widgets/options/ToolOptions.vue Outdated
Comment threadclient/web/src/components/widgets/options/ToolOptions.vue Outdated
Comment threadclient/web/src/components/widgets/options/ToolOptions.vue Outdated
Comment threadclient/web/src/components/widgets/options/ToolOptions.vue Outdated
Comment threadclient/web/src/components/widgets/options/ToolOptions.vue Outdated
Comment threadcore/editor/src/tool/tools/shape.rs Outdated
Comment threadclient/web/src/components/widgets/options/ToolOptions.vue Outdated
@henryksloan
henryksloan merged commit 06c26f4 into masterJul 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 freeto 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

@henryksloan@TrueDoctor@Keavon