slidevjs / slidev

Presentation Slides for Developers
https://sli.dev
MIT License
32.81k stars 1.33k forks source link

Bullet points remain unfaded when using `[click]`s #1680

Closed gy-mate closed 3 months ago

gy-mate commented 3 months ago

Describe the bug

A minor issue: when using [click]s in notes with (nested) bullet points, the bullet points of faded list elements that have one or more [click]s remain unfaded.

Screenshot 2024-06-18 at 00 16 48

To reproduce

Steps to reproduce the behavior:

  1. Run my presentation

    git clone https://github.com/gy-mate/kalauz
    cd kalauz/presentation
    git checkout ef1967e5
    npx slidev
  2. Open http://localhost:3030/presenter/18?clicks=1

Desktop

gy-mate commented 3 months ago

@KermanX Thank you for your work!

I'd like to add that I would expect all bullet points of faded list elements to be also faded. Like the second bullet point in the picture of the issue description. Now (version 0.49.12) it looks like this:

Screenshot 2024-06-28 at 23 53 26

And if you move to http://localhost:3030/presenter/18?clicks=6 I would also expect the circled bullet points to be faded:

Screenshot 2024-06-28 at 23 55 15

What do you think about this?

gy-mate commented 3 months ago

Also, sometimes the list element that should be highlighted is not highlighted at all. If you go to http://localhost:3030/presenter/18?clicks=2 I think that the list element "tul ritkak a merovonati bejarasok" should be highlighted but it isn't:

Screenshot 2024-06-29 at 00 06 07
KermanX commented 3 months ago

@gy-mate The [click] markers should be put before the content like this:

<!--
Content before the first click

[click] This will be highlighted after the first click

Also highlighted after the first click.

[click] This will be highlighted after the second click

[click:3] Last click (skip two clicks)
-->

Then the current behavior will be reasonable - The bullet points unfade when there is sone content in this <li> unfade.

gy-mate commented 3 months ago

@KermanX I see, thank you for the explanation! I've opened a PR to include these in the docs.