Openbravo Issue Tracking System - POS2
View Issue Details
0051733POS2Corepublic2023-03-01 08:252023-03-02 14:47
AugustoMauch 
AugustoMauch 
normalmajorhave not tried
closedfixed 
5
 
23Q2 
No
0051733: Add a convenient and dynamic way for components to know the orientation of the device
As part of the effort to improve the portrait mode support we have noticed that it will be convenient if some components are aware of the orientation of the device (portrait / landscape).

Currently they can do it by listening to changes in the UI.windowSize property, but it would be cleaner to provide a custom hook (i.e. useIsPortrait) to get that information
-
No tags attached.
Issue History
2023-03-01 08:25AugustoMauchNew Issue
2023-03-01 08:25AugustoMauchAssigned To => AugustoMauch
2023-03-01 08:25AugustoMauchTriggers an Emergency Pack => No
2023-03-01 08:26AugustoMauchStatusnew => scheduled
2023-03-01 12:35hgbotNote Added: 0147160
2023-03-02 14:47hgbotResolutionopen => fixed
2023-03-02 14:47hgbotStatusscheduled => closed
2023-03-02 14:47hgbotFixed in Version => 23Q2
2023-03-02 14:47hgbotNote Added: 0147236
2023-03-02 14:47hgbotNote Added: 0147237

Notes
(0147160)
hgbot   
2023-03-01 12:35   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/996 [^]
(0147236)
hgbot   
2023-03-02 14:47   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2 [^]
Changeset: 688cdaebe1293ab14ed473103d061910042f8a23
Author: Augusto Mauch <augusto.mauch@openbravo.com>
Date: 02-03-2023 13:46:43
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/commit/688cdaebe1293ab14ed473103d061910042f8a23 [^]

Fixes ISSUE-51733: Implements useIsPortrait

useIsPortrait is a hook that will allow components to rerender when the orientation of the device
is updated

---
A web-jspack/org.openbravo.core2/src/hooks/useIsPortrait/__test__/useIsPortrait.test.jsx
A web-jspack/org.openbravo.core2/src/hooks/useIsPortrait/index.js
A web-jspack/org.openbravo.core2/src/hooks/useIsPortrait/useIsPortrait.js
---
(0147237)
hgbot   
2023-03-02 14:47   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/996 [^]