wishkit / wishkit-ios

In-App Feature Requests. Made Easy.
https://wishkit.io
MIT License
137 stars 24 forks source link

Button overlapping with tab bar using navigation link #61

Closed ghost closed 1 month ago

ghost commented 1 month ago

are we only supposed to use wishkit with sheets or full screen covers?

martinlasek commented 1 month ago

You can use it with sheets as well as full screen covers - in any way possible!

  1. When the button overlaps with the tab bar please try to increase bottom padding with

    WishKit.config.buttons.addButton.bottomPadding = .large
  2. If WishKit.FeedbackListView() is part of the NavigationStack hierarchy, then you can use it just like that.

  3. If WishKit.FeedbackListView() is not part of the NavigationStack hierarchy (which is often the case when you present it in a sheet) then please use WishKit.FeedbackListView().withNavigtion() to add navigation bar to it.

Hope this helps!

ghost commented 1 month ago

IMG_5788

Navigation links aren't working for me. I checked "Ice Cubes" which also uses wishkit and the problem is the same.

I'll stick to keeping it in a sheet until this is fixed.

Thanks

martinlasek commented 1 month ago

Hey Connor, would love to debug and fix this case. Would you mind posting the sample code that produces this issue? Is it a TabBar that is containing a NavigationStack that is containing a link to the feedback board?

A sample project or the code would be of great help for me to reproduce and address asap!

ghost commented 1 month ago

My settings view is wrapped in a Navigation stack that pushes to here.

import SwiftUI import WishKit

struct FeatureRequestsView: View { var body: some View { WishKit.FeedbackListView() } }

I can add some bottom padding and kinda push things up but feels janky. Am I setting this up right?

martinlasek commented 1 month ago

I don't think you need the custom wrapping FeatureRequestsView you can use WishKit.FeedbackListView() right away wherever you are using FeatureRequestView() right now :)

ghost commented 1 month ago

I tried that originally and got the same results. I've played around for a good few hours. The only way i can get it to work in a navigation link is manually adding padding in a new view to push it off the tab view.

Not really a major issue. Works great in a sheet.

import SwiftUI import WishKit

struct FeatureRequestsView: View { var body: some View { WishKit.FeedbackListView() .padding(.bottom) } }