Skip to content

Conversation

@AcrylonitrileButadieneStyrene
Copy link
Contributor

Objective

Setting a feather radio button's visibility to Visibility::Hidden (bottom row of the below image) should hide the radio button entirely. Instead, the mark stays visible.

My use case for this is a settings panel, in which the radio buttons are in a collapsible section that makes them hidden.

Solution

Changing the visibility of the mark from Visibility::Visible to Visibility::Inherited appears to me to be the cleanest solution, as it does minimal work and has no downsides.

I considered adding a system to my project that would override the visibility each time, but the mark's marker component is not exported.
I also considered adding a system to my project which removed the Checked component from the radio button when making it hidden, and re-adds it when making it visible.

Testing

I tested this change by editing the source file in ~/.cargo/registry/, running cargo clean, then doing a full rebuild of my app, and it worked as expected.

Showcase

@github-actions
Copy link
Contributor

github-actions bot commented Nov 9, 2025

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 this to the 0.17.3 milestone Nov 9, 2025
@alice-i-cecile alice-i-cecile added C-Bug An unexpected or incorrect behavior A-UI Graphical user interfaces, styles, layouts, and widgets labels Nov 9, 2025
@alice-i-cecile alice-i-cecile modified the milestones: 0.17.3, 0.18 Nov 9, 2025
@alice-i-cecile alice-i-cecile added D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Nov 9, 2025
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Nov 9, 2025
@alice-i-cecile alice-i-cecile added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Nov 9, 2025
Merged via the queue into bevyengine:main with commit e242351 Nov 9, 2025
47 checks passed
github-merge-queue bot pushed a commit that referenced this pull request Nov 16, 2025
…21847)

# Objective

Seems the checkbox part is missing in PR #21789.

Make the checkbox marker invisible when the whole widget is
`Visibility::Hidden`.

## Solution

Change the maker's visibility to `Inherited` rather than `Visible`.

## Testing

Manually added `Visibility::Hidden` to the root node of
`examples/ui/feathers.rs`, and verified nothing is visible.
beicause pushed a commit to beicause/bevy that referenced this pull request Nov 26, 2025
…evyengine#21847)

# Objective

Seems the checkbox part is missing in PR bevyengine#21789.

Make the checkbox marker invisible when the whole widget is
`Visibility::Hidden`.

## Solution

Change the maker's visibility to `Inherited` rather than `Visible`.

## Testing

Manually added `Visibility::Hidden` to the root node of
`examples/ui/feathers.rs`, and verified nothing is visible.
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-Bug An unexpected or incorrect behavior D-Straightforward Simple bug fixes and API improvements, docs, test and examples 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.

3 participants