The following APIs of the **xcomponent** component of the ArkUI subsystem are changed:
Changed the following APIs of the **xcomponent** component of the ArkUI subsystem:
-**getXComponentSurfaceId** and **setXComponentSurfaceSize**: The **@systemapi** tag is removed.
-**getXComponentSurfaceId**, **getXComponentContext**, and **setXComponentSurfaceSize**: The return value types are specified.
-**getXComponentSurfaceId** and **setXComponentSurfaceSize**: Removed the **@systemapi** tag.
-**getXComponentSurfaceId**, **getXComponentContext**, and **setXComponentSurfaceSize**: Specified return value types.
You need to adapt your applications based on the following information.
You need to adapt your application based on the following information.
**Change Impacts**
**Change Impact**
Released JS APIs are affected. The application needs to adapt these APIs so that it can be properly compiled in the SDK environment of the new version.
...
...
@@ -27,35 +27,35 @@ Startup rules for different scenarios are as follows:
Adaptions to be made:
-**getXComponentSurfaceId**
-OpenHarmony 3.2 Beta3 rules:
-In OpenHarmony 3.2 Beta3:
- System API
- No specified return value
-OpenHarmony 3.2 Beta4 rules:
-In OpenHarmony 3.2 Beta4:
- Public API
- Return value type specified as string
- You need to process the return value as a string.
-**setXComponentSurfaceSize**
-OpenHarmony 3.2 Beta3 rules:
-In OpenHarmony 3.2 Beta3:
- System API
- No specified return value
-OpenHarmony 3.2 Beta4 rules:
-In OpenHarmony 3.2 Beta4:
- Public API
- Return value type specified as void
- You need to process the return value as a void.
-**getXComponentContext**
-OpenHarmony 3.2 Beta3 rules:
-In OpenHarmony 3.2 Beta3:
- No specified return value
-OpenHarmony 3.2 Beta4 rules:
-In OpenHarmony 3.2 Beta4:
- Return value type specified as object
- You need to process the return value as an object.
## cl.arkui.2 Change of Styles of Popup Component and APIs
The styles of the **alertDialog**, **actionSheet**, and **customDialog** components, as well as the **prompt** and **promptAction** APIs were changed. Specifically speaking:
The popup background blurring effect is added to **promptAction.showDialog**, **promptAction.showActionMenu**, **alertDialog**, **actionSheet**, and **customDialog**.
**Change Impacts**
**Change Impact**
The popup background blurring effect is set by default.
...
...
@@ -70,9 +70,10 @@ No adaptation is required.
## cl.arkui.3 Supplementation of the Initialization Mode and Restriction Verification Scenarios of Custom Components' Member Variables
For details, see [Restrictions and Extensions](../../../application-dev/quick-start/arkts-restrictions-and-extensions.md).
Added verification for scenarios previously left out concerning initialization of custom components' member variables.
**Change Impacts**
**Change Impact**
If custom components' member variables are initialized or assigned with values not according to the document specifications, an error will be reported during compilation.
...
...
@@ -86,10 +87,10 @@ Make modification according to specifications in the above document.
## cl.arkui.4 Supplementation of Verification Scenarios of Value Assignment Restrictions on Member Variables of Custom Parent Components and Child Components
For details, see [Restrictions and Extensions](../../../application-dev/quick-start/arkts-restrictions-and-extensions.md).
Added verification for scenarios previously left out concerning value assignment of member variables of custom parent components and child components.
**Change Impacts**
**Change Impact**
If member variables of the parent component or child component are initialized not according to the document specifications, an error will be reported during compilation.
...
...
@@ -101,14 +102,13 @@ N/A
Make modification according to specifications in the above document, using other decorators or normal member variables for value assignment.
## cl.arkui.5 Supplementation of Verification for a Single Subcomponent
Verification for a single subcomponent is enabled for the following components: **Button**, **FlowItem**, **GridItem**, **GridCol**, **ListItem**, **Navigator**, **Refresh**, **RichText**, **ScrollBar**, **StepperItem**, and **TabContent**.
## cl.arkui.5 Supplementation of Verification for a Single Child Component
Added verification for a single child component for the following components: **Button**, **FlowItem**, **GridItem**, **GridCol**, **ListItem**, **Navigator**, **Refresh**, **RichText**, **ScrollBar**, **StepperItem**, and **TabContent**.
**Change Impacts**
**Change Impact**
If one of the preceding components contains more than one subcomponent, an error will be reported during compilation.
If one of the preceding components contains more than one child component, an error will be reported during compilation.
**Key API/Component Changes**
...
...
@@ -123,4 +123,4 @@ RichText('RichText') {
**Adaptation Guide**
Make modification based on the error message. Make sure that the specified component contains only one subcomponent.
Make modification based on the error message. Make sure that the specified component contains only one child component.
Compared with earlier versions, OpenHarmony 4.0.7.3 has the following API changes in its web subsystem:
## cl.web.1 New Input Parameter Type of the setResponseData API
Added the input parameter type **Resource** for the **setResponseData** API.
**Change Impact**
In the scenario where a HAP file is not decompressed, the file path in the HAP does not exist. Under this scenario, to access resources in the HAP file, you must use the input parameter **data:Resource** instead of **data:number**.
**Key API/Component Changes**
- Involved APIs:
setResponseData
- Before change:
```ts
setResponseData(data:string|number)
```
- After change:
```ts
setResponseData(data:string|number|Resource)
```
**Adaptation Guide**
When a HAP file is decompressed, open the hold the FD of the target resource file, and then transfer the resource response data to the kernel through **setResponseData(data:number)**.
When a HAP file is decompressed, the file path in the HAP does not exist. In this case, transfer the resource response data to the kernel through **setResponseData(data:Resource)**.
## cl.arkui.1 Change in the \<Button> Component Hover Effect
The hover effect of the **\<Button>** component is changed from scale-up by 100% to 105% to overlay of 0% to 5% opacity. The pressed effect of the component is changed to overlay of 5% to 10% opacity.
**Change Impact**
The visual effect of the **\<Button>** is affected.
## cl.arkui.2 Change in the Multi-line Text Alignment Mode of Toasts
Changed the alignment mode of multi-line text in toasts from center-aligned to left-aligned.
| Multi-language runtime subsystem| Verification enhanced | [New alarms are added and existing alarms are enhanced along with the upgrade from LLVM 12 to LLVM 15](changelogs-arkcompiler.md)|
| Multi-language runtime subsystem| Verification enhanced | [LLVM emu-tls is changed. If you use both LLVM 12 and LLVM 15, the emu-tls symbol cannot be found in libc++.so.](changelogs-arkcompiler.md)|
| Multi-language runtime subsystem| Verification enhanced | [New features and internal interface changes in the official release of LLVM 15 are inherited.](changelogs-arkcompiler.md)|
| ArkUI | Default value changed | [The default state of the scrollbar in the \<List> and \<Gird> components is changed.](changelogs-arkui.md) |
| ArkUI | UX changed | [The hover effect of the \<Button> component is changed from scale-up by 100% to 105% to overlay of 0% to 5% opacity.](changelogs-arkui.md)|
| ArkUI | UX changed | [The alignment mode of multi-line text in toasts is changed from center-aligned to left-aligned.](changelogs-arkui.md)|
| Bundle management subsystem | Mechanism changed | [The HAP is no longer decompressed during HAP installation.](changelogs-bundlemanager.md)|
| Web | Input parameter added | [The input parameter type Resource is added for the setResponseData API.](changelogs-web.md) |
| Resource scheduler subsystem | Behavior changed | [The reminder agent allows you to customize buttons for system applications. Clicking a custom button will redirect you to the specified application page.](changelogs-resourceschedule.md)|
Fixed the issue where child components in the [\<Stack>](../../../application-dev/reference/arkui-ts/ts-container-stack.md) container does not follow the **alignContent** settings when the child components stretch beyond the container.
Before: Child components are not arranged based on **alignContent:Alignment.TopEnd**.
![stack](figures/stack_before.jpg)
After: Child components are arranged based on **alignContent:Alignment.TopEnd**.
![stack](figures/stack_after.jpg)
**Change Impact**
1. When the **\<Stack>** component contains a child component larger than itself, adaptation to the application is required.
2. The previous workaround – **Offset** and **translate** settings for the child component – must be removed.
**Adaptation Guide**
Remove the **Offset** and **translate** settings for the child component.
## cl.arkui.3 Change in the \<Button> Component Hover Effect
Changed the hover effect of the **\<Button>** component from scale-up by 100% to 105% to overlay of 0% to 5% opacity. Changed the pressed effect of the component to overlay of 5% to 10% opacity.
**Change Impact**
The visual effect of the **\<Button>** is affected.
Compared with earlier versions, OpenHarmony 4.0.7.3 has the following API changes in its web subsystem:
## cl.web.1 New Input Parameter Type of the setResponseData API
Added the input parameter type **Resource** for the **setResponseData** API.
**Change Impact**
In the scenario where a HAP file is not decompressed, the file path in the HAP does not exist. Under this scenario, to access resources in the HAP file, you must use the input parameter **data:Resource** instead of **data:number**.
**Key API/Component Changes**
- Involved APIs:
setResponseData
- Before change:
```
setResponseData(data: string | number)
```
- After change:
```
setResponseData(data: string | number | Resource)
```
**Adaptation Guide**
When a HAP file is decompressed, open the hold the FD of the target resource file, and then transfer the resource response data to the kernel through **setResponseData(data:number)**.
```
// xxx.ets
import web_webview from '@ohos.web.webview'
import fileio from '@ohos.fileio';
@Entry
@Component
struct WebComponent {
controller: web_webview.WebviewController = new web_webview.WebviewController()
responseweb: WebResourceResponse = new WebResourceResponse()
// '/xxx/.../test.html' is the local path of the file.
// @ts-ignore
let fd = fileio.openSync('/xxx/.../test.html', 0o102, 0o666)
this.responseweb.setResponseData(fd)
//// fd scheme --end
return this.responseweb
})
}
}
}
```
When a HAP file is decompressed, the file path in the HAP does not exist. In this case, transfer the resource response data to the kernel through **setResponseData(data:Resource)**.
```
// xxx.ets
import web_webview from '@ohos.web.webview'
@Entry
@Component
struct WebComponent {
controller: web_webview.WebviewController = new web_webview.WebviewController()
responseweb: WebResourceResponse = new WebResourceResponse()