Thank you both for the feedback!
Edit: missed @roman_r_m’s reply while writing this - glad to hear you’ve already had a prototype for deep links! Mind sharing the code (if it’s in a repo)?
What happens on iOS?
As @laurent said, this wouldn’t impact the iOS app directly, i.e. it’s not adding a new note type or some sort of platform incompatibility, just a different view that’s only applicable to one platform.
Also, my understanding is that iOS doesn’t have the same type of widget per se. Today widget is, in some ways, similar, but React Native docs specifically say that these “may work unreliably because the memory usage tends to be too high”. I suspect implementing this can be done, but it’d have to be completely separate from the Android widget anyway.
How will it be packaged? (Is the react-native build process going to include this?)
Currently creating the APK is entirely automated and it would need to stay that way.
I believe no additional work is needed for packaging. React Native apps already have to have some native code (Joplin has it here) that seems to be seamlessly included in the build process.
If it proves to impact the build process, I agree it’s not worth adding.
Who will maintain this code?
I’m happy to maintain the Android native code that I add since it’d be almost trivial (just writing to a key-value storage and reading from it).
The widget code and distribution in a separate repo. This could be your repo and you distribute the widget on the Play Store, F-Droid, …
I don’t think this is (easily) possible (specifically, having a separate app that only contains a widget). This would require a more sophisticated mechanism of getting Joplin data, not only making the whole thing more complicated (to the point where maintenance burden on both me and the Joplin app would be too high), but there would be both UX and security implications (i.e. users would have to setup and maintain a sync in two apps just to have a widget).
The main issue I see is how to implement deep-linking
Any specific concerns here? Seems React Native has good support for this, but I admit I never tried it, so unsure if there’s some major issue I’m missing.
However, we should try to make sure that the experience is the same across the board. We try to keep the code base as common as possible, in which we have already failed with the “sharing to Joplin” functionality.
Fully understand this sentiment and overall I agree with it. My view is the following:
- It’s unlikely React Native will ever offer a way to do this without writing native Android code (based on the fact a feature request for it has been open for years).
- It’s a feature that’s very commonly requested and Joplin users would benefit from.
Therefore, I’d argue that the demand for this feature is high enough to justify making an exception to “no platform-specific code”. Once we have a simple widget in place, either it turns out nobody really needed this and we can remove it or this is something that’s worth investing further into and adding more features (e.g. to-do lists). So I guess this proposal is more of a “here’s how we can test the waters” rather than “here’s a fully fleshed out feature”. Hope that makes sense.