Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0052429
TypeCategorySeverityReproducibilityDate SubmittedLast Update
backport[POS2] Coremajorhave not tried2022-09-27 18:082023-06-05 11:36
ReporteradrianromeroView Statuspublic 
Assigned Tomeriem_azaf 
PrioritynormalResolutionfixedFixed in Version23Q2.1
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version23Q2.1
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0052429: OnLoginActions do not allow to display UI

DescriptionOnLoginActions are asynchronous and in cases like Fiscalization events and other events it is required to display UI dialogs. But this UI never appears and the cashier cannot interact with it because it is rendered but behind the loading panel
Steps To ReproduceRegister the following login action and verify the ask confirmation expression is reached but the console log expression is never reached and the application never ends the login action because there is a dialog behind the loading panel the cashier cannot interact with it. See the screenshots attached.

import OB from 'org.openbravo.core2/src/core/OB';
import OnLoginActions from 'org.openbravo.core2/src/core/authentication/OnLoginActions';
import './assets/style/main.scss';

export async function register() {
  OnLoginActions.registerAction(OB.EVTFIS.fiscalizationLogin);

  OnLoginActions.registerAction(async () => {
    await OB.App.View.DialogUIHandler.askConfirmation({
      title: 'Login dialog title',
      message: 'message',
      hideCancel: true
    });
    console.log('End login action.');
  });
}

export async function init() {
  // Nothing
}
Proposed SolutionThe loading panel should not be in top of all the UI it should only replace the POS application. This way dialogs and modals can be rendered on top of the loading panel.

Loading Screen component has a z-index of 2000 to be on top of all other material UI components according the change comment: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/commit/ec4dd5ede9bbd089d3508bbd5c83a4f35c3222cf [^] This is OK fdr common components but not for modals, snackbars or tooltips See z-index for material UI components: https://mui.com/material-ui/customization/z-index/ [^]

The proposal is to change the z-index to 1250 for the Loading Screen component to be on top of regular material ui components but not for modals, snackbars or tooltips. The proposed change fixes this issue:

diff --git a/web-jspack/org.openbravo.core2/src/components/LoadingScreen/LoadingScreen.scss b/web-jspack/org.openbravo.core2/src/components/LoadingScreen/LoadingScreen.scss
index c30838ef..6fe19787 100644
--- a/web-jspack/org.openbravo.core2/src/components/LoadingScreen/LoadingScreen.scss
+++ b/web-jspack/org.openbravo.core2/src/components/LoadingScreen/LoadingScreen.scss
@@ -14,7 +14,7 @@
 
 .obc2LoadingScreen-container .obc2LoadingScreen {
   position: absolute;
- z-index: 2000; /* This screen has to be above any other element */
+ z-index: 1250; /* This screen has to be above any other element but not modals, with z-index: 1300 */
   display: grid;
   align-items: center;
   justify-items: center;
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
blocks defect 0050357 closedmeriem_azaf OnLoginActions do not allow to display UI 

-  Notes
(0149728)
hgbot (developer)
2023-05-16 08:44

Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/1100 [^]
(0150730)
hgbot (developer)
2023-06-05 11:36

Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/1100 [^]
(0150731)
hgbot (developer)
2023-06-05 11:36

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2 [^]
Changeset: 661a3ce517f3b423660e1d762cf210280eb9a78c
Author: Augusto Mauch <augusto.mauch@openbravo.com>
Date: 05-06-2023 11:34:49
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/commit/661a3ce517f3b423660e1d762cf210280eb9a78c [^]

Fixes ISSUE-52429: Updates loading screen z-index so that it is below modal dialogs

The problem was that the current z-index was so high that modal dialogs where displayed below the loading screen.

The z-index value has been updated to 1250 so that it is above the normal components, but below modal dialogs. We
need modal dialogs to be above the loading screen because we sometimes need to use them to display error information
or to request info or confirmations to the user

---
M web-jspack/org.openbravo.core2/src/components/LoadingScreen/LoadingScreen.scss
---

- Issue History
Date Modified Username Field Change
2023-05-12 09:46 AugustoMauch Type defect => backport
2023-05-12 09:46 AugustoMauch Target Version => 23Q2.1
2023-05-16 08:44 hgbot Note Added: 0149728
2023-06-05 11:36 hgbot Note Added: 0150730
2023-06-05 11:36 hgbot Resolution open => fixed
2023-06-05 11:36 hgbot Status scheduled => closed
2023-06-05 11:36 hgbot Fixed in Version => 23Q2.1
2023-06-05 11:36 hgbot Note Added: 0150731


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker