1# ArkUI Subsystem Changelog
2
3## cl.arkui.1 Change in Event Response Capability
4
5**Access Level**
6
7Open API
8
9**Reason for Change**
10
11The 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.
12
13**Change Impact**
14
15This 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.
16
17**Change Since**
18
19OpenHarmony SDK 4.1.5.1
20
21**Key API/Component Changes**
22
23APIs: **PanGesture** and **SwipeGesture**
24
25Components: **\<List>**, **\<Grid>**, **\<Scroll>**, and any other components that can be scrolled by using the mouse wheel
26
27**Adaptation Guide**
28
29Before change:
30
31No 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.
32
33Example 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.
34
35Example 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.
36
37Example 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.
38
39After change:
40
41When 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.
42
43When 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.
44
45When 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.
46
47In 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.
48
49Example 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.
50
51Example 2: Scrolling the mouse wheel or swiping vertically with two fingers on the touchpad can trigger the event.
52
53Example 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.
54## cl.arkui.2 Change in showActionMenu of UIContext
55
56**Access Level**
57
58Open API
59
60**Reason for Change**
61
62The **callback** parameter type of the **showActionMenu** API of UIContext was incorrectly defined. As a result, the callback function was unavailable.
63
64**Change Impact**
65
66This change is a non-compatible change and involves API changes. The original API with the incorrectly defined **callback** parameter is no longer available.
67
68**Change Since**
69
70OpenHarmony SDK 4.1.5.1
71
72**Key API/Component Changes**
73
74**showActionMenu** API of **UIContext**
75
76**Adaptation Guide**
77
78Before change:
79
80The 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.
81
82```ts
83import { PromptAction, UIInspector } from '@ohos.arkui.UIContext';
84import promptAction from '@ohos.promptAction';
85import { BusinessError } from '@ohos.base';
86
87let promptActionF: PromptAction = uiContext.getPromptAction();
88try {
89    promptActionF.showActionMenu({
90      title: 'Title Info',
91      buttons: [
92        {
93          text: 'item1',
94          color: '#666666'
95        },
96        {
97          text: 'item2',
98          color: '#000000'
99        }
100      ]
101    },  (data:promptAction.ActionMenuSuccessResponse))
102} catch (error) {
103  let message = (error as BusinessError).message;
104  let code = (error as BusinessError).code;
105  console.error(`showActionMenu args error code is ${code}, message is ${message}`);
106};
107```
108
109After change:
110
111The data type of the **callback** parameter is AsyncCallback&lt;[promptAction.ActionMenuSuccessResponse](../../../application-dev/reference/apis/js-apis-promptAction.md#actionmenusuccessresponse)&gt, which indicates a callback method. If AsyncCallback&lt;[promptAction.ActionMenuSuccessResponse](../../../application-dev/reference/apis/js-apis-promptAction.md#actionmenusuccessresponse)&gt; is passed in, the API works properly.
112
113```ts
114import { PromptAction, UIInspector } from '@ohos.arkui.UIContext';
115import promptAction from '@ohos.promptAction';
116import { BusinessError } from '@ohos.base';
117
118let promptActionF: PromptAction = uiContext.getPromptAction();
119try {
120    promptActionF.showActionMenu({
121      title: 'Title Info',
122      buttons: [
123        {
124          text: 'item1',
125          color: '#666666'
126        },
127        {
128          text: 'item2',
129          color: '#000000'
130        }
131      ]
132    }, (err:BusinessError, data:promptAction.ActionMenuSuccessResponse) => {
133        if (err) {
134        console.info('showDialog err: ' + err);
135        return;
136        }
137        console.info('showDialog success callback, click button: ' + data.index);
138    });
139} catch (error) {
140    let message = (error as BusinessError).message;
141    let code = (error as BusinessError).code;
142    console.error(`showActionMenu args error code is ${code}, message is ${message}`);
143};
144```
145## cl.arkui.3 Change in Calculating the Size of the \<RelativeContainer> Component
146
147**Access Level**
148
149Open API
150
151**Reason for Change**
152
153If 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.
154
155**Change Impact**
156
157Before 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.
158
159**Change Since**
160
161OpenHarmony SDK 4.1.5.1 (API version 11 and later)
162
163**Key API/Component Changes**
164
165\<RelativeContainer>
166