TagKit icon indicating copy to clipboard operation
TagKit copied to clipboard

Added OnNewTag, allows to react to Return key in TagTextField, fixed fatal problem with landscape mode

Open Vithanco opened this issue 1 year ago • 9 comments

Added possibility to trigger action when tapped on tag. Fixed an issue with geometry reader in landscape mode.

Vithanco avatar May 12 '24 17:05 Vithanco

Hi @Vithanco

Thank you for the PR.

To help me understand, why is the geometry reader thing needed? What are the problems in landscape? Please clarify, since I don't want to use GeometryReader unless explicitly needed.

In the tag list, the idea is that you can add everything you need to the view builder, so adding an additional action parameter should not be necessary.

The text field also should not need the action parameter, since you can just add the onSubmit to the tag text view. You do not need to specify that within that view.

danielsaidi avatar Jun 26 '24 04:06 danielsaidi

you are absolutely right, Daniel! I guess the way how you can use SwiftUI are still not internalised on my side. I removed tap gesture and on submit. Thanks!

I am not a fan of geometry reader neither. But please notice that I didn't introduce it, I only refactored your code. The problem that your code has is that it lead to a program abortion, and the updated version seems to work (and hopefully is better to read).

Vithanco avatar Jun 27 '24 07:06 Vithanco

this fixes issue generated here https://github.com/danielsaidi/TagKit/issues/4

edit: it doesnt

FireLord avatar Nov 04 '24 15:11 FireLord

Sorry for completely dropping the ball on this @Vithanco!

If this solves the problem with Swift 6, I will give it a try, then merge it and re-enable Swift 6 👍

danielsaidi avatar Nov 06 '24 10:11 danielsaidi

Sorry for completely dropping the ball on this @Vithanco!

If this solves the problem with Swift 6, I will give it a try, then merge it and re-enable Swift 6 👍

sorry i used his repo directly which didnt have swift 6 so maybe thats why it worked. Ill check his commit with swift 6 and let you know!

FireLord avatar Nov 06 '24 10:11 FireLord

sorry i used his repo directly which didnt have swift 6 so maybe thats why it worked. Ill check his commit with swift 6 and let you know!

Thank you!

danielsaidi avatar Nov 06 '24 10:11 danielsaidi

sorry i used his repo directly which didnt have swift 6 so maybe thats why it worked. Ill check his commit with swift 6 and let you know!

Thank you!

this pr doesnt fix that error. But your latest 0.4.1 with swift 5.9 builds fine!

FireLord avatar Nov 06 '24 12:11 FireLord

Hi @Vithanco

I have updated the library for Swift 6, and simplified many views.

Does this still happen?

danielsaidi avatar Apr 03 '25 13:04 danielsaidi

@Vithanco I am currently swamped with work, but will take a look at this in Xcode 26 in a few weeks.

danielsaidi avatar Sep 18 '25 09:09 danielsaidi