Skip to content

Renaming the name of the controlClass attribute for form fields#32645

Closed
korenevskiy wants to merge 17 commits intojoomla:4.2-devfrom
korenevskiy:4.0-dev
Closed

Renaming the name of the controlClass attribute for form fields#32645
korenevskiy wants to merge 17 commits intojoomla:4.2-devfrom
korenevskiy:4.0-dev

Conversation

@korenevskiy
Copy link
Contributor

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
#32488
The author @ciar4n of the attribute agreed to replace the attribute name.

Replace parentclass to controlclass.
This is necessary for a more understandable associative purpose of this attribute.
@ciar4n
Copy link
Contributor

ciar4n commented Mar 11, 2021

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.

@korenevskiy
Copy link
Contributor Author

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. 👍

@ceford
Copy link
Contributor

ceford commented Mar 12, 2021

I have tested this item ✅ successfully on 6901dbc

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.

@dgrammatiko
Copy link
Contributor

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

@korenevskiy
Copy link
Contributor Author

korenevskiy commented Mar 12, 2021

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.

**`<jdoc:include type="modules" name="top" style="default" class="grid-child" />`**

and

**`<jdoc:include type="modules" name="bottom" style="default" class="grid-child" />`**

Friends, please consider the offer to add 2 more positions to the template.
What is it for?
Answer: These fields will have little value for users who use the Cassiopeia template as it is.
BUT!, While a lot of developers use the Cassiopeia template as a basis for redefining new styles. I do it myself.
The fact is that the Bootstrap is already built into Cassiopeia, the grid, controlls, margins, and overrides of default styles are already configured. You don't need to do anything about it. Therefore, it is logical for any templates to use a ready-made Cassiopeia template to redefine its styles.
This is to add a background image, change the color. Simple as that.
But at the same time, you need to have your entire position without the parent tag.
so that you can place as many modules as you want in this position, each of which will have its own grid for mobile screens.
```
<?php if ($this->countModules('bottom-b')): ? >
	<div class="grid-child container-bottom-b">
		<jdoc:include type="modules" name="bottom-b" style="card" />
	</div>
<?php endif; ?>
```
The container-bottom-b class and any other container class have their own built-in grid. What causes problems when the grid is not needed at all in the container class.

`<jdoc:include type="modules" name="bottom" style="default" class="grid-child" />`

**`full-width`** or **`containier-full`** (for old template as 'protostar') of **`wrapper-fluid`**

In addition, I suggest that you be able to use your own class in `<jdoc:include type="modules" name="bottom" style= "default" css="grid-child"/>`.
Thus, the position will be automatically placed in the template grid in the center of the content.
However, if the class prefix is added by the user, I suggest excluding the position class altogether. This will allow the user to add the full-grid class themselves, or to add the `grid` class or `card` class themselves.

for example, you need to make a map at the bottom of the site in the full width of the site with the route. But how to do this if the container is bounded by the central column of the grid.
**`<jdoc:include type="modules" name="top" style="default" class="grid-child" />`**

and

**`<jdoc:include type="modules" name="bottom" style="default" class="grid-child" />`**

Friends, please consider the offer to add 2 more positions to the template.
What is it for?
Answer: These fields will have little value for users who use the Cassiopeia template as it is.
BUT!, While a lot of developers use the Cassiopeia template as a basis for redefining new styles. I do it myself.
The fact is that the Bootstrap is already built into Cassiopeia, the grid, controlls, margins, and overrides of default styles are already configured. You don't need to do anything about it. Therefore, it is logical for any templates to use a ready-made Cassiopeia template to redefine its styles.
This is to add a background image, change the color. Simple as that.
But at the same time, you need to have your entire position without the parent tag.
so that you can place as many modules as you want in this position, each of which will have its own grid for mobile screens.
```
<?php if ($this->countModules('bottom-b')): ? >
	<div class="grid-child container-bottom-b">
		<jdoc:include type="modules" name="bottom-b" style="card" />
	</div>
<?php endif; ?>
```
The container-bottom-b class and any other container class have their own built-in grid. What causes problems when the grid is not needed at all in the container class.

`<jdoc:include type="modules" name="bottom" style="default" class="grid-child" />`

**`full-width`** or **`containier-full`** (for old template as 'protostar') of **`wrapper-fluid`**

In addition, I suggest that you be able to use your own class in `<jdoc:include type="modules" name="bottom" style= "default" css="grid-child"/>`.
Thus, the position will be automatically placed in the template grid in the center of the content.
However, if the class prefix is added by the user, I suggest excluding the position class altogether. This will allow the user to add the full-grid class themselves, or to add the `grid` class or `card` class themselves.

for example, you need to make a map at the bottom of the site in the full width of the site with the route. But how to do this if the container is bounded by the central column of the grid.
@korenevskiy korenevskiy closed this Jun 9, 2021
@korenevskiy korenevskiy deleted the branch joomla:4.2-dev June 9, 2021 13:43
@korenevskiy korenevskiy deleted the 4.0-dev branch June 9, 2021 13:43
@korenevskiy korenevskiy restored the 4.0-dev branch June 9, 2021 19:23
@korenevskiy korenevskiy reopened this Jun 9, 2021
![image](https://user-images.githubusercontent.com/6898474/128238875-fd884b74-a53b-46c5-b020-ace4ce5abfe4.png)
![image](https://user-images.githubusercontent.com/6898474/128239158-cb814349-0f5c-4a70-9f92-4341000ac344.png)

In the Article settings. The RECORD HITS field is disabled.
But this value is displayed on the site.
The fact is that the disabled RECORD HITS field hides another HITS field.
I believe that it should be like this:
- Either the RECORD HITS field will not hide the HITS field.
- Either disabling the RECORD HITS field will automatically deactivate the HITS field.
![image](https://user-images.githubusercontent.com/6898474/128240189-14b98eb6-6467-415b-af7b-5524bbf04d38.png)
![image](https://user-images.githubusercontent.com/6898474/128238875-fd884b74-a53b-46c5-b020-ace4ce5abfe4.png)
![image](https://user-images.githubusercontent.com/6898474/128239158-cb814349-0f5c-4a70-9f92-4341000ac344.png)

In the Article settings. The RECORD HITS field is disabled.
But this value is displayed on the site.
The fact is that the disabled RECORD HITS field hides another HITS field.
I believe that it should be like this:
- Either the RECORD HITS field will not hide the HITS field.
- Either disabling the RECORD HITS field will automatically deactivate the HITS field.
![image](https://user-images.githubusercontent.com/6898474/128240189-14b98eb6-6467-415b-af7b-5524bbf04d38.png)

Pull Request for Issue # .
@chmst chmst changed the base branch from 4.0-dev to 4.1-dev January 31, 2022 15:31
@chmst chmst self-requested a review as a code owner January 31, 2022 15:31
@HLeithner HLeithner changed the base branch from 4.1-dev to 4.2-dev June 27, 2022 13:08
@HLeithner
Copy link
Member

This pull request has automatically rebased to 4.2-dev.

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.

8 participants