[#265] Add list item component#1538
Draft
ludovic35 wants to merge 18 commits into
Draft
Conversation
… if tab bar hidden (no Liquid Glass) (#1434) (#1436) Use tricks to get the tab bar hidden status from UIKit layer to then use it and hide the selected tab indicator and the top tab bar divider. Closes #1434 Assisted-by: GitHub Copilot Assisted-by: Claude Sonnet 4.6 (OpenCode, LLMProxy) Reported-by: Thomas Martin <thomas2.martin@orange.com> Reviewed-by: Ludovic Pinel <ludovic.pinel@orange.com> Reviewed-by: Copilot <198982749+Copilot@users.noreply.github.com> Reviewed-by: Pierre-Yves Lapersonne <pierreyves.lapersonne@orange.com> Signed-off-by: Pierre-Yves Lapersonne <pierreyves.lapersonne@orange.com>
…revious behaviour of Switch/checkbox/radio items Signed-off-by: Ludovic PINEL <ludovic.pinel@orange.com>
…revious behaviour of Switch/checkbox/radio items Signed-off-by: Ludovic PINEL <ludovic.pinel@orange.com>
Signed-off-by: Ludovic PINEL <ludovic.pinel@orange.com>
Signed-off-by: Ludovic PINEL <ludovic.pinel@orange.com>
Signed-off-by: Ludovic PINEL <ludovic.pinel@orange.com>
Signed-off-by: Ludovic PINEL <ludovic.pinel@orange.com>
Signed-off-by: Ludovic PINEL <ludovic.pinel@orange.com>
Signed-off-by: Ludovic PINEL <ludovic.pinel@orange.com>
There was a problem hiding this comment.
Pull request overview
This PR introduces the new List Item SwiftUI component family to OUDS Components (static + navigable variants), along with supporting styling APIs, theme tuning, documentation, and required icon assets across themes.
Changes:
- Added
OUDSListStaticItemandOUDSListItemNavigationplus supporting models (leading/trailing/content, avatar, icon) and internal layout/modifier implementations. - Extended theme tuning with
hasRoundedListItemsand propagated it through themes/tests/docs. - Added new icon assets (e.g. external link + communication icons) and updated DocC/tutorial samples + NOTICE entries.
Reviewed changes
Copilot reviewed 49 out of 75 changed files in this pull request and generated 18 comments.
Show a summary per file
| File | Description |
|---|---|
| OUDS/Core/ThemesContract/Tests/OUDSThemeTuningTests.swift | Adds coverage for new hasRoundedListItems tuning defaults/variants. |
| OUDS/Core/ThemesContract/Sources/OUDSTheme/OUDSThemeTuning.swift | Introduces hasRoundedListItems and updates predefined tunings/docs. |
| OUDS/Core/ThemesContract/Sources/_ThemesContract.docc/Tutorial_discovery/Resources/swift-samples/tutorial-discovery-5-8.swift | Updates sample to include hasRoundedListItems. |
| OUDS/Core/ThemesContract/Sources/_ThemesContract.docc/Tutorial_discovery/Resources/swift-samples/tutorial-discovery-5-9.swift | Updates sample to include hasRoundedListItems. |
| OUDS/Core/ThemesContract/Sources/_ThemesContract.docc/Tutorial_discovery/Resources/swift-samples/tutorial-discovery-5-10.swift | Updates sample to include hasRoundedListItems. |
| OUDS/Core/ThemesContract/Sources/_ThemesContract.docc/Tutorial_discovery/Resources/swift-samples/tutorial-discovery (solution).swift | Updates solution sample to include hasRoundedListItems + formatting tweak. |
| OUDS/Core/Themes/Wireframe/Tests/WireframeThemeTests.swift | Updates tests for tuning + safer casts. |
| OUDS/Core/Themes/Wireframe/Sources/WireframeTheme.swift | Propagates hasRoundedListItems into Wireframe tuning. |
| OUDS/Core/Themes/Wireframe/Sources/Values/ComponentTokens/WireframeTheme+ControlItemComponentTokens.swift | Formatting/structure updates in control item tokens provider. |
| OUDS/Core/Themes/Wireframe/Sources/Resources/Icons.xcassets/Functional/ic_functional_action_external_link.imageset/ic_functional_action_external_link.svg | Adds external-link icon SVG (Wireframe). |
| OUDS/Core/Themes/Wireframe/Sources/Resources/Icons.xcassets/Functional/ic_functional_action_external_link.imageset/Contents.json | Adds asset catalog metadata (Wireframe external-link). |
| OUDS/Core/Themes/Wireframe/Sources/Resources/Icons.xcassets/Communication/ic_communication_security_and_safety_lock.imageset/ic_communication_security_and_safety_lock.svg | Adds communication lock icon SVG (Wireframe). |
| OUDS/Core/Themes/Wireframe/Sources/Resources/Icons.xcassets/Communication/ic_communication_security_and_safety_lock.imageset/Contents.json | Adds asset catalog metadata (Wireframe lock). |
| OUDS/Core/Themes/Wireframe/Sources/Resources/Icons.xcassets/Communication/ic_communication_people_avatar.imageset/ic_communication_people_avatar.svg | Adds people avatar icon SVG (Wireframe). |
| OUDS/Core/Themes/Wireframe/Sources/Resources/Icons.xcassets/Communication/ic_communication_people_avatar.imageset/Contents.json | Adds asset catalog metadata (Wireframe avatar). |
| OUDS/Core/Themes/Wireframe/Sources/Resources/Icons.xcassets/Communication/ic_communication_accessibility_vision.imageset/ic_communication_accessibility_vision.svg | Adds accessibility vision icon SVG (Wireframe). |
| OUDS/Core/Themes/Wireframe/Sources/Resources/Icons.xcassets/Communication/ic_communication_accessibility_vision.imageset/Contents.json | Adds asset catalog metadata (Wireframe vision). |
| OUDS/Core/Themes/Wireframe/Sources/Resources/Icons.xcassets/Communication/Contents.json | Adds communication asset catalog folder metadata (Wireframe). |
| OUDS/Core/Themes/Sosh/Tests/SoshThemeTests.swift | Updates tests for tuning + safer casts. |
| OUDS/Core/Themes/Sosh/Sources/Values/ComponentTokens/SoshTheme+ControlItemComponentTokens.swift | Formatting/structure updates in control item tokens provider. |
| OUDS/Core/Themes/Sosh/Sources/SoshTheme.swift | Propagates hasRoundedListItems into Sosh tuning. |
| OUDS/Core/Themes/Sosh/Sources/Resources/Icons.xcassets/Functional/ic_functional_action_external_link.imageset/ic_functional_action_external_link.svg | Adds external-link icon SVG (Sosh). |
| OUDS/Core/Themes/Sosh/Sources/Resources/Icons.xcassets/Functional/ic_functional_action_external_link.imageset/Contents.json | Adds asset catalog metadata (Sosh external-link). |
| OUDS/Core/Themes/Sosh/Sources/Resources/Icons.xcassets/Communication/ic_communication_security_and_safety_lock.imageset/ic_communication_security_and_safety_lock.svg | Adds communication lock icon SVG (Sosh). |
| OUDS/Core/Themes/Sosh/Sources/Resources/Icons.xcassets/Communication/ic_communication_security_and_safety_lock.imageset/Contents.json | Adds asset catalog metadata (Sosh lock). |
| OUDS/Core/Themes/Sosh/Sources/Resources/Icons.xcassets/Communication/ic_communication_people_avatar.imageset/ic_communication_people_avatar.svg | Adds people avatar icon SVG (Sosh). |
| OUDS/Core/Themes/Sosh/Sources/Resources/Icons.xcassets/Communication/ic_communication_people_avatar.imageset/Contents.json | Adds asset catalog metadata (Sosh avatar). |
| OUDS/Core/Themes/Sosh/Sources/Resources/Icons.xcassets/Communication/ic_communication_accessibility_vision.imageset/ic_communication_accessibility_vision.svg | Adds accessibility vision icon SVG (Sosh). |
| OUDS/Core/Themes/Sosh/Sources/Resources/Icons.xcassets/Communication/ic_communication_accessibility_vision.imageset/Contents.json | Adds asset catalog metadata (Sosh vision). |
| OUDS/Core/Themes/Sosh/Sources/Resources/Icons.xcassets/Communication/Contents.json | Adds communication asset catalog folder metadata (Sosh). |
| OUDS/Core/Themes/OrangeCompact/Sources/Values/ComponentTokens/OrangeCompactTheme+ControlItemComponentTokens.swift | Formatting/structure updates in control item tokens provider. |
| OUDS/Core/Themes/OrangeCompact/Sources/OrangeCompactTheme.swift | Updates docs/examples to include hasRoundedListItems. |
| OUDS/Core/Themes/OrangeCompact/Sources/_OUDSThemesOrangeCompact.docc/OUDSThemesOrangeCompact.md | Updates DocC tuning docs to include list item rounding. |
| OUDS/Core/Themes/Orange/Tests/Values/ComponentTokens/ThemeOverrideOfControlItemComponentTokensTests.swift | Adjusts tests (throws removal) consistent with other test updates. |
| OUDS/Core/Themes/Orange/Tests/Values/ComponentTokens/MockTheme/MockTheme+AllControlItemComponentTokens.swift | Formatting/structure updates in mock provider overrides. |
| OUDS/Core/Themes/Orange/Sources/Values/ComponentTokens/OrangeTheme+ControlItemComponentTokens.swift | Formatting/structure updates in control item tokens provider. |
| OUDS/Core/Themes/Orange/Sources/Resources/Icons.xcassets/Functional/ic_functional_action_external_link.imageset/ic_functional_action_external_link.svg | Adds external-link icon SVG (Orange). |
| OUDS/Core/Themes/Orange/Sources/Resources/Icons.xcassets/Functional/ic_functional_action_external_link.imageset/Contents.json | Adds asset catalog metadata (Orange external-link). |
| OUDS/Core/Themes/Orange/Sources/Resources/Icons.xcassets/Communication/ic_communication_security_and_safety_lock.imageset/ic_communication_security_and_safety_lock.svg | Adds communication lock icon SVG (Orange). |
| OUDS/Core/Themes/Orange/Sources/Resources/Icons.xcassets/Communication/ic_communication_security_and_safety_lock.imageset/Contents.json | Adds asset catalog metadata (Orange lock). |
| OUDS/Core/Themes/Orange/Sources/Resources/Icons.xcassets/Communication/ic_communication_people_avatar.imageset/ic_communication_people_avatar.svg | Adds people avatar icon SVG (Orange). |
| OUDS/Core/Themes/Orange/Sources/Resources/Icons.xcassets/Communication/ic_communication_people_avatar.imageset/Contents.json | Adds asset catalog metadata (Orange avatar). |
| OUDS/Core/Themes/Orange/Sources/Resources/Icons.xcassets/Communication/ic_communication_accessibility_vision.imageset/ic_communication_accessibility_vision.svg | Adds accessibility vision icon SVG (Orange). |
| OUDS/Core/Themes/Orange/Sources/Resources/Icons.xcassets/Communication/ic_communication_accessibility_vision.imageset/Contents.json | Adds asset catalog metadata (Orange vision). |
| OUDS/Core/Themes/Orange/Sources/Resources/Icons.xcassets/Communication/Contents.json | Adds communication asset catalog folder metadata (Orange). |
| OUDS/Core/Themes/Orange/Sources/OrangeTheme.swift | Updates docs/examples to include hasRoundedListItems. |
| OUDS/Core/Themes/Orange/Sources/_OUDSThemesOrange.docc/OUDSThemesOrange.md | Updates DocC tuning docs to include list item rounding. |
| OUDS/Core/Components/Sources/Navigations/ListItem/OUDSListStyles.swift | Adds list-item style APIs (env keys + view modifiers). |
| OUDS/Core/Components/Sources/Navigations/ListItem/OUDSListStaticItem.swift | Adds the static list item component + DocC. |
| OUDS/Core/Components/Sources/Navigations/ListItem/OUDSListItemTrailing.swift | Defines trailing content model and variants. |
| OUDS/Core/Components/Sources/Navigations/ListItem/OUDSListItemNavigation.swift | Adds the navigable list item component + affordance type API. |
| OUDS/Core/Components/Sources/Navigations/ListItem/OUDSListItemLeading.swift | Defines leading content model and variants. |
| OUDS/Core/Components/Sources/Navigations/ListItem/OUDSLIstItemIcon.swift | Adds list-item icon view implementation. |
| OUDS/Core/Components/Sources/Navigations/ListItem/OUDSListItemData.swift | Adds the textual data model for list items. |
| OUDS/Core/Components/Sources/Navigations/ListItem/OUDSListItemAvatar.swift | Adds list-item avatar implementation. |
| OUDS/Core/Components/Sources/Navigations/ListItem/Internal/ListItemTrailingContainer.swift | Internal layout for trailing content. |
| OUDS/Core/Components/Sources/Navigations/ListItem/Internal/ListItemTextContainer.swift | Internal layout for text content. |
| OUDS/Core/Components/Sources/Navigations/ListItem/Internal/ListItemLeadingContainer.swift | Internal layout for leading content. |
| OUDS/Core/Components/Sources/Navigations/ListItem/Internal/ListItemHelperTextContainer.swift | Internal helper text rendering. |
| OUDS/Core/Components/Sources/Navigations/ListItem/Internal/ListItemContent.swift | Core list-item layout composition. |
| OUDS/Core/Components/Sources/Navigations/ListItem/Internal/ListItemBordersModifier.swift | Border/divider/outline rendering logic. |
| OUDS/Core/Components/Sources/Navigations/ListItem/Internal/ListItemBackgroundModifier.swift | Background rendering logic based on style/state. |
| OUDS/Core/Components/Sources/Navigations/ListItem/Internal/ListItemAffordanceContainer.swift | Affordance (chevron/external) rendering logic. |
| OUDS/Core/Components/Sources/Navigations/ListItem/Internal/LeadingAndTrailing/ListItemTrailingTexts.swift | Internal rendering for trailing text variants. |
| OUDS/Core/Components/Sources/Navigations/ListItem/Internal/LeadingAndTrailing/ListItemMedia.swift | Internal rendering for image/flag/video media. |
| OUDS/Core/Components/Sources/_OUDSComponents.docc/Navigations.md | Adds list item documentation to the Navigations section. |
| NOTICE.txt | Updates third-party notice entries for newly added assets. |
Comment on lines
+66
to
+70
| nil | ||
| } | ||
|
|
||
| ListItemHelperTextContainer(text: helperTextContent, interactionState: interactionState) | ||
| } |
Comment on lines
+14
to
+16
| import AVKit | ||
| import OUDSTokensSemantic | ||
| import SwiftUI |
Comment on lines
+14
to
+16
| import AVKit | ||
| import OUDSTokensSemantic | ||
| import SwiftUI |
Comment on lines
+14
to
+16
| import AVKit | ||
| import OUDSTokensSemantic | ||
| import SwiftUI |
Comment on lines
+14
to
+16
| import AVKit | ||
| import OUDSTokensSemantic | ||
| import SwiftUI |
| /// leading elements such as avatars and icons are rendered in their smallest available size. | ||
| /// | ||
| /// - Since: 2.0.0 | ||
| @frozen public enum OOUDSListItemLeading { |
| /// with the theme's `actionDisabled` color instead of their semantic color. | ||
| /// | ||
| /// - Since: 2.0.0 | ||
| public struct OUDSLIstItemIcon: View { |
Comment on lines
+138
to
+142
| public func oudsListCardStyle(hasDdivider: Bool = false, | ||
| hasBackground: Bool = true) -> some View | ||
| { | ||
| environment(\.oudsListItemContentStyle, .standard(divider: hasDdivider, background: hasBackground)) | ||
| } |
Comment on lines
+116
to
+117
| @Environment(\.isEnabled) private var isEnabled | ||
| @Environment(\.theme) private var theme |
Comment on lines
+140
to
+142
| @Environment(\.isEnabled) private var isEnabled | ||
| @Environment(\.theme) private var theme | ||
| @Environment(\.layoutDirection) private var layoutDirection |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note: Please transform
- [ ]into- (NA)in the description when things are not applicableRelated issues
#265
Description
Motivation & Context
Types of change
Previews
Checklist
Contribution
Accessibility
Design
Development
Documentation
Checklist (for Core Team only)