-
Notifications
You must be signed in to change notification settings - Fork 264
toggle: renamed toggle(showOrHide) to toggle(doShow) #654
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
Conversation
@@ -24,7 +24,7 @@ | |||
</signature> | |||
<signature> | |||
<added>1.3</added> | |||
<argument name="showOrHide" type="Boolean"> | |||
<argument name="doShow" type="Boolean"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure that doShow
does this any better... How about setShown
?
Also maybe add a description in the <desc>
tag specifying true
will show and false
will hide?
Thanks for the submission! Sorry that my |
To make it clear that passing true shows and passing false hides. Otherwise if you take showOrHide at its word, it would do nothing if you pass false and would call the regular toggle() if you pass true ;-)
Glad if it clears things up. At least for me ;-) |
👍 Looks great, thanks for the quick update! |
IMHO |
How about |
I think the change to the description is important either way, what we call it doesn't matter that much to me, any name for that parameter is awkward. |
👍 for leaving it as is |
The description should be changed in any case. Currently if you read it you might make the right guess, but you can't infer the meaning of the parameter from the documentation without reading the code snippet further down. I think all alternates are a little awkward, but faster to understand than |
I like it as you have it for now. Going to merge it. |
Too bad. I agree that the description is better, but |
I agree with @kswedberg. It wasn't an urgent fix, so we could have discussed a bit more. |
I know we went back and forth on it when documenting it originally I think
|
Also @AurelioDeRosa I wasn't ignoring your "I liked it the old way" comment before the merge, I just didn't read it until after I had merged 😦 sorry |
Don't worry @gnarf, I wasn't complaining :) |
To make it clear that passing true shows and passing false hides. Otherwise if you take showOrHide at its word, it would do nothing if you pass false and would call the regular toggle() if you pass true ;-)