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

Improve PWA capabilities #630

Merged
merged 3 commits into from Mar 16, 2024

Conversation

hugo-vrijswijk
Copy link
Contributor

@hugo-vrijswijk hugo-vrijswijk commented Feb 16, 2024

Improves the manifest.json to make the app installable on devices.

  • Application is now "installable" and recognized as a PWA
  • Shortcuts are added for common actions (if there's more that should be added, feel free to mention them)
  • Add a share_target that allows sharing links to linkding when the PWA is installed (this works really well!)
  • Updates and adds icons to improve installability on devices. Such as multiple sizes and "maskable" icons for dynamic icons on Android (that have a custom shape)
  • Add application screenshot to the manifest.json so (on desktop) users will see a preview of the app when installing it

@hugo-vrijswijk hugo-vrijswijk force-pushed the pwa-improvements branch 6 times, most recently from 875e591 to 7c383b6 Compare February 16, 2024 16:15
@hugo-vrijswijk
Copy link
Contributor Author

@sissbruecker could you take a look at this? :)

Copy link
Owner

@sissbruecker sissbruecker 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 the effort, added a few comments.

.dockerignore Outdated Show resolved Hide resolved
bookmarks/static/favicon.svg Outdated Show resolved Hide resolved
@@ -26,8 +108,90 @@ def test_manifest_respects_context_path(self):
response_body = response.json()
expected_body = {
"short_name": "linkding",
"name": "linkding",
Copy link
Owner

Choose a reason for hiding this comment

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

Nit: Instead of duplicating everything, maybe extract the common parts and reuse them in individual tests.

Copy link
Owner

Choose a reason for hiding this comment

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

Just noticed that a lot of URLs are different. Nevermind then, can be improved if more tests are added. As it is it's a pretty decent snapshot test.

bookmarks/views/manifest.py Outdated Show resolved Hide resolved
@sissbruecker sissbruecker merged commit 6f52baf into sissbruecker:master Mar 16, 2024
2 checks passed
@hugo-vrijswijk hugo-vrijswijk deleted the pwa-improvements branch March 16, 2024 14:59
@dahamsta
Copy link

I'm still not getting this on Firefox, only the standard "Add to Home Screen". Are other people getting Install in the menu or Is it just a quirk of my install? I'm on Nightly.

@hugo-vrijswijk
Copy link
Contributor Author

I'm still not getting this on Firefox, only the standard "Add to Home Screen". Are other people getting Install in the menu or Is it just a quirk of my install? I'm on Nightly.

I do get "Install" as an option on Firefox Android. Though I've installed it via Chrome because only Chrome supports the share target and shortcuts

@leepeuker
Copy link

leepeuker commented Apr 11, 2024

I'm still not getting this on Firefox, only the standard "Add to Home Screen". Are other people getting Install in the menu or Is it just a quirk of my install? I'm on Nightly.

I do get "Install" as an option on Firefox Android. Though I've installed it via Chrome because only Chrome supports the share target and shortcuts

I can confirm this, works on Android (14) with Firefox and Chrome

Edit: I double checked, it works an "normal" Firefox, Firefox nightly does not show me an install option as well @dahamsta

@dahamsta
Copy link

Just occurred to me to test in standard Firefox, Install appears there but still not in Nightly, even with all extensions disabled. Would someone mind confirming please?

https://play.google.com/store/apps/details?id=org.mozilla.fenix

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

4 participants