Skip to content

Commit

Permalink
Fix migration guides issues (#1880)
Browse files Browse the repository at this point in the history
  • Loading branch information
doup authored Nov 29, 2024
1 parent b0085a7 commit 3ecd95e
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,4 @@ fn deserialize(&mut self, r: &TypeRegistration, d: &mut dyn erased_serde::Deseri
```

A similar processor system should also be added to the serialization side, but that’s for another PR. Ideally, both PRs will be in the same release, since one isn’t very useful without the other.
</details>
6 changes: 3 additions & 3 deletions release-content/0.15/migration-guides/15591_Text_rework.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ There are several major changes to consider:
- each text section is now stored as a distinct entity within the standard hierarchy, rather than as a `Vec<TextSection>` on the `Text` component. Children of `Text`/`Text2d` entities with `TextSpan` components will act as additional text sections.
- like other aspects of Bevy's API, required components have replaced bundles

## `TextBundle` and text styling
#### `TextBundle` and text styling

`TextBundle` has been removed.
Add the `Text` component to set the string displayed.
Expand All @@ -18,7 +18,7 @@ Like elsewhere in Bevy, there is no style inheritance. Consider [writing your ow

To control the layout of a `Text` section, modify the properties of its `Node`.

## Accessing text spans by index
#### Accessing text spans by index

Previously, text sections were elements of a vector stored within `Text`.
Now, they are stored as distinct entities under the same `Parent`.
Expand Down Expand Up @@ -48,7 +48,7 @@ fn refresh_text(

2D equivalents (`Text2dReader` and `Text2dWriter`) also exist.

## Internal layout information
#### Internal layout information

`TextBundle` additional fields have been moved into the `TextNodeFlags` component,
while `Text2dBundle`'s additional fields turned into the `TextBounds` and `Anchor` components.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Simultaneously, the fields and behavior of `Style` have been moved to `Node`, an

It will be easiest to migrate if you replace `Node` with `ComputedNode` first, then `Style` with `Node`, and finally `NodeBundle` with `Node`.

## `Node` -> `ComputedNode`
#### `Node` -> `ComputedNode`

For any usage of the “computed node properties” that used to live on `Node`, use `ComputedNode` instead.
This is a trivial find-and-replace rename.
Expand All @@ -30,7 +30,7 @@ fn system(computed_nodes: Query<&ComputedNode>) {
}
```

## `Style` -> `Node`
#### `Style` -> `Node`

All of the values of `Style` now live on `Node`. This is a find-and-replace rename.

Expand All @@ -52,7 +52,7 @@ Node {
}
```

## `NodeBundle` -> `Node`
#### `NodeBundle` -> `Node`

Finally, replace all uses of `NodeBundle` with `Node`.
All other components in `NodeBundle` are now added implicitly via required components.
Expand Down
36 changes: 18 additions & 18 deletions release-content/0.15/migration-guides/_guides.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ prs = [14091]
areas = ["Accessibility", "UI"]
file_name = "14091_Bump_accesskit_to_016.md"

[[guides]]
title = "Remove `accesskit` re-export from `bevy_a11y`"
prs = [16257]
areas = ["Accessibility"]
file_name = "16257_Remove_accesskit_reexport_from_bevy_a11y.md"

[[guides]]
title = "Deprecate `is_playing_animation`"
prs = [14387]
Expand Down Expand Up @@ -136,6 +142,18 @@ prs = [15509]
areas = ["Assets"]
file_name = "15509_bevy_asset_Improve_NestedLoader_API.md"

[[guides]]
title = "Deprecate `LoadAndSave` Asset Processor"
prs = [15090]
areas = ["Assets"]
file_name = "15090_Deprecate_LoadAndSave_Asset_Processor.md"

[[guides]]
title = "`AssetReader::read` now returns an opaque type"
prs = [14082]
areas = ["Assets"]
file_name = "14082_AssetReader_read_now_returns_an_opaque_type.md"

[[guides]]
title = "Make gLTF node children Handle instead of objects"
prs = [13707]
Expand Down Expand Up @@ -1269,21 +1287,3 @@ title = "Add Display implementation to DebugName."
prs = [13760]
areas = []
file_name = "13760_Add_Display_implementation_to_DebugName.md"

[[guides]]
title = "Remove `accesskit` re-export from `bevy_a11y`"
prs = [16257]
areas = ["Accessibility"]
file_name = "16257_Remove_accesskit_reexport_from_bevy_a11y.md"

[[guides]]
title = "Deprecate `LoadAndSave` Asset Processor"
prs = [15090]
areas = ["Asset"]
file_name = "15090_Deprecate_LoadAndSave_Asset_Processor.md"

[[guides]]
title = "`AssetReader::read` now returns an opaque type"
prs = [14082]
areas = ["Asset"]
file_name = "14082_AssetReader_read_now_returns_an_opaque_type.md"
7 changes: 6 additions & 1 deletion sass/pages/_content.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@ $content-font-size: 1.22rem;
}

h4 {
margin-bottom: 1rem;
font-size: 1.3rem;
margin-bottom: 1.5rem;

code {
font-size: inherit;
}
}

pre {
Expand Down

0 comments on commit 3ecd95e

Please sign in to comment.