1e41f4b71Sopenharmony_ci# ArkUI Subsystem Changelog 2e41f4b71Sopenharmony_ci 3e41f4b71Sopenharmony_ci## cl.arkui.1 Change in Event Response Capability 4e41f4b71Sopenharmony_ci 5e41f4b71Sopenharmony_ci**Access Level** 6e41f4b71Sopenharmony_ci 7e41f4b71Sopenharmony_ciOpen API 8e41f4b71Sopenharmony_ci 9e41f4b71Sopenharmony_ci**Reason for Change** 10e41f4b71Sopenharmony_ci 11e41f4b71Sopenharmony_ciThe response of the mouse wheel and the touchpad to the swipe and pan gestures is improved, and the conflict between swipe events in different directions is resolved. 12e41f4b71Sopenharmony_ci 13e41f4b71Sopenharmony_ci**Change Impact** 14e41f4b71Sopenharmony_ci 15e41f4b71Sopenharmony_ciThis change is a compatible change and does not involve API changes. However, due to changes in the response logic, response to the swipe and scroll events may be affected. 16e41f4b71Sopenharmony_ci 17e41f4b71Sopenharmony_ci**Change Since** 18e41f4b71Sopenharmony_ci 19e41f4b71Sopenharmony_ciOpenHarmony SDK 4.1.5.1 20e41f4b71Sopenharmony_ci 21e41f4b71Sopenharmony_ci**Key API/Component Changes** 22e41f4b71Sopenharmony_ci 23e41f4b71Sopenharmony_ciAPIs: **PanGesture** and **SwipeGesture** 24e41f4b71Sopenharmony_ci 25e41f4b71Sopenharmony_ciComponents: **\<List>**, **\<Grid>**, **\<Scroll>**, and any other components that can be scrolled by using the mouse wheel 26e41f4b71Sopenharmony_ci 27e41f4b71Sopenharmony_ci**Adaptation Guide** 28e41f4b71Sopenharmony_ci 29e41f4b71Sopenharmony_ciBefore change: 30e41f4b71Sopenharmony_ci 31e41f4b71Sopenharmony_ciNo matter how many swipe events occur in the area where the mouse pointer is located, the mouse wheel and the touchpad's two-finger functionality can respond only to the first swipe event bound to the first child node. If this swipe event is in the horizontal direction, it can be triggered with the mouse wheel or by swiping with two fingers horizontally or vertically on the touchpad. If this swipe event is in the vertical direction, it can be triggered with the mouse wheel or by swiping with two fingers vertically on the touchpad. 32e41f4b71Sopenharmony_ci 33e41f4b71Sopenharmony_ciExample 1: A horizontal swipe event is bound to or built in a component. When the mouse pointer is located in the component area, scrolling the mouse wheel or swiping with two fingers horizontally or vertically on the touchpad can both trigger the event. 34e41f4b71Sopenharmony_ci 35e41f4b71Sopenharmony_ciExample 2: A vertical swipe event is bound to or built in a component. When the mouse pointer is located in the component area, scrolling the mouse wheel or swiping with two fingers vertically on the touchpad can both trigger the event. 36e41f4b71Sopenharmony_ci 37e41f4b71Sopenharmony_ciExample 3: A vertical swipe event is bound to or built in the parent component, and a horizontal swipe event is bound to or built in the child component. When the mouse pointer is in the area of the child component (also in the area of the parent component), operations with the mouse wheel and the touchpad trigger the event on the child component, but not on the parent component. 38e41f4b71Sopenharmony_ci 39e41f4b71Sopenharmony_ciAfter change: 40e41f4b71Sopenharmony_ci 41e41f4b71Sopenharmony_ciWhen there is only a horizontal swipe event in the area in which the mouse pointer is located, the first swipe event on the first child node may be triggered by with the mouse wheel, Shift+mouse wheel, or two fingers swiping horizontally on the touchpad. 42e41f4b71Sopenharmony_ci 43e41f4b71Sopenharmony_ciWhen there is only a vertical swipe event in the area in which the mouse pointer is located, the first swipe event on the first child node may be triggered by with the mouse wheel or two fingers swiping vertically on the touchpad. 44e41f4b71Sopenharmony_ci 45e41f4b71Sopenharmony_ciWhen there is a horizontal swipe event and a vertical swipe event in the area in which the mouse pointer is located, the first vertical swipe event on the first child node may be triggered with the mouse wheel or two fingers swiping vertically on the touchpad, while first horizontal swipe event may be triggered with Shift+mouse wheel or two fingers swiping horizontally on the touchpad. 46e41f4b71Sopenharmony_ci 47e41f4b71Sopenharmony_ciIn all the preceding scenarios, the two-finger operation on the touchpad does not the Shift button. This means that, pressing the Shift button does not affect event response. 48e41f4b71Sopenharmony_ci 49e41f4b71Sopenharmony_ciExample 1: Scrolling the mouse wheel, scrolling the mouse wheel while pressing Shift, or swiping horizontally with two fingers on the touchpad can trigger the event. 50e41f4b71Sopenharmony_ci 51e41f4b71Sopenharmony_ciExample 2: Scrolling the mouse wheel or swiping vertically with two fingers on the touchpad can trigger the event. 52e41f4b71Sopenharmony_ci 53e41f4b71Sopenharmony_ciExample 3: Scrolling the mouse wheel or swiping vertically with two fingers on the touchpad can trigger the event on the parent component. Scrolling the mouse wheel while pressing Shift or swiping horizontally with two fingers on the touchpad can trigger the event on the child component. 54e41f4b71Sopenharmony_ci## cl.arkui.2 Change in showActionMenu of UIContext 55e41f4b71Sopenharmony_ci 56e41f4b71Sopenharmony_ci**Access Level** 57e41f4b71Sopenharmony_ci 58e41f4b71Sopenharmony_ciOpen API 59e41f4b71Sopenharmony_ci 60e41f4b71Sopenharmony_ci**Reason for Change** 61e41f4b71Sopenharmony_ci 62e41f4b71Sopenharmony_ciThe **callback** parameter type of the **showActionMenu** API of UIContext was incorrectly defined. As a result, the callback function was unavailable. 63e41f4b71Sopenharmony_ci 64e41f4b71Sopenharmony_ci**Change Impact** 65e41f4b71Sopenharmony_ci 66e41f4b71Sopenharmony_ciThis change is a non-compatible change and involves API changes. The original API with the incorrectly defined **callback** parameter is no longer available. 67e41f4b71Sopenharmony_ci 68e41f4b71Sopenharmony_ci**Change Since** 69e41f4b71Sopenharmony_ci 70e41f4b71Sopenharmony_ciOpenHarmony SDK 4.1.5.1 71e41f4b71Sopenharmony_ci 72e41f4b71Sopenharmony_ci**Key API/Component Changes** 73e41f4b71Sopenharmony_ci 74e41f4b71Sopenharmony_ci**showActionMenu** API of **UIContext** 75e41f4b71Sopenharmony_ci 76e41f4b71Sopenharmony_ci**Adaptation Guide** 77e41f4b71Sopenharmony_ci 78e41f4b71Sopenharmony_ciBefore change: 79e41f4b71Sopenharmony_ci 80e41f4b71Sopenharmony_ciThe data type of the **callback** parameter is **promptAction.ActionMenuSuccessResponse**, which is a data object. If **promptAction.ActionMenuSuccessResponse** is passed in according to the API definition, the API does not work. 81e41f4b71Sopenharmony_ci 82e41f4b71Sopenharmony_ci```ts 83e41f4b71Sopenharmony_ciimport { PromptAction, UIInspector } from '@ohos.arkui.UIContext'; 84e41f4b71Sopenharmony_ciimport promptAction from '@ohos.promptAction'; 85e41f4b71Sopenharmony_ciimport { BusinessError } from '@ohos.base'; 86e41f4b71Sopenharmony_ci 87e41f4b71Sopenharmony_cilet promptActionF: PromptAction = uiContext.getPromptAction(); 88e41f4b71Sopenharmony_citry { 89e41f4b71Sopenharmony_ci promptActionF.showActionMenu({ 90e41f4b71Sopenharmony_ci title: 'Title Info', 91e41f4b71Sopenharmony_ci buttons: [ 92e41f4b71Sopenharmony_ci { 93e41f4b71Sopenharmony_ci text: 'item1', 94e41f4b71Sopenharmony_ci color: '#666666' 95e41f4b71Sopenharmony_ci }, 96e41f4b71Sopenharmony_ci { 97e41f4b71Sopenharmony_ci text: 'item2', 98e41f4b71Sopenharmony_ci color: '#000000' 99e41f4b71Sopenharmony_ci } 100e41f4b71Sopenharmony_ci ] 101e41f4b71Sopenharmony_ci }, (data:promptAction.ActionMenuSuccessResponse)) 102e41f4b71Sopenharmony_ci} catch (error) { 103e41f4b71Sopenharmony_ci let message = (error as BusinessError).message; 104e41f4b71Sopenharmony_ci let code = (error as BusinessError).code; 105e41f4b71Sopenharmony_ci console.error(`showActionMenu args error code is ${code}, message is ${message}`); 106e41f4b71Sopenharmony_ci}; 107e41f4b71Sopenharmony_ci``` 108e41f4b71Sopenharmony_ci 109e41f4b71Sopenharmony_ciAfter change: 110e41f4b71Sopenharmony_ci 111e41f4b71Sopenharmony_ciThe data type of the **callback** parameter is AsyncCallback<[promptAction.ActionMenuSuccessResponse](../../../application-dev/reference/apis/js-apis-promptAction.md#actionmenusuccessresponse)>, which indicates a callback method. If AsyncCallback<[promptAction.ActionMenuSuccessResponse](../../../application-dev/reference/apis/js-apis-promptAction.md#actionmenusuccessresponse)> is passed in, the API works properly. 112e41f4b71Sopenharmony_ci 113e41f4b71Sopenharmony_ci```ts 114e41f4b71Sopenharmony_ciimport { PromptAction, UIInspector } from '@ohos.arkui.UIContext'; 115e41f4b71Sopenharmony_ciimport promptAction from '@ohos.promptAction'; 116e41f4b71Sopenharmony_ciimport { BusinessError } from '@ohos.base'; 117e41f4b71Sopenharmony_ci 118e41f4b71Sopenharmony_cilet promptActionF: PromptAction = uiContext.getPromptAction(); 119e41f4b71Sopenharmony_citry { 120e41f4b71Sopenharmony_ci promptActionF.showActionMenu({ 121e41f4b71Sopenharmony_ci title: 'Title Info', 122e41f4b71Sopenharmony_ci buttons: [ 123e41f4b71Sopenharmony_ci { 124e41f4b71Sopenharmony_ci text: 'item1', 125e41f4b71Sopenharmony_ci color: '#666666' 126e41f4b71Sopenharmony_ci }, 127e41f4b71Sopenharmony_ci { 128e41f4b71Sopenharmony_ci text: 'item2', 129e41f4b71Sopenharmony_ci color: '#000000' 130e41f4b71Sopenharmony_ci } 131e41f4b71Sopenharmony_ci ] 132e41f4b71Sopenharmony_ci }, (err:BusinessError, data:promptAction.ActionMenuSuccessResponse) => { 133e41f4b71Sopenharmony_ci if (err) { 134e41f4b71Sopenharmony_ci console.info('showDialog err: ' + err); 135e41f4b71Sopenharmony_ci return; 136e41f4b71Sopenharmony_ci } 137e41f4b71Sopenharmony_ci console.info('showDialog success callback, click button: ' + data.index); 138e41f4b71Sopenharmony_ci }); 139e41f4b71Sopenharmony_ci} catch (error) { 140e41f4b71Sopenharmony_ci let message = (error as BusinessError).message; 141e41f4b71Sopenharmony_ci let code = (error as BusinessError).code; 142e41f4b71Sopenharmony_ci console.error(`showActionMenu args error code is ${code}, message is ${message}`); 143e41f4b71Sopenharmony_ci}; 144e41f4b71Sopenharmony_ci``` 145e41f4b71Sopenharmony_ci## cl.arkui.3 Change in Calculating the Size of the \<RelativeContainer> Component 146e41f4b71Sopenharmony_ci 147e41f4b71Sopenharmony_ci**Access Level** 148e41f4b71Sopenharmony_ci 149e41f4b71Sopenharmony_ciOpen API 150e41f4b71Sopenharmony_ci 151e41f4b71Sopenharmony_ci**Reason for Change** 152e41f4b71Sopenharmony_ci 153e41f4b71Sopenharmony_ciIf both the component size and size constraints are set, the component size set is preferentially used. Since API version 11, the **bias** attribute is added to set the offset of the component under constraints. 154e41f4b71Sopenharmony_ci 155e41f4b71Sopenharmony_ci**Change Impact** 156e41f4b71Sopenharmony_ci 157e41f4b71Sopenharmony_ciBefore change, if both the component size and size constraints are set, the size constraints are preferentially used to determine the component size.<br>After change, the component size set is preferentially used. 158e41f4b71Sopenharmony_ci 159e41f4b71Sopenharmony_ci**Change Since** 160e41f4b71Sopenharmony_ci 161e41f4b71Sopenharmony_ciOpenHarmony SDK 4.1.5.1 (API version 11 and later) 162e41f4b71Sopenharmony_ci 163e41f4b71Sopenharmony_ci**Key API/Component Changes** 164e41f4b71Sopenharmony_ci 165e41f4b71Sopenharmony_ci\<RelativeContainer> 166