Open srenault-meeds opened 1 month ago
Hello If we add a new channel for "Browser notifications", what about "Push Notifications" channel ? Should we remove it ? keep it ? If we keep it, in which case it will be used ? As I understand, even you install from the playstore, you install the PWA, right ? So you will have "browser notifications".
If we remove "Push notif", for "Browser notif", it seems to be a simple "replacement", right ?
Yes indeed, this has to be studied. I didn't add any reference to push notif as we don't provide it with Meeds. Still, it is a good question
I see 2 options :
You're right, to study
Will be worked later for now:
#### Usage of service worker β Why?
π‘ What?
#### Installing the app from a store β Why?
π‘ What?
Informations here
π§ Questions If using different hubs, then how to manage it? Suggested answer for now:
@margondicco to check please :)
Hello ok for me
IMO, no need to remove existing "Push Notifications" channel, we can replace it to be used even in Mobile App. We may need to support both type of notifications for a while until we replace completely the old Mobile Push Notifications with PWA Push Notifications coupled with Background Synchronization API
For the record and a possible code copying, the previous PRs to introduce PWA with its Manifest file and Service wokers on 6.1:
Which was removed progressively in 6.5 since the feature wasn't enabled since a while.
Those PRs allow to have an offline feature and installable app but not all of allowed features in PWA (See below for features overview)
Ready for tech review by DAO Members (eXo: @rdenarie )
Rationale
Meeds Hubs can be accessed using mobile browser. Fully responsive, the platform provides a mobile experience to its users.
However, end-users and market request to get an app to:
Providing a native app came as a reference for a long time to reach these output. Yet, it requires:
Progressive Web Apps (PWA) has emerged the last few years and it has been improved a lot to answer these concerns without losing native apps advantages:
Based on different reading, including this one
1. Functional Requirements
Top User Stories
#### Installing the app from a browser access β Why?
This is one of the key option provided by PWA. It eases the process for users to add the app without looking for it. And product teams like it as it eases the process to reach users.
You share a link somewhere on the web The user clicks to it, starts using it He is invited to install the app He receives notifications and maybe he will come back see the product again
π‘ What?
When accessing the platform, and once logged in, suggest to install the app![notif to install app](https://github.com/Meeds-io/MIPs/assets/58853195/26dafe50-56cc-4d1e-bf19-63eb9011125f)
Option still possible from the browser settings if needed![install app from settings](https://github.com/Meeds-io/MIPs/assets/58853195/49f8029e-f8ae-429e-84f4-2a7d0e5caefc)
Same option can be proposed using desktop browser
Once installed, it is listed on the device as any other app![App on device](https://github.com/Meeds-io/MIPs/assets/58853195/3c0da93a-02e9-46cc-b731-eccaaad10df6)
From the user settings, a user can scan a QR code from his user settings. Doing it install the app directly
#### Branding β Why?
Theme, colors, logo, tagline can be added by administrators to make the platform identifiable for its community and users It is highly expected by community leader to inheritate these items when installing the app Users can also easily recognize their platform thanks to this
π‘ What?
#### Notifications β Why?
π‘ What? -A new channel for notification is created to enable users to set their preferences "Mobile Notifications"![browser notif pref](https://github.com/Meeds-io/MIPs/assets/58853195/2fa95168-3372-4a6f-9420-27888b9c6aad)
Notification can be sent automatically to help the user accept![notif authorization notif](https://github.com/Meeds-io/MIPs/assets/58853195/f9dd5e5d-fff1-4a6d-a47a-150a0997ac80)
Notifications are sentΒ![push notif](https://github.com/Meeds-io/MIPs/assets/58853195/a2229657-650e-42a8-8400-55a8808cc975)
Notifications badge on device![app avatar and notif](https://github.com/Meeds-io/MIPs/assets/58853195/c10b20b0-6ee5-4766-a4f2-ec6088f2f7e0)
π§ Questions
We need to make sure notifications can be received even when the platform is provided in a secured and internal network (not public web) Precision: no use of google services like firebase is a must-have
#### User experience / Access to the platform β Why?
π‘ What?
More information here
Impacts
Gamification
NA
Notifications
Analytics
Unified Search
NA
2. Technical Requirements
.then
next the fetch periodically to enable auto refreshing)Expected Volume & Performance
The browser caches storage will be used to offer offline feature. Thus a browser caches consumption has to be monitored and cleaned when possible in order to decrease storage consumption. The Browser navigation performances shouldn't be affected by PWA apps and offline feature, thus the service worker isn't expected to be used in a browser mode.
Security
N/A
Extensibility
The Manifest has to be dynamic and should inherit its properties from Branding Options and Public site as made on Deed Hub Card characteristics synchronization. Each DAO Member has to be able to define its own Manifest by extension.
Configurability
Upgradability
N/A
Existing Features
The existing features shouldn't be affected by the PWA feature which will allow to install applications in multiple type of devices without changing existing features.
Feature Flags
Other Non Functional Requirements
The portlets rendering has to change to use REST Endpoint in order to allow easily to handle offline mode of applications. This endpoint has to be available in each portlet Web Application.
3. Software Architecture
Knowing that this new feature will rely on previously existing feature, wome change will be brought again into product from previous commits:
Security
N/A
Access
The offline mode has to be offered in applications by the new Page Layout Framework design and not application by application. Thus the fetch API will be polyfilled in order to add more features about background synchronization and periodic updates. A service worker has to be added in order to manage all types of content:
REST calls
The JS & CSS handling has to evolve to optimizing caching of resources. In fact, currently, when passing from a CI/CD version to another, all the JS & CSS & I18N resources are reloaded systematically. To avoid this and enahnce static resources caching, the Resources fetching has to evolve in order to retrieve the content using its MD5 content in URLs instead of a global assets version parameter.
Services & processing
The web notification channel or push notifications from Notification Service (will depend on Needed Fucntional Behavior) may be used in order to periodically retrieve the notifications to display in Application Badge (exactly same as Web Notif Badge by example) and the push/desktop notification content (same Image and content as the web notification by example). The same REST endpoint of Web notifications can be used this way to ensure the Background synchronization, even when the application isn't running.
Data and persistence
N/A
Clustering
N/A
Multitenancy
N/A
Integrations
N/A
Migration strategy
N/A
5. Annexes