holoviz / panel

Panel: The powerful data exploration & web app framework for Python
https://panel.holoviz.org
BSD 3-Clause "New" or "Revised" License
4.83k stars 519 forks source link

Add support for passing objects reference for all ListLike Panel layouts that do not support it yet, to achieve consistent behaviour for all ListLike layouts #6389

Open Coderambling opened 9 months ago

Coderambling commented 9 months ago

Reference to earlier issue for Flexbox layout: https://github.com/holoviz/panel/pull/6387

@philippjfr , as discussed. The remaining Listlike layouts that do not support it yet are:

Accordion (did not test that one). Update: tested it, Accordion does not support this. FloatPanel WidgetBox Tabs Is Card also ListLike?

Reference and text of the Discord message below:

Discord channel: https://discord.com/channels/1075331058024861767/1088157184489164831

Looking throught the API reference now for the ListLike layouts. Column, Row, and FlexBox now accept objects. So that leaves FloatPanel, WidgetBox and Tabs as the other ListLike layouts?

Update: Tested it: FloatPanel gives same error as Flexbox did before. WidgetBox supports objects=

Tabs gives error: TypeError: 'List' object is not iterable with pn.Tab(objects=widgetlist.param.value). Tab(objects=widgetlist.value) works.

Coderambling commented 9 months ago

For reference: PR for the other layouts with the same issue is here https://github.com/holoviz/panel/issues/6389

Coderambling commented 1 month ago

Update: when testing, this seems to work for Card.