-
Notifications
You must be signed in to change notification settings - Fork 61
feat: 🎸 [HCPSDKFIORIUIKIT-2964] SwiftUI Hierarchy View #1310
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
Conversation
| // Wrapper the header's trailing accessory clickable with default logic both the default and customized trailing accessory | ||
| init(_ configuration: TrailingAccessoryConfiguration, modelObject: HierarchyViewModelObject, isRTL: Bool) { | ||
| let trailingAccessory: () -> AnyView = { | ||
| if let _ = isRTL ? modelObject.parentID : modelObject.childID, let _ = modelObject.currentID { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused Optional Binding Violation: Prefer != nil over let _ = (unused_optional_binding)
| // Wrapper the header's leading accessory clickable with default logic both the default and customized leading accessory | ||
| init(_ configuration: LeadingAccessoryConfiguration, modelObject: HierarchyViewModelObject, isRTL: Bool) { | ||
| let leadingAccessory: () -> AnyView = { | ||
| if let _ = isRTL ? modelObject.childID : modelObject.parentID, let _ = modelObject.currentID { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused Optional Binding Violation: Prefer != nil over let _ = (unused_optional_binding)
| // Wrapper the header's trailing accessory clickable with default logic both the default and customized trailing accessory | ||
| init(_ configuration: TrailingAccessoryConfiguration, modelObject: HierarchyViewModelObject, isRTL: Bool) { | ||
| let trailingAccessory: () -> AnyView = { | ||
| if let _ = isRTL ? modelObject.parentID : modelObject.childID, let _ = modelObject.currentID { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused Optional Binding Violation: Prefer != nil over let _ = (unused_optional_binding)
| // Wrapper the header's leading accessory clickable with default logic both the default and customized leading accessory | ||
| init(_ configuration: LeadingAccessoryConfiguration, modelObject: HierarchyViewModelObject, isRTL: Bool) { | ||
| let leadingAccessory: () -> AnyView = { | ||
| if let _ = isRTL ? modelObject.childID : modelObject.parentID, let _ = modelObject.currentID { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused Optional Binding Violation: Prefer != nil over let _ = (unused_optional_binding)
|
I063052 seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
|
@JunSong-SH I used copilot to generate the API doc, you can review it and see if to be adopted. It is for HierarchyView. I have not used it for other public APIs yet. You may see if copilot helps with your other public APIs as well /// |
Sources/FioriSwiftUICore/_ComponentProtocols/CompositeComponentProtocols.swift
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Enhance API doc and unit test, Try to hit 80% code coverage
- The fiori icons come from Design Team. So, usually we don't add our new icons, since they follow some design pattern.
This PR adds some new icons , does it mean UIKit SDK uses different icons ?
Sources/FioriSwiftUICore/_ComponentProtocols/CompositeComponentProtocols.swift
Outdated
Show resolved
Hide resolved
Sources/FioriSwiftUICore/_ComponentProtocols/CompositeComponentProtocols.swift
Outdated
Show resolved
Hide resolved
...tUICore/_generated/StyleableComponents/HierarchyIndicator/HierarchyIndicator.generated.swift
Outdated
Show resolved
Hide resolved
...iftUICore/_generated/StyleableComponents/HierarchyItemView/HierarchyItemView.generated.swift
Outdated
Show resolved
Hide resolved
.../FioriSwiftUICore/_generated/StyleableComponents/HierarchyView/HierarchyView.generated.swift
Outdated
Show resolved
Hide resolved
|
@JunSong-SH See if these files (with low or 0%)c an be covered in unit tests. You can try to use copilot to write unit tests
|
The two newly added icons come from the FioriIcon library used in the UIKit HierarchyIndicator. See below links: |
e3861da to
b6e100c
Compare
| import Foundation | ||
| import SwiftUI | ||
|
|
||
| /** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Orphaned Doc Comment Violation: A doc comment should be attached to a declaration. (orphaned_doc_comment)
| import Foundation | ||
| import SwiftUI | ||
|
|
||
| /** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Orphaned Doc Comment Violation: A doc comment should be attached to a declaration. (orphaned_doc_comment)
| import Foundation | ||
| import SwiftUI | ||
|
|
||
| /** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Orphaned Doc Comment Violation: A doc comment should be attached to a declaration. (orphaned_doc_comment)
| import Foundation | ||
| import SwiftUI | ||
|
|
||
| /** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Orphaned Doc Comment Violation: A doc comment should be attached to a declaration. (orphaned_doc_comment)
| import Foundation | ||
| import SwiftUI | ||
|
|
||
| /** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Orphaned Doc Comment Violation: A doc comment should be attached to a declaration. (orphaned_doc_comment)
| import Foundation | ||
| import SwiftUI | ||
|
|
||
| /** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Orphaned Doc Comment Violation: A doc comment should be attached to a declaration. (orphaned_doc_comment)
| import Foundation | ||
| import SwiftUI | ||
|
|
||
| /** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Orphaned Doc Comment Violation: A doc comment should be attached to a declaration. (orphaned_doc_comment)
| import Foundation | ||
| import SwiftUI | ||
|
|
||
| /** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Orphaned Doc Comment Violation: A doc comment should be attached to a declaration. (orphaned_doc_comment)
| import Foundation | ||
| import SwiftUI | ||
|
|
||
| /** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Orphaned Doc Comment Violation: A doc comment should be attached to a declaration. (orphaned_doc_comment)
| import Foundation | ||
| import SwiftUI | ||
|
|
||
| /** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Orphaned Doc Comment Violation: A doc comment should be attached to a declaration. (orphaned_doc_comment)
| import Foundation | ||
| import SwiftUI | ||
|
|
||
| /** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Orphaned Doc Comment Violation: A doc comment should be attached to a declaration. (orphaned_doc_comment)
| import Foundation | ||
| import SwiftUI | ||
|
|
||
| /** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Orphaned Doc Comment Violation: A doc comment should be attached to a declaration. (orphaned_doc_comment)
|
|
||
| public static let hierarchyOff = Image(fioriName: "fiori.hierarchy.off") | ||
|
|
||
| public static let hierarchyOn = Image(fioriName: "fiori.hierarchy.on") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing Docs Violation: public declarations should be documented. (missing_docs)
| /// | ||
| public static let zoomOut = Image(fioriName: "fiori.zoom.out") | ||
|
|
||
| public static let hierarchyOff = Image(fioriName: "fiori.hierarchy.off") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing Docs Violation: public declarations should be documented. (missing_docs)


[HCPSDKFIORIUIKIT-2964] SwiftUI Hierarchy View
This PR address the change for SwiftUI Hierarchy View migration according to the UIkit Hierarchy View. The main changes include the following items: