-
Type:
Epic
-
Status: In Development
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: JS APIs and Utilities
-
Epic/Theme:
-
Story Points:1
-
Main Core Job:Engage - Inform Users
-
Epic Status:To Do
-
Sprint:S05E01 - Dark Souls, S05E02 - Path of Exile, S05E03 - Tibia, S05E04 - Half Life
On march 2020, chomium launched a proposal to deprecate browser native dialogs alert(), confirm() and prompt(), when the code creating them runs embedded in a frame and was loaded from a different origin than the host page. Proposal led to a big discussion about the apropriateness of removing such support, still active at the time of this writing.
Current situation can be summarized as follows:
- HTML live spec already includes this constraint since early 2021
- Chromium added this under a feature flag right after, rolled it out in july 2021 and reverted one month later, postponed to January 2022 as per the complaints
- Liferay DXP platform makes use of such functions in some cases
As a result, once chrome rolls out this, customers rendering Liferay in a cross-domain iframe would not get browser native dialogs rendered. This will break some DXP features.
The goal of this epic is to design and implement alert and confirmation dialogs that substitute the native ones, so that DXP can render properly both in the main frame and within a cross-domain iframe.
Acceptance criteria:
- DXP provides globally available functions to substitute the existing ones. These should be included in all served pages so that they can be called from anywhere in DXP codebase
- All occurrences of browser native dialogs alert(), confirm() and prompt() in DXP codebase are properly substituted with the new functions
- New functions must offer a similar UX as the existing ones.
- Solution must not cause side effects on DXP applications, regardless of how the DXP app is being rendered. This includes, but is not limited to:
- CSP configurations needed to execute the functions
- Native functions block the JS main thread. New solution may not be doing this in all cases
- Solution must work for all liferay versions with active Premium Support. As per this list, this includes Liferay 7.1 onwards
- To enable a smooth transtion, new functions will be gated trhough a FF so that they can behave like the traditional dialogs