-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Mobile: Support building for web #10650
base: dev
Are you sure you want to change the base?
Mobile: Support building for web #10650
Conversation
Remaining tasks before this pull request is ready for a review:
I propose completing the following tasks in follow-up pull requests:
|
This pull request is currently very large. I plan to move several changes from it into separate pull requests to make it easier to review. In particular,
After the above tasks are completed, this pull request should be ready for review. |
This pull request's goal is to simplify laurent22#10650 by moving SQL query-related changes into a separate pull request.
// For now, geolocation is disabled by default on web until the web permissions workflow | ||
// is improved. At present, trackLocation=true causes the "allow location access" prompt | ||
// to appear without a clear indicator for why Joplin wants this information. | ||
Setting.setValue('trackLocation', false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, this is disabled by default because no user-visible reason is shown for why location permission is requested. The "Allow location access" prompt is shown when first creating a new note (after enabling location tracking), but there isn't any context for why Joplin wants to track the user's location.
Currently, however, I don't think the existing mobile app explains why location permissions are being requested. As such, for consistency, it could make sense to remove this different default:
// For now, geolocation is disabled by default on web until the web permissions workflow | |
// is improved. At present, trackLocation=true causes the "allow location access" prompt | |
// to appear without a clear indicator for why Joplin wants this information. | |
Setting.setValue('trackLocation', false); |
if (Platform.OS === 'web') { | ||
const response = await pickDocument({ multiple: true, preferCamera: true }); | ||
for (const asset of response) { | ||
await this.attachFile(asset, 'image'); | ||
} | ||
} else { | ||
this.setState({ showCamera: true }); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe refactor?
Summary
[ Try it | Forum post | Implementation progress ]
This pull request allows running Joplin Mobile in a web browser using
react-native-web
and@sqlite.org/sqlite-wasm
.Possible use-cases
Running Joplin on devices that can't easily install software.
Getting feedback on proposed mobile app changes — clicking on a link in a web browser is much easier than installing an Android APK.
Developing and testing plugins for mobile without access to an Android device.
Installing non-recommended plugins on iOS.
Could allow users to try plugins without installing them:
May simplify developing and testing the mobile app:
Demo
The
work/mobile-web
branch is deployed to https://personalizedrefrigerator.github.io/joplin/web-client/.Note that this demo works best in a Chromium-based browser. While it loads in Firefox, the initial setup is very slow.
Why not Joplin Desktop?
It seemed simpler to add support for web to the mobile app than the desktop app. In particular, Joplin Desktop depends on a large number of NodeJS-only libraries and APIs (e.g.
fs-extra
).Tasks
@sqlite.org/sqlite-wasm
bundle.js
— extract plugin assets to separate files.