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: Added native Progress and Select implementations #2234

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

andrew-levy
Copy link

@andrew-levy andrew-levy commented Feb 8, 2024

What changed?

  • Added native progress and select component written with SwiftUI
  • Added to kitchen sink for testing

To Do...

  • Move these to a separate package?
  • Add setupNative functions for each? Expo Modules Core is the only dependency needed, so is this needed?
  • How to allow for components to also have all of the style props. Right now I just wrap each one in a styled() call.

Progress

  • Supports max and value props (I think it also supports all tamagui props but it applies it to the wrapper not the actual swiftui view... need to test this more)
Screen.Recording.2024-03-04.at.9.16.42.AM.mov

Select

  • Allows for the same "anatomy" as the original select, and uses Select.Item and Select.ItemText to pass value and label to the underlying native view.
  • Added an optional nativeType prop to allow the user to select between wheel and menu (defaults to menu). This can be removed if we want to start simple. Can also add support for a segmented picker, just wanted to start small.
Screen.Recording.2024-03-04.at.9.42.25.AM.mov

Copy link

vercel bot commented Feb 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
site ❌ Failed (Inspect) Mar 4, 2024 2:53pm
studio 🔄 Building (Inspect) Visit Preview Mar 4, 2024 2:53pm

Copy link

New dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/expo-build-properties@0.11.1 filesystem Transitive: environment, eval, network, shell, unsafe +281 109 MB brentvatne

View full report↗︎

@andrew-levy andrew-levy changed the title feat: Added native Progress implementation feat: Added native Progress and Select implementations Mar 4, 2024
Comment on lines +444 to +447
if (props.native && isIos) {
return <NativeSelect {...props} />
}

Copy link
Author

Choose a reason for hiding this comment

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

Likely can't do this naive approach. Will probably need a setup function since expo modules core is needed.

Comment on lines +182 to +185
if (props.native && isIos) {
return <NativeProgress {...props} />
}

Copy link
Author

Choose a reason for hiding this comment

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

Likely can't do this naive approach. Will probably need a setup function since expo modules core is needed.

@natew
Copy link
Member

natew commented Mar 6, 2024

I think we'd basically want to do it how we do Sheet now but even a bit further since we have the native package ourselves

  • @tamagui/progress exports some sort of setupNative function
  • @tamagui/progress-native probably is the actual combined progress + native
  • tamagui/progress can export @tamagui/progress-native
  • new package @tamagui/kit that is basically tamagui but all the +native versions

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.

None yet

2 participants