joomla-cms icon indicating copy to clipboard operation
joomla-cms copied to clipboard

Renaming the name of the controlClass attribute for form fields

Open korenevskiy opened this issue 4 years ago • 6 comments

I apologize. I believe that the name of the newly added attribute for the fields is not quite correct. Calling it the parent class. This is logical, but it is not clear which parent it refers to. At first glance, you might think that this is the parent of the field. But this is not the case. After thinking about it, you might think that this is the parent of the control, but this is also not the case. Since the control itself is the target. img-2021-03-09-13-35-32 https://github.com/joomla/joomla-cms/pull/32488 The author @ciar4n of the attribute agreed to replace the attribute name.

korenevskiy avatar Mar 11 '21 11:03 korenevskiy

The author @ciar4n of the attribute agreed to replace the attribute name.

Not exactly true 😄 ... I just said I wasn't going to apply your suggestion to a PR that had already gone to RTC.

ciar4n avatar Mar 11 '21 17:03 ciar4n

The author @ciar4n of the attribute agreed to replace the attribute name.

Not exactly true 😄 ... I just said I wasn't going to apply your suggestion to a PR that had already gone to RTC.

but you put a thumbs-up emoji there. 👍

korenevskiy avatar Mar 11 '21 19:03 korenevskiy

I have tested this item :white_check_mark: successfully on 6901dbc973018dabe98c9eaa4deb66f13419552d

I looked at the diff, applied the patch and searched for parentclass and controlclass. I think it is OK.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32645.

ceford avatar Mar 12 '21 10:03 ceford

I think if you dislike the parentclass an alternative logical value could be containerclass and not controlclass.

dgrammatiko avatar Mar 12 '21 19:03 dgrammatiko

I think if you dislike the parentclass an alternative logical value could be containerclass and not controlclass.

@dgrammatiko I agree with you. I think Container class is an equivalent sentence. But there is one thing. Let's look at the XML configuration. Field <field name= "title" type= "text" label= "Title"/> Please tell me this element is primarily a control, container or field? Perhaps it also makes sense to consider the name fieldclass I think choosing a name for this class is a very important thing, even if Joomla 5 comes out, the name of the attributes will remain for centuries. We must choose the name of this attribute responsibly. Where to conduct a survey among developers to select controlclass VS containerclass . containerclass a good attribute name. and caseclass another option.

korenevskiy avatar Mar 12 '21 22:03 korenevskiy

This pull request has automatically rebased to 4.2-dev.

HLeithner avatar Jun 27 '22 13:06 HLeithner