Make tvOS detail dismiss button opt-in and unstick more views

TVSidebarDetailContainer now exposes a showsDismissButton flag instead of
always attaching a Done toolbar item. The button is only enabled where a
view can end up with no focusable element on its own — Device
Capabilities (informational rows) and the Import Playlists/Subscriptions
flows.

Wrap Contributors, Translators, Acknowledgements, and Device Capabilities
destinations in TVSidebarDetailContainer for the consistent sidebar look,
and make the Translators/Acknowledgements rows focusable on tvOS by
wrapping them in Buttons so the Menu remote button can pop the stack.
This commit is contained in:
Arkadiusz Fal
2026-05-06 22:41:46 +02:00
parent 5c7429abf3
commit 39beb45cff
7 changed files with 68 additions and 71 deletions

View File

@@ -47,6 +47,16 @@ struct TranslationContributorsView: View {
}
private func contributorRow(_ contributor: TranslationContributor) -> some View {
#if os(tvOS)
Button {} label: {
contributorRowContent(contributor)
}
#else
contributorRowContent(contributor)
#endif
}
private func contributorRowContent(_ contributor: TranslationContributor) -> some View {
HStack(spacing: 12) {
// Avatar
LazyImage(url: contributor.gravatarURL) { state in