Skip to content

Conversation

@Leinnan
Copy link
Contributor

@Leinnan Leinnan commented Aug 3, 2025

Adds support for updating the Safe area on Android as well.

@extrawurst
Copy link
Contributor

Thats awesome! Can you add at least a compile check for android into the CI aswell?

@extrawurst
Copy link
Contributor

@Leinnan Nice the CI passes. Thank you! I cannot test this due to a lack of android in my life. Give me a final confirmation that this is good to go and tested?

/// ```
#[derive(Resource, Clone, Debug, Default, Reflect)]
#[reflect(Resource)]
pub struct IosSafeAreaResource {

Choose a reason for hiding this comment

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

IosSafeAreaResource should be renamed SafeAreaResource then ; and crate renamed ?

Copy link
Contributor

Choose a reason for hiding this comment

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

@ThierryBerger I dont think crates.io allows a rename, no?

Choose a reason for hiding this comment

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

yeah, probably spawn a new crate then..?

Another option is to create a "parent" crate, but I'm not sure maintenance is worth it (or include them in the same repository and it may be ok?)

  • window_safe_area
    • ios_safe_area
    • android_safe_area
    • windows_safe_area -> yeah naming is hard ok

(I also think such crate would be more useful if it could be not tied to bevy, that may be another subject, but if all we need is a window handle it makes sense, that would mean a new crate bevy_window_safe_area or an exposed feature...)

Copy link
Contributor

Choose a reason for hiding this comment

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

@Leinnan how about we make it a workspace with three crates: bevy_ios_safearea, bevy_android_safearea (no ties to the former) and then an abstracting one over both that supports either bevy_device_safearea? This way we can rename the GitHub repo and do not need to rename crates but just add two

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@extrawurst I think one package is more than enough for it, but I leave it up to you

Copy link
Contributor

@extrawurst extrawurst Oct 18, 2025

Choose a reason for hiding this comment

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

the dependency hell alone makes me want these in two separate crates

Copy link
Contributor

Choose a reason for hiding this comment

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

we could argue to start with bevy_android_safearea before doing the combined one right away

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants