NPM Resource Changed ? ? Pending

User tests: Successful: Unsuccessful:

avatar ciar4n
ciar4n
27 Jan 2020

Pull Request for Issue #27558, #27681, #27676 #27664 .

Summary of Changes

Moves field control-groups to flex.

  • Less CSS required
  • Flex naturally supports RTL so no RTL CSS required.
  • Media queries look at the width of the viewport and are the only way to change the orientation of the current control-group fields. Flex would allow us to change the orientation of the field depending on the space available to it. A much more versatile and safer way to approach responsive fields especially.
  • Duplicate CSS removed
  • Fixes form-vertical class

Simply put, with this PR, label/fields will become container aware, moving from vertical to horizontal aligned if the field is reduced to less than 210px. I have also enabled the form-vertical class. The addition of this class and the field will always display vertically. The fields-no-margin has been removed completely.

Edit: Any field in a multi-column layout, displays in a vertical format regardless of the space available to it. This was always the case.

Testing Instructions

Apply this patch and run node build.js --compile-css for updating the changed SCSS. Check fields display correctly.

Documentation Changes Required

avatar ciar4n ciar4n - open - 27 Jan 2020
avatar ciar4n ciar4n - change - 27 Jan 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 27 Jan 2020
Category Administration com_banners com_config com_content com_menus com_workflow Templates (admin) Repository NPM Change Installation Layout Front End Templates (site)
avatar ciar4n ciar4n - change - 27 Jan 2020
The description was changed
avatar ciar4n ciar4n - edited - 27 Jan 2020
avatar Fedik
Fedik - comment - 27 Jan 2020

Less CSS required

I thought Joomla! 4 use scss ?

avatar brianteeman
brianteeman - comment - 27 Jan 2020

Might be me doing something wrong but something isnt right with the switcher now

Before

image

After

image

avatar richard67 richard67 - change - 27 Jan 2020
Status Pending Confirmed
avatar ciar4n
ciar4n - comment - 28 Jan 2020

@brianteeman Do you know of any reason why the switcher has a sr-only class on the label and then adds a second visible 'label' in the form of a legend within the field control? It seems strange and at odds with all other fields.

avatar ciar4n
ciar4n - comment - 28 Jan 2020

Switcher html...

<div class="control-group">
  <div class="control-label sr-only">
    <label id="jform_featured-lbl" for="jform_featured">
      Featured
    </label>
  </div>
  <div class="controls">
    <fieldset id="jform_featured">
      <legend class="switcher__legend">
        Featured
      </legend>
      <div class="switcher">
        <input type="radio" id="jform_featured0" name="jform[featured]" value="0">    <label for="jform_featured0">No</label>         <input type="radio" id="jform_featured1" name="jform[featured]" value="1" checked="checked" class="active">   <label for="jform_featured1">Yes</label>    <span class="toggle-outside"><span class="toggle-inside"></span></span>
      </div>
    </fieldset> 
  </div>
</div>
avatar brianteeman
brianteeman - comment - 28 Jan 2020

Yes. It was the only way to achieve the correct accessibility. But without checking the original pr I don't remember more than that

avatar ciar4n
ciar4n - comment - 28 Jan 2020

Does that mean only the switcher has the correct accessible html? If so then we can probably close this until all other fields are brought up to speed. Considering the switcher html, this PR would be quite different.

avatar brianteeman
brianteeman - comment - 28 Jan 2020

switcher is a fieldset and a fieldset requires a legend

avatar C-Lodder
C-Lodder - comment - 28 Jan 2020

@ciar4n - The switcher is like this because you can't associate a label with multiple inputs...only a single input. The only other form fields I can think of that may need checking are checkbox/radio....but only when using multiple.

avatar ciar4n
ciar4n - comment - 28 Jan 2020

Ok thank you. I'm guessing we can't just move the sr-only class from the label to the legend?

avatar C-Lodder
C-Lodder - comment - 28 Jan 2020

I think it's being used incorrectly so that the .control-label doesn't take up any space.

Instead the .sr-only should be moved to the <label> and a d-none class be added to the parent <div>

avatar brianteeman
brianteeman - comment - 28 Jan 2020

give me two seconds to check that. my memory is failing me but there must have been a reason I did it that way

avatar brianteeman
brianteeman - comment - 28 Jan 2020

changing the sr-only to being on the legend instead of the label seems to be ok. not sure I understand the d-none comment

avatar C-Lodder
C-Lodder - comment - 28 Jan 2020

@brianteeman Form fields in Joomla have a label to the left of the field (220px in width or somthing). This isn't the case with the switcher. Instead it's to the right hand side.
So to hide that 200px gap to the left of the switcher, they've used sr-only on <div class="control-label sr-only">.

avatar brianteeman
brianteeman - comment - 28 Jan 2020

my brain isnt in gear sorry.

The label to the right is the label for the value of the radio = eg yes/no
the field label and legend are to the left

why I chose to hide the label and not the the legend is something I dont remember and looking at the original pr doesnt help me

avatar brianteeman
brianteeman - comment - 28 Jan 2020

corrected last comment

avatar joomla-cms-bot joomla-cms-bot - change - 28 Jan 2020
Category Administration com_banners com_config com_content com_menus com_workflow Templates (admin) Repository NPM Change Installation Layout Front End Templates (site) Administration com_banners com_config com_content com_menus com_workflow Templates (admin) Repository NPM Change Installation Layout Libraries Front End Templates (site)
avatar ciar4n
ciar4n - comment - 28 Jan 2020

I've moved the sr-only from the legend to the label which fixes the switcher style issue.

avatar ciar4n
ciar4n - comment - 28 Jan 2020

Just to mention, any field in a multi column layout, displays in a vertical format regardless of the space available to it. This was always the case.

avatar ciar4n ciar4n - change - 28 Jan 2020
The description was changed
avatar ciar4n ciar4n - edited - 28 Jan 2020
avatar ciar4n
ciar4n - comment - 28 Jan 2020

Instead the .sr-only should be moved to the  and a d-none class be added to the parent 

I read that a little fast. I'll look in to this later.

avatar brianteeman
brianteeman - comment - 28 Jan 2020

the switcher changes look good to me now

avatar brianteeman brianteeman - test_item - 28 Jan 2020 - Tested successfully
avatar brianteeman
brianteeman - comment - 28 Jan 2020

I have tested this item successfully on ad91d27


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

avatar Quy
Quy - comment - 28 Jan 2020

help

avatar ghazal ghazal - test_item - 28 Jan 2020 - Tested successfully
avatar ghazal
ghazal - comment - 28 Jan 2020

I have tested this item successfully on ad91d27

Perfect on a Macbook Pro.
Can't see the last error mentioned by @Quy in Indexing options. But again it's tested on a MacBook.


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

avatar Quy
Quy - comment - 28 Jan 2020

More display issues. Firefox 72.0.2 Windows 10

27684

avatar ciar4n ciar4n - change - 28 Jan 2020
Labels Added: NPM Resource Changed ?
avatar ciar4n
ciar4n - comment - 28 Jan 2020

@Quy should be ok now

avatar Quy Quy - test_item - 28 Jan 2020 - Tested successfully
avatar Quy
Quy - comment - 28 Jan 2020

I have tested this item successfully on 0fc2363


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

avatar jwaisner jwaisner - test_item - 28 Jan 2020 - Tested successfully
avatar jwaisner
jwaisner - comment - 28 Jan 2020

I have tested this item successfully on 0fc2363


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

avatar Quy Quy - change - 28 Jan 2020
Status Confirmed Ready to Commit
avatar Quy
Quy - comment - 28 Jan 2020

RTC


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

avatar Quy
Quy - comment - 29 Jan 2020

There is a top/bottom padding with the label. Is that OK?

AFTER:
27684-after

BEFORE:
27684-before

avatar ciar4n ciar4n - change - 29 Jan 2020
Labels Added: ?
avatar ciar4n
ciar4n - comment - 29 Jan 2020

@Quy I have reduced the label padding...

image

Minor change so can probably remain RTC

avatar Quy
Quy - comment - 29 Jan 2020

Switcher needs to be adjusted too.

27684-switcher

avatar ciar4n
ciar4n - comment - 29 Jan 2020

@Quy Ty. Switcher updated.

avatar Quy
Quy - comment - 29 Jan 2020

There is less vertical spacing between the fields.

BEFORE:
27684-spacing

AFTER:
27684-less-spacing

avatar ciar4n
ciar4n - comment - 29 Jan 2020

@Quy updated

avatar Quy
Quy - comment - 29 Jan 2020

Looks good!! Thank you.

avatar infograf768
infograf768 - comment - 29 Jan 2020

Anyone tested rtl ?

avatar Quy
Quy - comment - 29 Jan 2020

There is extra padding on the first field.

27684-top

avatar Quy
Quy - comment - 29 Jan 2020

Anyone tested rtl ?

Yes, looks fine.

avatar ciar4n
ciar4n - comment - 29 Jan 2020

There is extra padding on the first field.

@Quy Top margin removed.

avatar Quy Quy - test_item - 29 Jan 2020 - Tested successfully
avatar Quy
Quy - comment - 29 Jan 2020

I have tested this item successfully on e476392


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

avatar infograf768
infograf768 - comment - 30 Jan 2020

Works fine here but one question:

@ciar4n
Is it possible to also correct the Global Configuration Text Filters tab in reduced window width (LTR and RTL)? Or shall we postpone this to another PR (if even possible)?

Screen Shot 2020-01-30 at 08 35 46

Screen Shot 2020-01-30 at 08 36 43

avatar ciar4n
ciar4n - comment - 30 Jan 2020

Outside the scope of this PR but as a quick fix I have added the table-responsive class to the table which basically adds a horizontal scroll on smaller screens. This area is in a table which will always be an issue on smaller screens. Maybe something like #13769 could be applied if the horizontal scroll is not sufficient (separate pr).

avatar brianteeman
brianteeman - comment - 30 Jan 2020

We have a PR for the permissions already see #27670

avatar infograf768
infograf768 - comment - 30 Jan 2020

@ciar4n
Better, but not enough indeed. specially for the dropdowns.
may I suggest a change?

add

#page-filters .custom-select {
	width: auto;
}

in administrator/templates/atum/scss/blocks/_form.scss
towards the end of the file.
npm

Before patch

beforeconfig

After patch

afterconfig

avatar ciar4n
ciar4n - comment - 30 Jan 2020

@infograf768 I'll leave it for a separate PR. As mentioned there is a PR for the permissions already. This PR is for the field control-group. The permissions is not even in a control-group.

avatar infograf768
infograf768 - comment - 30 Jan 2020

This proposal above does not concerns Permissions, but the Text Filters.
#27670 concerns only Permissions... and works well for that.

avatar infograf768
infograf768 - comment - 30 Jan 2020

I have tested both Permissions PR and this PR.
They are Ok for what they do.
Will make a new PR for Text Filters after they are merged.
In the mean while, I merge this one as it solves many issues.

avatar infograf768 infograf768 - change - 30 Jan 2020
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-01-30 10:47:08
Closed_By infograf768
avatar infograf768 infograf768 - close - 30 Jan 2020
avatar infograf768 infograf768 - merge - 30 Jan 2020
avatar infograf768
infograf768 - comment - 30 Jan 2020

Tks.

avatar ciar4n
ciar4n - comment - 30 Jan 2020

Thank you for the tests!

Add a Comment

Login with GitHub to post a comment