Openbravo Issue Tracking System - POS2
View Issue Details
0050018POS2Corepublic2022-08-21 11:022022-10-04 13:44
AugustoMauch 
AugustoMauch 
normalmajorhave not tried
closedfixed 
5
 
23Q1 
No
0050018: Window registration does not support responsive windows
The way application windows are registered, it is not possible to support responsive windows, that is, windows with different layouts that will be selected based on the device orientation. Now when registering a window the second parameter is the specific configuration instance that will be used (see here [1] for example). When that is done, that is the specific configuration that the window will have.

In order to support dynamic configurations for windows, instead of passing a specific configuration as a parameter, a configuration name has to be provided. That way when a window is rendered the configuration name can be fetch and then the useConfiguration hook can be used to retrieve the current configuration dynamically, according to the selection function of the configuration set.

[1] https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/blob/master/web-jspack/org.openbravo.core2/src/ob-init.js#L291https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/blob/master/web-jspack/org.openbravo.core2/src/ob-init.js#L291 [^]
-
Change the registerApplicationWindow API so that instead of receiving a json object that represents a configuration as a parameter, it receives a configuration name.
No tags attached.
blocks feature request 0050400 scheduled ablasco Portrait mode support 
Issue History
2022-08-21 11:02AugustoMauchNew Issue
2022-08-21 11:02AugustoMauchAssigned To => Triage Platform Base
2022-08-21 11:02AugustoMauchTriggers an Emergency Pack => No
2022-08-21 11:02AugustoMauchAssigned ToTriage Platform Base => AugustoMauch
2022-08-21 11:02AugustoMauchStatusnew => scheduled
2022-08-21 12:23hgbotNote Added: 0140262
2022-08-21 12:30hgbotNote Added: 0140263
2022-08-21 12:32hgbotNote Added: 0140264
2022-10-03 14:39hgbotNote Added: 0141578
2022-10-03 14:46hgbotNote Added: 0141579
2022-10-04 10:49ablascoRelationship addedblocks 0050400
2022-10-04 13:43hgbotResolutionopen => fixed
2022-10-04 13:43hgbotStatusscheduled => closed
2022-10-04 13:43hgbotNote Added: 0141642
2022-10-04 13:43hgbotFixed in Version => 23Q1
2022-10-04 13:43hgbotNote Added: 0141643
2022-10-04 13:43hgbotNote Added: 0141644
2022-10-04 13:43hgbotNote Added: 0141645
2022-10-04 13:44hgbotNote Added: 0141646
2022-10-04 13:44hgbotNote Added: 0141647
2022-10-04 13:44hgbotNote Added: 0141648
2022-10-04 13:44hgbotNote Added: 0141649
2022-10-04 13:44hgbotNote Added: 0141650
2022-10-04 13:44hgbotNote Added: 0141651

Notes
(0140262)
hgbot   
2022-08-21 12:23   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/819 [^]
(0140263)
hgbot   
2022-08-21 12:30   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/1148 [^]
(0140264)
hgbot   
2022-08-21 12:32   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2.restaurant/-/merge_requests/174 [^]
(0141578)
hgbot   
2022-10-03 14:39   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.reporting.integration.retail/-/merge_requests/2 [^]
(0141579)
hgbot   
2022-10-03 14:46   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2.service.provider/-/merge_requests/7 [^]
(0141642)
hgbot   
2022-10-04 13:43   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/819 [^]
(0141643)
hgbot   
2022-10-04 13:43   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2 [^]
Changeset: 164eeb12459724088f421b15600207e482056db2
Author: Augusto Mauch <augusto.mauch@openbravo.com>
Date: 04-10-2022 13:41:57
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/commit/164eeb12459724088f421b15600207e482056db2 [^]

Fixes ISSUE-50018: Application windows do not support dynamic configurations

The API of the Registry.registerApplicationWindow has been updated to accept a configuration name instead of a javascript object that represents a configuration. As a consequence other changes have been done:
- Tests and stories have been updated
- Registry.checkParameters has been updated to take into account that window are actually stored in an object defined in ApplicationWindow.js and not in Registry.configRegistry
- window registrations in ob-init has been updated to take into account new API

---
M web-jspack/org.openbravo.core2/src/components/Window/Window.jsx
M web-jspack/org.openbravo.core2/src/components/Window/stories/Window.stories.jsx
M web-jspack/org.openbravo.core2/src/core/Registry.js
M web-jspack/org.openbravo.core2/src/core/__test__/Registry.test.js
M web-jspack/org.openbravo.core2/src/ob-init.js
---
(0141644)
hgbot   
2022-10-04 13:43   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/1148 [^]
(0141645)
hgbot   
2022-10-04 13:43   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: cb89ed705343de38b2e25c3c10dfd8980560f245
Author: Augusto Mauch <augusto.mauch@openbravo.com>
Date: 04-10-2022 13:43:23
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/cb89ed705343de38b2e25c3c10dfd8980560f245 [^]

Related to ISSUE-50018: Uses new API to register application windows

With the new API we have to pass as parameter a configuration name, and ensure that configuration is registered

---
M web-jspack/org.openbravo.pos2/src/ob-init.js
---
(0141646)
hgbot   
2022-10-04 13:44   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2.restaurant [^]
Changeset: f93f12393aa27d7529179dfbcdc9d2c956e3d4ad
Author: Augusto Mauch <augusto.mauch@openbravo.com>
Date: 03-10-2022 11:24:05
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2.restaurant/-/commit/f93f12393aa27d7529179dfbcdc9d2c956e3d4ad [^]

Related to ISSUE-50018: Uses new API to register application windows

With the new API there is no need to overwrite the window configuration, it is enough to overwrite the component configuration

---
M web-jspack/org.openbravo.pos2.restaurant/src/ob-init.js
---
(0141647)
hgbot   
2022-10-04 13:44   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2.restaurant/-/merge_requests/174 [^]
(0141648)
hgbot   
2022-10-04 13:44   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2.service.provider [^]
Changeset: 413ebd311abeab083b18bfcca0e1ca40d21b6c77
Author: Augusto Mauch <augusto.mauch@openbravo.com>
Date: 03-10-2022 14:45:21
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2.service.provider/-/commit/413ebd311abeab083b18bfcca0e1ca40d21b6c77 [^]

Related to ISSUE-50018: Uses new API to register application windows

With the new API we have to pass as parameter a configuration name, and ensure that configuration is registered

---
M web-jspack/org.openbravo.pos2.service.provider/src/ob-init.js
---
(0141649)
hgbot   
2022-10-04 13:44   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2.service.provider/-/merge_requests/7 [^]
(0141650)
hgbot   
2022-10-04 13:44   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.reporting.integration.retail [^]
Changeset: a979d3921b97273a03457d5dc0e6efec67202faa
Author: Augusto Mauch <augusto.mauch@openbravo.com>
Date: 03-10-2022 14:34:33
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.reporting.integration.retail/-/commit/a979d3921b97273a03457d5dc0e6efec67202faa [^]

Related to ISSUE-50018: Uses new API to register application windows

With the new API we have to pass as parameter a configuration name, and ensure that configuration is registered

---
M web-jspack/org.openbravo.reporting.integration.retail/src/ob-init.js
---
(0141651)
hgbot   
2022-10-04 13:44   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.reporting.integration.retail/-/merge_requests/2 [^]