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

[scroll-view] call _processDeltaMove() in update() #16541

Merged
merged 1 commit into from
Nov 29, 2023
Merged

Conversation

finscn
Copy link
Contributor

@finscn finscn commented Nov 27, 2023

#16131 在 3.8.2分支上重新提交一次

call _processDeltaMove() in update()

it should not call run _processDeltaMove() in every touchmove event , it will take bad performance.

Re: #

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.

Re: #

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.

call `_processDeltaMove()` in `update()`

it should not call  run _processDeltaMove()  in every touchmove event ,  it will take bad performance.


Re: #

### 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](https://github.com/cocos/cocos-engine/blob/v3.5.0/docs/contribution/deprecated-features.md).
* [ ] 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.

<!-- Note: Makes sure these boxes are checked before submitting your PR - thank you!
- [ ] Your pull request title is using English, it's precise and appropriate.
- [ ] If your pull request has gone "stale", you should **rebase** your work on top of the latest version of the upstream branch.
- [ ] If your commit history is full of small, unimportant commits (such as "fix pep8" or "update tests"), **squash** your commits down to a few, or one, discreet changesets before submitting a pull request.
- [ ] Document new code with comments in source code based on API docs
- [ ] Make sure any runtime log information in `log` , `error` or `new Error('')` has been moved into `EngineErrorMap.md` with an ID, and use `logID(id)` or `new Error(getError(id))` instead.
- To official teams:
  - [ ] Check that your PR is following our [guides](https://github.com/cocos/3d-tasks/blob/master/workflows/readme.md)
-->
Copy link

Interface Check Report

! WARNING this pull request has changed these public interfaces:

@@ -55536,8 +55536,9 @@
         protected _scrollEventEmitMask: number;
         protected _isBouncing: boolean;
         protected _contentPos: math.Vec3;
         protected _deltaPos: math.Vec3;
+        protected _deltaAmount: math.Vec3;
         protected _hoverIn: __private._cocos_ui_scroll_view__XrhoverType;
         /**
          * @en
          * Scroll the content to the bottom boundary of ScrollView.
@@ -68855,8 +68856,16 @@
          */
         export enum _cocos_ui_scroll_view__EventType {
             /**
              * @en
+             * It means an invalid event type or "default empty value" of EventType.
+             *
+             * @zh
+             * 代表无效事件, 或者EventType的默认空值。
+             */
+            NONE = "",
+            /**
+             * @en
              * The event emitted when ScrollView scroll to the top boundary of inner container.
              *
              * @zh
              * 滚动视图滚动到顶部边界事件。

@finscn
Copy link
Contributor Author

finscn commented Nov 27, 2023

@qiuguohu , 这个可以了, 只有eslint 不一致.

@minggo
Copy link
Contributor

minggo commented Nov 28, 2023

Please fix eslint error as possible.

@finscn
Copy link
Contributor Author

finscn commented Nov 28, 2023

Please fix eslint error as possible.

之前一直有和你们的同事在交流. 目前你们的eslint规则问题挺多的. 按照你们的eslint规则来 代码会很混乱.
而且用你们的eslint 扫描一下cocos目前的代码 , 你会发现 上千个错误.

所以关于eslint的问题 建议等以后你们有一个稳定的 好用的eslint后, 在来统一处理比较好.
现阶段要求pr遵循一个并不好eslint 我觉得不太合适.

另外 我一直有持续更新和维护一个关于eslint的pr, 如果感兴趣 欢迎一起来讨论.
#16118

@minggo minggo merged commit 3c6a6fb into cocos:v3.8.2 Nov 29, 2023
9 of 10 checks passed
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.

3 participants