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

Updating debounce documentation #2858

Merged
merged 5 commits into from
Jun 28, 2020
Merged

Updating debounce documentation #2858

merged 5 commits into from
Jun 28, 2020

Conversation

carpben
Copy link
Contributor

@carpben carpben commented Jun 23, 2020

This PR tries to solve #2762 and updates the definition/documentation of the debounce function.

I'm not a native English speaker, so the wording might need to be adjusted. However, I think that talking in terms of sequence can make things easier to understand.

Copy link
Collaborator

@jgonggrijp jgonggrijp left a comment

Choose a reason for hiding this comment

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

Thanks for contributing! I think this is a really nice, correct and probably clearer way to describe _.debounce. Good job.

There are two very minor language adjustments that I've pointed out in the comment below.

There is one catch. Not to worry, we're still going to merge this, but we have to restructure the diff a bit first. Currently, at the master branch, the primary source code is not in underscore.js but in modules/index.js (this changed specifically in #2826). This is however to be outdated again very soon, when we merge #2849 which will move _.debounce to its own dedicated module. That PR is finished, I just didn't sit down to merge and announce it yet. I'll probably do that tomorrow.

So to get this on the master branch and into the next release, you have a couple of options. It's up to you which you prefer:

Co-authored-by: Julian Gonggrijp <dev@juliangonggrijp.com>
@carpben
Copy link
Contributor Author

carpben commented Jun 26, 2020

Thanks @jgonggrijp !

I've noticed that #2849 was merged, so I'd like to continue with option 2. However, I don't understand why npm install is required in this context - I don't need to run any code, just update the comment. Am I missing anything?

@jgonggrijp
Copy link
Collaborator

Welcome!

The devDependencies include husky, which will run pre- and post-commit hooks to ensure that monolithic builds and corresponding sourcemaps are created which accurately reflect the content of the modules. I should probably patch the CONTRIBUTING to reflect this.

@carpben
Copy link
Contributor Author

carpben commented Jun 26, 2020

@jgonggrijp, By mistake the two commits above were made with my company's user. Lol. Are we all set?

@jgonggrijp
Copy link
Collaborator

As far as I'm concerned, we're all set. Are you sure you're comfortable with your company account taking the credit, though? I wouldn't object to a force-push so you can rectify the commit attribution. See https://stackoverflow.com/questions/3042437/how-to-change-the-commit-author-for-one-specific-commit if you don't know how to change the attribution.

@carpben
Copy link
Contributor Author

carpben commented Jun 27, 2020

There are 3 commits on my private user. So if the difference is that there will be 3 commits on my user instead of 5 I really don't mind.
I tried git rebase -i as suggested in the SOf you sent, but it didn't work well on my device (windows, created many conflicts and didn't work as expected). I don't mind resetting current branch to the previous commit, and redoing those 2 commits.

@jgonggrijp
Copy link
Collaborator

So which route do you prefer? Merge as-is, or redoing those last two commits?

@carpben
Copy link
Contributor Author

carpben commented Jun 28, 2020

I prefer we merge as is.

@jgonggrijp jgonggrijp merged commit 31c1e26 into jashkenas:master Jun 28, 2020
@jgonggrijp
Copy link
Collaborator

Thanks for your contribution @carpben!

jgonggrijp added a commit to jgonggrijp/underscore that referenced this pull request Jun 28, 2020
jgonggrijp added a commit to jgonggrijp/underscore that referenced this pull request Aug 1, 2020
jgonggrijp added a commit to jgonggrijp/underscore that referenced this pull request Aug 1, 2020
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