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

Illustrative function name #561

Merged
merged 1 commit into from
Jul 13, 2024
Merged

Illustrative function name #561

merged 1 commit into from
Jul 13, 2024

Conversation

s-c-p
Copy link
Contributor

@s-c-p s-c-p commented May 11, 2024

updateActiveTab has ambiguous meaning, most prominent of which doesn't mean what we are actually trying to do.

Description

updateActiveTab has ambiguous meaning, most prominent interpretation of which is not what we are actually doing in the function body.

Motivation

I know JS as server-side engineer (we have very pedantic rules on where we are allowed to change state), in this succinct but cool sample code, the flow-of-control is slightly confusing (if we don't know browser event loop) and I guess descriptive function names would reduced the confusion for new comers, the author had context and experience, but for newbies updateActiveTab would mean perhaps we are modifying something on page. Reading function def would clear the misconception, but add mental burden.

Additional details

Related issues and pull requests

updateActiveTab has ambiguous meaning, most prominent of which doesn't mean what we are actually trying to do.
Copy link

It looks like this is your first pull request. 🎉 Thank you for your contribution! One of the project maintainers will triage and assign the pull request for review. We appreciate your patience. To safeguard the health of the project, please take a moment to read our code of conduct.

@github-actions github-actions bot added the idle Issues and pull requests with no activity for three months. label Jun 10, 2024
Copy link
Contributor

@dotproto dotproto left a comment

Choose a reason for hiding this comment

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

Seems like a good change. Thanks, @s-c-p!

@dotproto dotproto merged commit 711f647 into mdn:main Jul 13, 2024
1 check passed
Copy link

Congratulations on your first merged pull request. 🎉 Thank you for your contribution! Did you know we have a project board with high-impact contribution opportunities? We look forward to your next contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idle Issues and pull requests with no activity for three months.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants