Skip to content

Conversation

@gchiacchio
Copy link
Collaborator

@gchiacchio gchiacchio commented Nov 12, 2025

Changes:

  • FlowLink now allows to select how it'll handle interactions:
    • current is by adding an overlay+UIButton on top of the wrapped view
    • new addition is by using a tapGesture, which allows the users to interact with inner buttons in the wrapped view
  • Added a flowTap() helper function which wraps the in a FlowLink with the tapGesture option selected

NOTE: the change is simple enough to allow for the functionality, but trying to mimic the “press feedback” (scale shrink) effect would require a bigger effort and changes. Something on the lines of, providing a way to manually indicate interactive regions to FlowStack, so the whole view doesn't scale when tapping on those.

@gchiacchio gchiacchio requested review from brody2002 and zac November 12, 2025 23:12
Copy link
Member

@zac zac left a comment

Choose a reason for hiding this comment

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

A couple comments to discuss 👍

private var button: some View {
switch activation {
case .overlayButton:
return AnyView(
Copy link
Member

Choose a reason for hiding this comment

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

☝️ Please avoid AnyView as it can have pretty bad performance effects. Should be able to use a Group without issue here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done with @ViewBuilder

@gchiacchio gchiacchio requested a review from zac November 13, 2025 00:07
@gchiacchio gchiacchio merged commit 8225781 into main Nov 14, 2025
2 checks passed
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

Successfully merging this pull request may close these issues.

3 participants