Skip to content
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

[ListVnext] Replace custom LeadingView input type to UIView #378

Merged
merged 6 commits into from
Jan 8, 2021

Conversation

sophialee0416
Copy link
Contributor

@sophialee0416 sophialee0416 commented Jan 7, 2021

Platforms Impacted

  • iOS
  • macOS

Description of changes

List's custom LeadingView only accepted Images, but with this new change should be able to accept any UIView as its input. (#365)

Verification

Sample section was added in main List.

Current Vnext
Simulator Screen Shot - iPhone 12 Pro - 2021-01-06 at 20 55 18 Simulator Screen Shot - iPhone 12 Pro - 2021-01-06 at 20 54 40

Pull request checklist

This PR has considered:

  • Light and Dark appearances
  • VoiceOver and Keyboard Accessibility
  • Internationalization and Right to Left layouts
  • Different resolutions (1x, 2x, 3x)
  • Size classes and window sizes (iPhone vs iPad, notched devices, multitasking, different window sizes, etc)
Microsoft Reviewers: Open in CodeFlow

@sophialee0416 sophialee0416 added the vnext-prototype Changes meant to be merged to the vnext-prototype branch. label Jan 7, 2021
@sophialee0416 sophialee0416 requested a review from a team as a code owner January 7, 2021 03:00
@sophialee0416 sophialee0416 linked an issue Jan 7, 2021 that may be closed by this pull request
2 tasks
ios/FluentUI/Table View/ListVnext.swift Outdated Show resolved Hide resolved
ios/FluentUI/Table View/ListVnext.swift Outdated Show resolved Hide resolved
@@ -204,8 +204,7 @@ extension MSFListView {
Button(action: cell.onTapAction ?? {}, label: {
HStack(spacing: 0) {
if let leadingIcon = cell.leadingIcon {
Image(uiImage: leadingIcon)
.resizable()
UIViewWrapper(leadingIcon)
Copy link
Contributor

Choose a reason for hiding this comment

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

What would be the story for the app that is using SwiftUI fully?
I thought initially about having a modifier for the MSFListCellView where you'd pass "some View" (the AvatarVnext) in this case and it would replace the icon there.

And I believe that doesn't dismiss the current approach of supporting an instance of UIView.
I'm thinking about a path for both consumers (UIKit and SwiftUI) to use it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How would this be translated when declaring the input type? I understand that we can assign/return a some View type in SwiftUI but I do not think it can be represented in ObjC?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sophialee0416 sophialee0416 merged commit b1c01d2 into vnext-prototype Jan 8, 2021
@sophialee0416 sophialee0416 deleted the sople/listAvatar branch January 8, 2021 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vnext-prototype Changes meant to be merged to the vnext-prototype branch.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ListVnext] Replace leading view input type for broader customization
2 participants