Skip to content

Atomic updates for multiple GUI properties#170

Merged
brentyi merged 8 commits intomainfrom
brent/multiprop_gui_updates
Feb 8, 2024
Merged

Atomic updates for multiple GUI properties#170
brentyi merged 8 commits intomainfrom
brent/multiprop_gui_updates

Conversation

@brentyi
Copy link
Collaborator

@brentyi brentyi commented Feb 8, 2024

Primary change:

-    prop_name: str
-    prop_value: Any
+    updates: Dict[str, Any]
+    """Mapping from property name to new value."""

Helps avoid some hypothetical errors mentioned in #166.

@brentyi brentyi requested a review from jkulhanek February 8, 2024 00:05
@jkulhanek
Copy link
Contributor

Looks good to me! We could also consider making the types stronger on the client’s side.

@brentyi
Copy link
Collaborator Author

brentyi commented Feb 8, 2024

Ok, I switched it to Partial<GuiAddComponentMessage>. It's not as nice as what you had before, but seems reasonable given the complexity tradeoff of anything stronger.

@brentyi brentyi merged commit ec23be7 into main Feb 8, 2024
@brentyi brentyi deleted the brent/multiprop_gui_updates branch February 8, 2024 08:57
@jkulhanek
Copy link
Contributor

Thanks!

yzslab pushed a commit to yzslab/viser that referenced this pull request Oct 20, 2024
* Multi-property GUI updates

* ruff

* Fix value casting

* Remove now-unused interface gen code

* Stronger client-side type for GuiUpdateMessage

* Docstring
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.

2 participants