JuliaPluto / PlutoSliderServer.jl

Web server to run just the `@bind` parts of a Pluto.jl notebook
https://computationalthinking.mit.edu/
The Unlicense
135 stars 18 forks source link

Weird cell topology behavior #84

Open ghaetinger opened 2 years ago

ghaetinger commented 2 years ago

This notebook produces a weird cell topology and results on unintended behavior:

# ╔═╡ eab54436-2314-11ed-372a-536153d0ba0e
using PlutoUI

# ╔═╡ db24a888-617d-4123-84e6-cb57aacd68e7
@bind a Slider(1:10; show_value=true)

# ╔═╡ 2515ccde-fafd-42db-b75c-110817f9074d
begin
    a
    @bind b Slider(1:10; show_value=true)
end

# ╔═╡ 5a37bce9-d9e4-456f-9b9d-7d8755b1e0db
begin
    a
    rand()
end

Bond topology generated:

┌ Info: Bond connections
│   s.path = "test-pss-deps.jl"
│   showall(collect(bond_connections)) =
│    :a => [:a, :b]
└    :b => [:a, :b]

Shouldn't the topology be :a => [:a], :b => [:a, :b]?

Also, this notebook's behavior makes it so everytime you change b, you generate a different rand number. This might be because rand relies on the current overall state of the notebook, but still shouldn't happen. Also, the slider for b seems stuck, as it doesn't slide but directly moves to where the cursor is. The slider value displaying also doesn't change and isn't going back to 0 when we change a. Here is a quick video:

PSSerror

Pangoraw commented 2 years ago

Related: https://github.com/fonsp/Pluto.jl/pull/2014