-
-
Notifications
You must be signed in to change notification settings - Fork 824
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
dev/core#1116 - just rename local var activityTName #14999
dev/core#1116 - just rename local var activityTName #14999
Conversation
(Standard links)
|
@demeritcowboy well this one doesn't say 'do not merge yet' :-) I would vote for dropping the word humans - might be too sapien centric :-) (But actually I think label is enough - we don't have a problem with too many things being called 'labels' just with labels being misnamed as names too much) |
@eileenmcnaughton I'm not dead-set on "human" but I would like to qualify it with something to distinguish it from Name which means almost the same thing in english as Label to "normal" people. I'm trying to look at it from the point of view of future developers who aren't knee-deep familiar, and where I'm coming from is the list of things that lead to this situation which point to such confusion (e.g. https://lab.civicrm.org/dev/core/issues/1046#note_21303 or https://lab.civicrm.org/dev/core/issues/774#note_14531). I was also thinking that for name I'd use activityTypeMachineName - the word machine name is used elsewhere in the code in some places so there's some precedent. So "human" seems like the right complement to "machine". Is there concern about the length of the variable? Maybe Personally I find underscores make variable names more readable but that doesn't seem to be the standard in civi, e.g.
|
@demeritcowboy personally I favour long labels over abbreviations... I think abbreviations can be a lot less obvious that they seem at the time |
Ok. If "human" is the problem then what do you think about Or just let this sit for a bit if any other ideas come up. |
I'm + 1 on activityTypeDisplayLabel |
f7c1270
to
6630f8f
Compare
test this please |
Thanks @eileenmcnaughton. I'll rejig the next increment when I get home, which will be later in your timezone. |
Overview
This is a reworking of #14972 but in baby steps.
Before
Local variable called $activityTName is actually label and is really a plural (an array, although unless something is weird in the database it will only have one element). It isn't used outside this block.
After
Changed it to $activityTypeHumanLabels.
Technical Details
Comments