You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: rfcs/77-dev-tools-abstraction.md
+15-3Lines changed: 15 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -602,6 +602,16 @@ There are three arguments against this:
602
602
2. We can get good enough results to print via `Reflect` and `Debug`.
603
603
3. Toolkits will typically rely on their own custom UI for formatting this information, and need more structured data than a simple string.
604
604
605
+
### Why not add information about layout to our traits?
606
+
607
+
This sort of information is really helpful for toolboxes like editors to ensure that dev tools don't overlap each other: allowing them to be laid out beside each other or enabled one at a time when necessary.
608
+
609
+
However:
610
+
611
+
1. This RFC is complex enough: keeping its scope small will make it easier to review and implement.
612
+
2. Unlike with a CLI-style interface the correct abstractions aren't immediately obvious: we should prototype more toolkits and tools to explore the needs of the space further.
613
+
3. Not all dev tools need layout information: we would need to use optional methods and/or subtraits to fill this need, adding further complexity.
614
+
605
615
## Unresolved questions
606
616
607
617
1. Are the provided methods (along with those on `Reflect`) sufficient to allow toolkits to populate and run a wide range of dev tools without requiring an additional trait and manual registration?
@@ -626,9 +636,11 @@ Related but out-of-scope questions:
626
636
627
637
Future possibilities:
628
638
629
-
1. Over time, we can extend the `ModalDevTool` and `DevCommand` traits with optional methods, enabling:
639
+
1. Over time, we can extend the `ModalDevTool` and `DevCommand` traits with more methods (mandatory and optional), enabling:
630
640
1. Gradual unification of more complex shared configuration (e.g. a `set_font` method).
631
-
2. Opt-in metadata about the type of tool they are (e.g. an overlay, a camera controller, a 2D vs. 3D tool), allowing toolkits to seamlessly organize the options.
632
-
3. Parsing from a `.bsn` file.
641
+
2. Serializing and deserializing structs from a `.bsn` file, rather than simple CLI-style strings, allowing toolboxes to build abstractions for persistent config.
633
642
2. Add support for a trait-queries-on-resources operation, and stop storing modal dev tools in the `DevToolsRegistry`.
634
643
3. A derive macro for `DevCommand`, that aligns with `clap`'s calling conventions.
644
+
4. Add specialized types of dev tools, likely each with their own trait to establish conventions and resolve conflicts between them.
645
+
1. For example, we may want to coordinate between various UI elements or overlays to avoid positioning conflicts, dev tools that change the materials of objects, or camera controllers.
646
+
2. This could be queried via Opt-in metadata about the type of tool they are (e.g. an overlay, a camera controller, a 2D vs. 3D tool), allowing toolkits to seamlessly organize the options.
0 commit comments