FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

5144 rename throttle component changed by diarmidmackenzie · Pull Request #5151 · aframevr/aframe · GitHub

5144 rename throttle component changed - #5151

Merged
dmarcos merged 4 commits into
aframevr:masterfrom
diarmidmackenzie:5144-rename-throttleComponentChanged
Nov 18, 2022
Merged

5144 rename throttle component changed#5151
dmarcos merged 4 commits into
aframevr:masterfrom
diarmidmackenzie:5144-rename-throttleComponentChanged

Conversation

Copy link
Copy Markdown
Contributor

Description:

PR as per #5144

Changes proposed:

  • name throttleComponentChanged -> throttleLeadingAndTrailing
  • leave throttleComponentChanged utility function for 1.3.0 back-compatibility
  • add documentation for throttleLeadingAndTrailing in utils API docs.

vincentfretin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This looks good to me.

Comment thread src/utils/index.js Outdated
* Identical to throttleLeadingAndTrailing.
* Exists for back-compatibility with 1.3.0.
*/
module.exports.throttleComponentChanged = module.exports.throttleLeadingAndTrailing;

dmarcos Nov 15, 2022
edited
Loading

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I think we can just rename. Don't think many were relying on this. We can add a deprecation in next release notes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

OK - removed this. What needs to happen to make sure this gets tracked for the release note?

Comment thread docs/core/utils.md

A context such as `this` can be provided to handle function binding for convenience.

The same as [lodash's`throttle`][lodash], with `leading` and `trailing` options both set to `true`

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

wonder if this reference is a liability long term in case lodash API changes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Maybe, but the existing docs already reference loadash throttle (the same link)

See: https://aframe.io/docs/1.3.0/core/utils.html#aframe-utils-throttle-function-minimuminterval-optionalcontext

This doesn't make the situation any worse, I think.

dmarcos commented Nov 18, 2022

Copy link
Copy Markdown
Member

Thank you!

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL