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

full width spacer hr line

Open svanschu opened this issue 3 years ago • 6 comments

Pull Request for Issue # . No issue created for it.

My first Joomla! PR ...

Summary of Changes

In the current Joomla 4 backend the space hr form field only creates a line partially. Bildschirmfoto vom 2022-07-28 19-50-15 With this changes the hr line is again on the full width and looks much better as spacer. The changes are only made for the hr=true case, because if nothing is shown it doesn't matter. If text is used it only gets displayed as label and hr=false need to be set. For bigger text the note form field should be used. Bildschirmfoto vom 2022-07-29 00-31-17

Testing Instructions

Actual result BEFORE applying this Pull Request

Open Modules: Articles - Category Filtering-Options and you see a small line space left aligned.

Expected result AFTER applying this Pull Request

After the patch you should see a full width line

Documentation Changes Required

svanschu avatar Jul 28 '22 23:07 svanschu

I have tested this item :white_check_mark: successfully on 4568771a58326159bff877bcc638310283294f44


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

RickR2H avatar Jul 29 '22 15:07 RickR2H

Above the function getInput() there is a comment: Method to get the field input markup for a spacer. The spacer does not have accept input. so adding code here seems wrong to me. And the html code is already being created in the function getLabel() I think a change of the CSS should be enough to get a 100% wide line

.spacer hr { width: 100%; } .control-group.field-spacer .control-label { width: 100%; }

drmenzelit avatar Aug 01 '22 10:08 drmenzelit

Above the function getInput() there is a comment: Method to get the field input markup for a spacer. The spacer does not have accept input. so adding code here seems wrong to me. And the html code is already being created in the function getLabel() I think a change of the CSS should be enough to get a 100% wide line

.spacer hr { width: 100%; } .control-group.field-spacer .control-label { width: 100%; }

Pure CSS is not enough. Either this patch or you need to rewrite the spacer field completely to be like the note field. with own HTML without the normal FormField behavior.

svanschu avatar Aug 01 '22 10:08 svanschu

grafik

Content / Options With CSS only

Can you give an example where that doesn't work?

drmenzelit avatar Aug 01 '22 11:08 drmenzelit

Css works for me. Seems to be a "old" fild. Is there a reason for the fixed width of 380px? And for bootstrap popOver?

chmst avatar Aug 01 '22 12:08 chmst

@drmenzelit yes you're right sorry. @chmst yes that's a pretty old field. I thought about to rewrite it so it really only makes a space or a line without the option to enter text, because since J3.1 we have the note field which adds text full width. What do you think?

svanschu avatar Aug 01 '22 20:08 svanschu

@svanschu thank you very much for all your work and commitment here. Unfortunately thsi PR cannot be accepted, it would be a b/c break, as until now the text was displayed and could be used by 3rd party developers in their forms.

Now as you have made your first PR, you know how this works and we are looking forward to new PRs from you :)

chmst avatar Jan 10 '23 22:01 chmst