Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace NodeEventType.SIBLING_ORDER_CHANGED with NodeEventType.CHILDREN_ORDER_CHANGED #16246

Merged
merged 2 commits into from
Sep 13, 2023

Conversation

minggo
Copy link
Contributor

@minggo minggo commented Sep 12, 2023

Re: #15479

Changelog


Continuous Integration

This pull request:

  • needs automatic test cases check.

    Manual trigger with @cocos-robot run test cases afterward.

  • does not change any runtime related code or build configuration

    If any reviewer thinks the CI checks are needed, please uncheck this option, then close and reopen the issue.


Compatibility Check

This pull request:

  • changes public API, and have ensured backward compatibility with deprecated features.
  • affects platform compatibility, e.g. system version, browser version, platform sdk version, platform toolchain, language version, hardware compatibility etc.
  • affects file structure of the build package or build configuration which requires user project upgrade.
  • introduces breaking changes, please list all changes, affected features and the scope of violation.

@minggo minggo requested a review from jareguo September 12, 2023 03:08
@@ -265,7 +265,7 @@ export enum SystemEventType {
* @en The event type for node's sibling order changed.
* @zh 当节点在兄弟节点中的顺序发生变化时触发的事件。
*
* @deprecated since v3.3, please use Node.EventType.SIBLING_ORDER_CHANGED instead
* @deprecated since v3.3, please use Node.EventType.CHILDREN_ORDER_CHANGED instead
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not since 3.3. Only 3.8.2 has this API.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SystemEventType. SIBLING_ORDER_CHANGED is deprecated since v3.3.

cocos/scene-graph/node-event.ts Outdated Show resolved Hide resolved
@github-actions
Copy link

github-actions bot commented Sep 12, 2023

Interface Check Report

! WARNING this pull request has changed these public interfaces:

@@ -26042,13 +26042,19 @@
          * @zh 节点 layer 改变时触发的事件。
          */
         LAYER_CHANGED = "layer-changed",
         /**
-         * @en The event type for node's sibling order changed.
-         * @zh 当节点在兄弟节点中的顺序发生变化时触发的事件。
+         * @en This event indicates that the order of child nodes has been changed.
+         * @zh 该事件表示子节点的排序发生了改变。
+         * @deprecated since v3.8.2 @en Please use `CHILDREN_ORDER_CHANGED`. @zh 请使用 `CHILDREN_ORDER_CHANGED`。
          */
         SIBLING_ORDER_CHANGED = "sibling-order-changed",
         /**
+         * @en This event indicates that the order of child nodes has been changed.
+         * @zh 该事件表示子节点的排序发生了改变。
+         */
+        CHILDREN_ORDER_CHANGED = "sibling-order-changed",
+        /**
          * @en
          * Note: This event is only emitted from the top most node whose active value did changed,
          * not including its child nodes.
          * @zh
@@ -32293,9 +32299,9 @@
         /**
          * @en The event type for node's sibling order changed.
          * @zh 当节点在兄弟节点中的顺序发生变化时触发的事件。
          *
-         * @deprecated since v3.3, please use Node.EventType.SIBLING_ORDER_CHANGED instead
+         * @deprecated since v3.3, please use Node.EventType.CHILDREN_ORDER_CHANGED instead
          */
         SIBLING_ORDER_CHANGED = "sibling-order-changed"
     }
     /**

@minggo minggo merged commit ea8ca11 into cocos:v3.8.2 Sep 13, 2023
10 checks passed
@minggo minggo deleted the fix_sibling_index_name branch September 13, 2023 06:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants