This repository has been archived by the owner on Apr 25, 2023. It is now read-only.
Replace file selector with home-grown dep #24
Labels
bug
Something isn't working
design
Updates or fixes to the UI / UX
enhancement
New feature or request
Milestone
We currently have a dependency on react-native-file-selector. However, there are numerous issues with the dependency for what we're looking for.
First: The package does not support directory picking currently. You may wonder how this can be if we have a working dialog picker. This is because I've forked the package, which I am using in the
package.json
of this app. This fork simply merges in this PR of an upstream dependency, and hosts it via GitHub and uses JitPack to install it as an Android dependencyThis wouldn't inherently be a problem on it's own (despite its hacky nature), however there serves two additional problem:
It breaks on iOS. Plain and simply, I have no idea how to work around this issue. This is the single reason we're unable to build GitShark for iOS currently.
It doesn't respect system dark mode currently. While there is likely work I could do upstream to solve for this, it wouldn't be a pretty solution.
Finally, and this is a big one, @PrattiDev doesn't like the design of the selector on Android.
As such, I intend to create a new
react-native-
package that will provide only a single functionality: Selecting directories.It seems that there are respective APIs for iOS:
As well as on Android:
(although the Android API includes remote sources. This can be worked around using
Intent(Intent.ACTION_OPEN_DOCUMENT_TREE).apply { setExtra(Intent.EXTRA_LOCAL_ONLY, true) }
The text was updated successfully, but these errors were encountered: