Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement serialize and deserialize for some UI types #10044

Merged

Conversation

pablo-lua
Copy link
Contributor

Objective

  • Add serde Deserialize and Serialize for structs that doesn't implement it, even if they could benefit from it

Solution

  • Derive these traits for the structs Style, BackgroundColor, BorderColor and Outline.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 8, 2023

Welcome, new contributor!

Please make sure you've read our contributing guide and we look forward to reviewing your pull request shortly ✨

@alice-i-cecile alice-i-cecile added A-UI Graphical user interfaces, styles, layouts, and widgets C-Usability A simple quality-of-life change that makes Bevy easier to use labels Oct 9, 2023
@alice-i-cecile
Copy link
Member

A bit annoying that serde isn't feature-flagged in bevy_ui, but that can wait for a different PR.

@alice-i-cecile alice-i-cecile changed the title Deserialize and serialize implements Implement serialize and deserialize for some UI types Oct 9, 2023
Copy link

@nerdachse nerdachse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very simple changes, can make our lives easier going forward, so I approve!

@alice-i-cecile alice-i-cecile added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Oct 10, 2023
Copy link
Contributor

@ickshonpe ickshonpe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine, no reason not to do this.

@alice-i-cecile alice-i-cecile added this pull request to the merge queue Oct 10, 2023
Merged via the queue into bevyengine:main with commit ca873e7 Oct 10, 2023
24 checks passed
regnarock pushed a commit to regnarock/bevy that referenced this pull request Oct 13, 2023
# Objective

- Add serde Deserialize and Serialize for structs that doesn't implement
it, even if they could benefit from it

## Solution

- Derive these traits for the structs Style, BackgroundColor,
BorderColor and Outline.

---
ameknite pushed a commit to ameknite/bevy that referenced this pull request Nov 6, 2023
# Objective

- Add serde Deserialize and Serialize for structs that doesn't implement
it, even if they could benefit from it

## Solution

- Derive these traits for the structs Style, BackgroundColor,
BorderColor and Outline.

---
@pablo-lua pablo-lua deleted the deserialize_and_serialize_implements branch December 2, 2023 15:36
rdrpenguin04 pushed a commit to rdrpenguin04/bevy that referenced this pull request Jan 9, 2024
# Objective

- Add serde Deserialize and Serialize for structs that doesn't implement
it, even if they could benefit from it

## Solution

- Derive these traits for the structs Style, BackgroundColor,
BorderColor and Outline.

---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-UI Graphical user interfaces, styles, layouts, and widgets C-Usability A simple quality-of-life change that makes Bevy easier to use S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants