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

feat(iOS): scroll edge appearance #54

Merged

Conversation

dylancom
Copy link
Contributor

@dylancom dylancom commented Oct 17, 2024

This let's you define the edge appearance of the tabbar.
Allowing for a tabbar that is transparent when there is no content behind the tabbar.

@okwasniewski I am a bit in doubt what we should initially set this to... It seems that if you have a tabbarcontroller it modifies this to transparent by default? Do we want it transparent by default (on the scroll edge) or not... hmm...

If the value of this property is nil, UIKit uses the value of the tab bar’s standardAppearance property, modified to have a transparent background. If no tab bar controller manages your tab bar, UIKit ignores this property and uses the tab bar’s standard appearance.

@dylancom dylancom force-pushed the feature/scroll-edge-appearance branch 3 times, most recently from 5ee5ebf to ca3e5f3 Compare October 17, 2024 12:11
@okwasniewski
Copy link
Collaborator

Hmm I don't really see the difference between opaque and transparent. Can we make it a booean? something like: transparentScrollEdgeApperance?

I think setting (configureWithDefaultBackground()) as default makes sense

ios/TabViewImpl.swift Outdated Show resolved Hide resolved
@dylancom
Copy link
Contributor Author

Haven't tested opaque clearly but thought it was neat to expose all available options as it was a small effort.

@dylancom dylancom force-pushed the feature/scroll-edge-appearance branch from a13a79a to 9c5766e Compare October 17, 2024 15:22
@okwasniewski
Copy link
Collaborator

Haven't tested opaque clearly but thought it was neat to expose all available options as it was a small effort.

On the one hand it's neat but on the other it introduces confusion for users. If we have two options that do almost the same then let's make it easier.

Probably we need to annotate that transparentScrollEdgeApperance shouldn't be used together with lazy loading as this causes background blinking.

@dylancom
Copy link
Contributor Author

Is the lazy loading at all needed with this library (perf wise)? As in using it as default...

@okwasniewski
Copy link
Collaborator

okwasniewski commented Oct 17, 2024

Is the lazy loading at all needed with this library (perf wise)? As in using it as default...

It is, if someone renders a huge list in one of the tabs then it can cause issues. Also lazy is the default on JS Tabs so we are matching the "standard".

Maybe Im missing why there is transparent and opaque so let's expose it as you mentioned.

I would set default as our default and make transparent / opaque opt-in

@dylancom
Copy link
Contributor Author

Yes, default is currently our default :)

@dylancom dylancom force-pushed the feature/scroll-edge-appearance branch from 77c173e to 51464bb Compare October 17, 2024 15:34
Copy link
Collaborator

@okwasniewski okwasniewski left a comment

Choose a reason for hiding this comment

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

Thanks for working on this! Two last docs changes

ios/TabViewImpl.swift Outdated Show resolved Hide resolved
@okwasniewski okwasniewski merged commit 9f0f34b into callstackincubator:main Oct 17, 2024
5 checks passed
@dylancom dylancom deleted the feature/scroll-edge-appearance branch October 17, 2024 18:07
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.

2 participants