Skip to content

Commit

Permalink
Put type into the body of the field docs
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk committed Nov 4, 2024
1 parent 5a6dcaa commit 7fe8240
Show file tree
Hide file tree
Showing 16 changed files with 139 additions and 47 deletions.
6 changes: 4 additions & 2 deletions crates/build/re_types_builder/src/codegen/docs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -488,9 +488,10 @@ fn write_fields(objects: &Objects, o: &mut String, object: &Object) {
if let Some(enum_value) = field.enum_value {
field_string.push_str(&format!(" = {enum_value}"));
}
field_string.push('\n');

if !object.is_enum() {
field_string.push_str(": ");
field_string.push_str("Type: ");
if field.typ == Type::Unit {
field_string.push_str("`null`");
} else {
Expand All @@ -499,9 +500,10 @@ fn write_fields(objects: &Objects, o: &mut String, object: &Object) {
}
field_string.push_str(&type_info(objects, &field.typ));
}
field_string.push('\n');
field_string.push('\n');
}

field_string.push('\n');
for line in field.docs.lines_for(objects, Target::WebDocsMarkdown) {
field_string.push_str(&line);
field_string.push('\n');
Expand Down
12 changes: 9 additions & 3 deletions docs/content/reference/types/datatypes/annotation_info.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 9 additions & 3 deletions docs/content/reference/types/datatypes/class_description.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 15 additions & 5 deletions docs/content/reference/types/datatypes/image_format.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions docs/content/reference/types/datatypes/keypoint_pair.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions docs/content/reference/types/datatypes/range2d.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions docs/content/reference/types/datatypes/rotation_axis_angle.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 33 additions & 11 deletions docs/content/reference/types/datatypes/tensor_buffer.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions docs/content/reference/types/datatypes/tensor_data.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions docs/content/reference/types/datatypes/tensor_dimension.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions docs/content/reference/types/datatypes/time_range.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 9 additions & 3 deletions docs/content/reference/types/datatypes/time_range_boundary.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions docs/content/reference/types/datatypes/visible_time_range.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7fe8240

Please sign in to comment.