? Pending

User tests: Successful: Unsuccessful:

avatar dgrammatiko
dgrammatiko
23 May 2018

Pull Request for Issue # .

Summary of Changes

The radio field has few dedicated layouts/functionalities:

  • native radios
  • group buttons (ie bootstrap group buttons, used extremely in J3)
  • switcher (the default on J4)

So this PR removes the code that used to be in the templates file template.js to control those fields (yeah very strange) and introduces a custom element joomla-field-group-buttons that provides the same functionality. Also since it's CE it works as is with the repeatable forms, no more custom events, etc

Testing Instructions

For testing purposes you can find couple switches in the admin->extensions->templates->autum tab advanced. You can play around, save etc. Everything should work fine

This code in the xml will be removed prior to (if ever) merging this PR

Actual result

screen shot 2018-05-23 at 14 26 34

Also plain html/js/css demo: https://codepen.io/dgrammatiko/pen/LmvaNa

Documentation Changes Required

Not really, we are still B/C. Only consideration here is for devs that using those form fields out of JForm. In such case they need to swap the div tag with the new joomla-field-group-button and also include the corresponding js for the custom element, similar to what is done in the layout of the field.

avatar dgrammatiko dgrammatiko - open - 23 May 2018
avatar dgrammatiko dgrammatiko - change - 23 May 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 23 May 2018
Category Administration Templates (admin) JavaScript Repository Layout Front End Templates (site)
avatar dgrammatiko
dgrammatiko - comment - 23 May 2018

@ciar4n can you tide up the css here?

avatar dgrammatiko dgrammatiko - change - 23 May 2018
Labels Added: ?
avatar dgrammatiko dgrammatiko - change - 23 May 2018
The description was changed
avatar dgrammatiko dgrammatiko - edited - 23 May 2018
avatar ciar4n
ciar4n - comment - 24 May 2018

Now looking like this (inline with new design)...

image

avatar brianteeman
brianteeman - comment - 22 Jul 2018

@dgrammatiko can you resolve the conflicts please so this can be tested

c7b5640 22 Jul 2018 avatar dgrammatiko cs
ff407ca 22 Jul 2018 avatar ciar4n grrr
avatar joomla-cms-bot joomla-cms-bot - change - 22 Jul 2018
Category Administration Templates (admin) JavaScript Repository Layout Front End Templates (site) Administration Templates (admin) JavaScript Repository Layout
avatar brianteeman
brianteeman - comment - 22 Jul 2018

Same problem as with the switcher. The label of the radio button is never announced to the screenreader

avatar dgrammatiko
dgrammatiko - comment - 22 Jul 2018

@brianteeman this is in essence an exact copy of the BS markup:
https://getbootstrap.com/docs/4.1/components/buttons/#checkbox-and-radio-buttons

But if you have a solution here I'm happy to code that in

avatar brianteeman
brianteeman - comment - 22 Jul 2018

those examples work correctly with a screenreader

avatar dgrammatiko dgrammatiko - change - 29 Aug 2018
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2018-08-29 10:24:24
Closed_By dgrammatiko
avatar dgrammatiko dgrammatiko - close - 29 Aug 2018
avatar dgrammatiko dgrammatiko - change - 2 Feb 2019
Status Closed New
Closed_Date 2018-08-29 10:24:24
Closed_By dgrammatiko
avatar dgrammatiko dgrammatiko - change - 2 Feb 2019
Status New Pending
avatar dgrammatiko dgrammatiko - reopen - 2 Feb 2019
avatar dgrammatiko
dgrammatiko - comment - 9 Mar 2019

The idea and the aim for J4 was to get all fields as custom elements as those are lazily loaded and could actually run ES20XX code, but it seems that this has changed lately. So let it be. Closing

avatar dgrammatiko dgrammatiko - change - 9 Mar 2019
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2019-03-09 21:02:48
Closed_By dgrammatiko
avatar dgrammatiko dgrammatiko - close - 9 Mar 2019

Add a Comment

Login with GitHub to post a comment