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

Add SwiftUI support to Fluent UI #1942

Open
2 tasks done
chadradams opened this issue Dec 11, 2023 · 6 comments
Open
2 tasks done

Add SwiftUI support to Fluent UI #1942

chadradams opened this issue Dec 11, 2023 · 6 comments

Comments

@chadradams
Copy link

Platform

  • iOS
  • macOS

Describe the feature that you would like added

In order to support newer iOS / macOS / visionOS platforms, SwiftUI support will be vital.

What component or utility would this be added to

All existing supported components.

Have you discussed this feature with our team, and if so, who

Not at this time.

Additional context/screenshots

Reference in the docs about lack of support.

image
@imthath-m
Copy link
Contributor

I think some components do have SwiftUI versions. See Avatar docs here.

If you would like SwiftUI support for some particular component, please feel free to highlight that.

@chadradams
Copy link
Author

@imthath-m Avatar does have it, I might recommend some core controls for SwiftUI: Button, TextField, Label, & Searchbar those would be excellent starter controls to start moving to SwiftUI.

@mischreiber
Copy link
Contributor

One aspect that we are trying to keep in mind is that, based on past experimentation, SwiftUI components add significantly to the binary size of the Fluent UI module. This is something that various clients have pushed back against (rightly, in my opinion).

So before we start adding SwiftUI variants of our components, I think we want to take some time and consider our approach to modularization and pay-for-play consumption of the library. This could take many approaches, including potentially a fully separate SwiftUI library from our existing (mostly) UIKit one.

@chadradams
Copy link
Author

All valid points Mike, but at some point for the library to still be worthwhile, will be Swift UI compatibility. Apple is very intent on moving everyone to Swift UI. Even Vision OS doesn't even include UI Kit libraries. Even the current look of Office on Vision Pro looks mostly void of Fluent using only icons (possibly ported from the React library).

image

@imthath-m
Copy link
Contributor

@mischreiber Thanks for the info.

I've seen this modularization being mentioned in some other places as well but can't find any progress towards to it. What steps are being taken to achieve it and where can find more info about it?

By the way, I'm already almost done with adding SwiftUI button #1960. It adds about 150kb to the module.

@mischreiber
Copy link
Contributor

Even Vision OS doesn't even include UI Kit libraries.

Not to focus too tightly on this, but UIKit is fully supported on visionOS. Apple even has a WWDC video for getting started on porting UIKit apps to SwiftUI: Meet UIKit for spatial computing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants