Auto-generate enum type widget boilerplate for radio buttons and dropdown menus (#2589)

* First draft of factoring out the dropdown boilerplate

* Add proc macro for enum boilerplate

* Detect whether to say `crate` or the name

* Clean up the input and naming of the enum macro

* Rename a file

* Do the rename of code too

* Use the attribute-driven selection of radio vs dropdown

* Add a metadata struct and tooltips

* Move the new traits to a better place.

* Use ChoiceType, part 1

* Use ChoiceType, part 2

* Introduce a builder API for choice widgets

* Start using the new new API

* DomainWarpType should be a dropdown still

* Handle the case where a node property can never have a socket

* Rustfmt

* Code review

* Update stable node IDs in test

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
kythyria
2025-05-01 04:14:26 -07:00
committed by GitHub
co-authored by Keavon Chambers
parent 9303953cf8
commit 9ef9b205d9
18 changed files with 713 additions and 990 deletions
+6 -6
View File
@@ -938,12 +938,12 @@ mod test {
assert_eq!(
ids,
vec![
NodeId(8409339180888025381),
NodeId(210279231591542793),
NodeId(11043024792989571946),
NodeId(16261870568621497283),
NodeId(6520148642810552409),
NodeId(8779776256867305756)
NodeId(16997244687192517417),
NodeId(12226224850522777131),
NodeId(9162113827627229771),
NodeId(12793582657066318419),
NodeId(16945623684036608820),
NodeId(2640415155091892458)
]
);
}