Problem/Motivation
Drupal Core provides Vertical Tabs as Render Element: https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Render%21...
So you would expect that if there are vertical tabs, there should also be horizontal tabs.
But that's not the case!
See https://api.drupal.org/api/drupal/namespace/Drupal%21Core%21Render%21Ele...
Steps to reproduce
Try switching from
'#type' => 'vertical_tabs'
to
'#type' => 'horizontal_tabs'
and wonder horizontal_tabs isn't existing
Proposed resolution
Move the horizontal tabs implementation (and maybe also other field group types) from Field Group module into core and remove it from field_group. Also deprecate Horizontal Tabs module
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Take advantage of vertical tab, add horizontal tabs into core.
Comment | File | Size | Author |
---|---|---|---|
#8 | Screen Shot 2017-09-03 at 6.30.55 PM.png | 70.01 KB | jrockowitz |
Comments
Comment #1
bismigalis CreditAttribution: bismigalis commenteddouble
Comment #6
agoradesign CreditAttribution: agoradesign commentedI just needed the same thing.
I failed in integrating the horizontal tabs from field_group module programmatically and ended up in build my own horizontal_tabs form element based on the core's vertical_tabs. You can find this on Github: https://github.com/agoradesign/horizontal_tabs
I've explained in the README file of the module, why it currently is only hosted on Github and not on Drupal. First I want to see that there's demand for that and that the chances are low that this functionality gets merged into Core or field_group soon.
Comment #7
tacituseu CreditAttribution: tacituseu commentedComment #8
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedI also just added support for horizontal tabs using jQueryUI to the Webform module's UX (for D8)
Comment #9
AnybodyHorizontal Tabs would make a lot of sense in D8 core while Vertical tabs already exist. +1
Comment #10
droplet CreditAttribution: droplet commentedLet's see if we could get it approve before implementation. I believe we only need few CSS additions. (Something like a class to toggle the states)
Comment #11
AnybodyOk sounds good. Everything else should be part of horizontal_tabs module as described above.
Comment #12
jhonatasfender CreditAttribution: jhonatasfender as a volunteer commentedhttps://github.com/agoradesign/horizontal_tabs/issues/1
I ran the composer require to test, when I enabled the module it presented this error.
to solve the problem I changed the code to:
I would like to know if I can contribute to this change, is it valid?
Comment #13
agoradesign CreditAttribution: agoradesign commentedProblem is that field_group and horizontal_tabs conflict with each other. They both declare the same theme hook. see #2988689: Conflict with module field_group
Comment #14
jhonatasfender CreditAttribution: jhonatasfender as a volunteer commented@agoradesign Do you think it's important to post this to help close people?
Comment #15
AnybodyFYI: horizontal_tabs are not only part of horizontal_tabs module, but also field_group module!
I created an issue in horizontal_tabs to deprecate it and join efforts on field_group module: #3362594: Deprecate in favor of Field Group module
Updating the issue summary.
Comment #16
Anybody