c1d250fcbc178eaee1694197b759d3717e3b50e6
*: mail This commit fixes the behavior of the notification to install the PWA. The initial spec was not completely achieved, since the 'Dismiss' button, using the fa-close icon was not present. See task-3275275. Now, the button is present, and it can hide the notification and the user don't need to interact with the installation prompt to dismiss it. The fix also fixes the behavior of the notification when being used in an incognito tab. The installPrompt service assumed the PWA could be installed, since window.BeforeInstallPromptEvent is defined. But in an incognito scenario, the event was never actually triggered, since the feature is disabled by the browser. This could finally create a UX issue if the app had been installed, and the localStorage cleaned. The notification would appear, but wouldn't do anything when clicking on the Install button since the event is no longer triggered by the browser. Now, we rely on the trigger of the event exclusively, except on Safari, where we rely on the installationState and the standalone display-mode. Now, the service only set its state when the event has effectivelly been triggered and the native prompt can be called. Since the UI relies on the state from the service, the notification is no longer shown. Tests have been adapted, to dispatch a custom event, allowing the service to be initialized as if it was in a situation where the PWA can be installed effectively. A new test have been added to verify the interaction with the close icon. closes odoo/odoo#149961 Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
…
…
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%