holoviz / panel

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

Using Slides template as a pipeline? #4902

Open ahuang11 opened 1 year ago

ahuang11 commented 1 year ago

I know there's already a pipeline module that allows for complex, non-linear flow.

However, I really like the minimalistic feel of pn.template.SlidesTemplate and I was wondering if it can be utilized as a simple linear flow.

Specifically, I'd like to see if there's any way to disable the navigate-right controls arrow until the form displayed on the slide is complete.

I'm thinking of a param to enable/disable the controls and have the user do form validation manually.

I see that there's this HTML class:

<button class="navigate-right enabled fragmented highlight" aria-label="next slide"><div class="controls-arrow"></div></button>

If I change it to :

<button class="navigate-right disabled fragmented highlight" aria-label="next slide"><div class="controls-arrow"></div></button>

The right arrow disappears:

image
ahuang11 commented 1 year ago

Maybe this can be achieved by using slides visibility: https://revealjs.com/slide-visibility/

Similar to adding tags=["fragment"], maybe tags=["hidden"]

ahuang11 commented 1 year ago

I suppose we cannot dynamically add slides to the template either once served, but it's possible to first put placeholders.

Coderambling commented 4 weeks ago

I like the idea of using Slides for simple, linear workflows. Could slides be added dynamically if native templates were composed of Panel components, as mentioned here?

ahuang11 commented 4 weeks ago

I don't think this could be converted into native Panel; maybe JSComponent?

Coderambling commented 4 weeks ago

How would this relate to the Pipeline module? Could a slides flow be connected to / be an element in a pipeline module flow?