October: Repeaters add collapse / expand feature

Created on 27 Jan 2017  Â·  9Comments  Â·  Source: octobercms/october

Repeater is an very good feature but when you have many on a page this can be difficult to see them all and re-order them. For improve that I suggest to add buttons for can Collapse a repeater or all repeaters.

For add this feature I have do the following PR : #2632

Demonstration

Collapse / Expand all items or just one

ezgif com-b647557930


Realtime "Title" generation

System get the first Text item

ezgif com-d5c5b839bf


Easily reorder many items

ezgif com-e51381fa6f

Compatibility

This fork fine with OctoberCMS but I have a display problem with the Rainlab Translation plugin. The Translate plugin add switch lang button in absolute position at the same position that "Collapse all" "Expand all" buttons.

For fix that I have do a PR (rainlab/translate-plugin#214) in the Rainlab Translation plugin repository.

Completed Enhancement

Most helpful comment

Real nice work here. A couple of adjustments have been made (e7609aa5e8eef1342320fc0e7793cb88748b789f)

  • Expand all / Collapse all have been removed
  • Ctrl/Meta + click will collapse/expand all
  • Nesting support has been tested + fixed
  • Button styles are consistent
  • Reordering behavior and appearance is fixed
  • A "titleFrom" option has been added data-title-from allowing a form field name to be specified, used to source the title value (suggested by @LukeTowers)

All 9 comments

Wow, That's great!

On Jan 27, 2017 17:26, "Christophe Vuagniaux" notifications@github.com
wrote:

Repeater is an very good feature but when you have many on a page this can
be difficult to see them all and re-order them. For improve that I suggest
to add buttons for can Collapse a repeater or all repeaters.

For add this feature I have do the following PR : (in progress ...)
Demonstration Collapse / Expand all items or just one

[image: ezgif com-b647557930]

https://cloud.githubusercontent.com/assets/12028540/22365668/18c63050-e479-11e6-8b88-cd3144ee0038.gif

Realtime "Title" generation

System get the first Text item

[image: ezgif com-d5c5b839bf]

https://cloud.githubusercontent.com/assets/12028540/22366923/4b462764-e47f-11e6-9fee-162bda767f5b.gif

Easily reorder many items

[image: ezgif com-e51381fa6f]
https://cloud.githubusercontent.com/assets/12028540/22367401/997a73c0-e481-11e6-8dcb-3cb60fba0017.gif
Compatibility

This fork fine with OctoberCMS but I have a display problem with the Rainlab
Translation plugin https://github.com/rainlab/translate-plugin. The
Translate plugin add switch lang button in absolute position at the same
position that "Collapse all" "Expand all" buttons.

For fix that I have do a PR (in progress ...) in the Rainlab Translation
plugin repository.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/octobercms/october/issues/2631, or mute the thread
https://github.com/notifications/unsubscribe-auth/AIkB_OykOCKQUrmM6c2MPNncuRr9vxNBks5rWcZkgaJpZM4LvnfI
.

I like this a lot! Could you add the ability to configure how the repeater titles are built though? I'd like to be able to control that even if there isn't a text field within the repeater.

Real nice work here. A couple of adjustments have been made (e7609aa5e8eef1342320fc0e7793cb88748b789f)

  • Expand all / Collapse all have been removed
  • Ctrl/Meta + click will collapse/expand all
  • Nesting support has been tested + fixed
  • Button styles are consistent
  • Reordering behavior and appearance is fixed
  • A "titleFrom" option has been added data-title-from allowing a form field name to be specified, used to source the title value (suggested by @LukeTowers)

Expand all / Collapse all have been removed

I wonder how to collapse all items on mobile

@iotch any recommendations for the best UX to have on mobile to achieve that?

Sure! Keep those buttons and don't rely on actions not available on mobile devices (hover, control/command modifiers, etc.) :)

@iotch those buttons are too large for mobile, could you provide a mockup of how it should look ideally?

I'm not sure that those buttons are too large for mobile, actually. Another option is to use icons or double tap instead of ctrl+click.

@iotch I like the double tap idea, could you submit a PR for that?

Was this page helpful?
0 / 5 - 0 ratings