shaps80 / SwiftUIBackports

A collection of SwiftUI backports for iOS, macOS, tvOS and watchOS
MIT License
931 stars 59 forks source link

iOS 17: Feature requests, please add in comments #48

Open shaps80 opened 1 year ago

shaps80 commented 1 year ago

In order to best serve the community, please request features (or react to an existing one) using the comments on this issue. I will then prioritise all efforts to try and fill those backports where possible 👍

For Swift (non-UI) requests please see SwiftBackports

–––

I'm surprised I need to say this, but please do not add comments below that are unrelated to this ticket!

shaps80 commented 1 year ago
yujinqiu commented 1 year ago

backport symbolEffect will be appreciated

shaps80 commented 1 year ago

backport symbolEffect will be appreciated

I'm not sure this one is possible, but I may investigate to confirm 👍

yujinqiu commented 1 year ago

ContentUnavailableView is also useful and it looks not hard to backport.

shaps80 commented 1 year ago

ContentUnavailableView is also useful and it looks not hard to backport.

Hadn't seen that, feel free to submit a PR if its easy 👍

That being said, I'm guessing its a bit more involved to support all platforms correctly, and also I'm guessing its locale aware.

I wonder how many people will actually use this tbh, simply cause it would be off-brand for many apps.


Hmmm I just tested it out and I'm surprised it's limited to search (for built-in API) and also doesn't appear to be locale-aware by default. Honestly not sure if this adds much value, surprised it's included. But you're right, looks super easy to backport, feel free please 👍

PangMo5 commented 1 year ago

scrollTarget(isEnabled:), scrollTargetBehavior(_:), scrollTargetLayout(isEnabled:) It would be really useful if those methods were backported.

shaps80 commented 1 year ago

@PangMo5 I agree! I'll need to dig into these in details, I did take a very quick look a while ago and thought perhaps this couldn't be done, but I'll need to get into the weeds before I know for sure 👍

BastianKusserow commented 10 months ago

A backport of .contentTransition(.numericText(value:)) would be awesome!

shaps80 commented 10 months ago

A backport of .contentTransition(.numericText(value:)) would be awesome!

I considered this actually, I don't think it's that difficult to implement actually, could be done essentially with an AnimatableModifier I think – however I'd rather backport the entire contentTransition API vs just a specific version of it, and tbh not all of them are so easy AFAICT.

I'll consider it though 👍

BastianKusserow commented 10 months ago

@shaps80 would be interested on how you would implement the numeric text transition, as I've struggled with this quite a lot when I tried it. I thought one could reuse the numericText(countDown:) transition but I was not sure how I get the old and the new value for comparison..

shaps80 commented 10 months ago

@shaps80 would be interested on how you would implement the numeric text transition, as I've struggled with this quite a lot when I tried it. I thought one could reuse the numericText(countDown:) transition but I was not sure how I get the old and the new value for comparison..

Definitely dig into animatable modifier, it's not a quick response that I can leave here. And I just don't have the time right now to Explore. Sorry

bstillitano commented 10 months ago

searchScopes would be great to have back ported to at least iOS 15

shaps80 commented 10 months ago

@bstillitano good shout! I did actually start (unfinished) a searchable modifier backport when it was first released. I can't remember why I didn't finish it. I could try completing that and adding scopes as well as tokens actually cause that's a great API.

vmanot commented 9 months ago

@shaps80 would love to know if backporting Shader is even possible.

shaps80 commented 9 months ago

@vmanot that's def out of my scope tbh, but I'd be surprised if it wasn't possible at least 1 or 2 versions back. I'd definitely love a PR exploring this!

vmanot commented 9 months ago

@shaps80 glad to know there are no obvious reasons as to why not! And yes, will definitely PR if I find the bandwidth to push on this front.

jadar commented 9 months ago

@shaps80 I'd be willing to take a crack at that searchable modifier backport, if you wanted to hand it off. :)

shaps80 commented 9 months ago

@shaps80 I'd be willing to take a crack at that searchable modifier backport, if you wanted to hand it off. :)

Sure! I have a start somewhere. Let me try and find it and see if I can drop a starting branch off.

If not I'll let you know and you can start off from scratch. Gimme a couple days.

hstdt commented 6 months ago

how about backport .buttonRepeatBehavior(.enabled)

nlash-livly commented 6 months ago

would love to have .scrollPosition(id:)

futuretap commented 5 months ago

would love to have UIViewRepresentable.sizeThatFits(_:uiView:context:) and View.contentMargins(_:for:).

fl034 commented 5 months ago

TipKit would be awesome!

shaps80 commented 5 months ago

@fl034 I actually started a fairly full on backport of TipKit, but then I realised some issues. We'd equally need to backport the new Predicate APIs (including the macros) since its syntax heavily relies on that.

It's totally possible, especially since Predicate is actually open sourced through the Foundation efforts on Apple's repo. However it's a huge effort and I've simply not had the time to properly get into it.

I also, love TipKit and agree it'd be a great addition.