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(pwa): allow access elk users from service worker #662

Merged
merged 10 commits into from
Jan 1, 2023

Conversation

userquin
Copy link
Member

@userquin userquin commented Dec 30, 2022

This PR includes:

  • change elk-users storage to IDB-keyval: useIDBKeyval
  • add sw logic to use elk-users and find the corresponding notification on backend
  • on push notification click, open the notification page instead just notification or notification/mention ones (current behavior)

This opens the doors to:

  • group notifications, even by server
  • add custom actions on push notification: for example, reply in the own system notification
  • we can add these new features progressively (PWA ;) )

/cc @danielroe @TodePond

@stackblitz
Copy link

stackblitz bot commented Dec 30, 2022

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@netlify
Copy link

netlify bot commented Dec 30, 2022

Deploy Preview for elk-zone ready!

Name Link
🔨 Latest commit 08b5dc2
🔍 Latest deploy log https://app.netlify.com/sites/elk-zone/deploys/63af6336e53f3a0009f70b92
😎 Deploy Preview https://deploy-preview-662--elk-zone.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@patak-dev
Copy link
Member

I think we should still read from local storage and move the users to idb, then remove the key from LS. If not, everyone needs to re-login, no?

@danielroe
Copy link
Member

Agreed - keeping it backwards-compatible would be nice 🙏

@userquin userquin marked this pull request as draft December 30, 2022 16:12
@userquin
Copy link
Member Author

I need to review the redirection: check backward compatibility on users.ts, added users initialization function

@userquin userquin marked this pull request as ready for review December 30, 2022 18:52
composables/users.ts Outdated Show resolved Hide resolved
Copy link
Member

@patak-dev patak-dev left a comment

Choose a reason for hiding this comment

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

I think we can merge after other reviews, and test in main for a couple of days. We should probably not do releases in the next two days.

composables/users.ts Outdated Show resolved Hide resolved
@patak-dev
Copy link
Member

@danielroe merging so we can test it. We can later check if we could reduce the duplication of types.

@patak-dev patak-dev merged commit 496da96 into main Jan 1, 2023
@patak-dev patak-dev deleted the userquin/feat-pwa-idb-keyval-for-users branch January 1, 2023 19:38
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.

3 participants