Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚦Slider warning messages when requests encounter problems #2613

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

ctrekker
Copy link
Collaborator

@ctrekker ctrekker commented Jul 17, 2023

If a slider server is still starting and the user interacts with a slider, a HTTP 503 error is thrown and the user is not notified. This PR adds a pop-up which informs the user of the slider server's status.
sliders_loading

Otherwise, if the client expects a slider server but for whatever reason (user is offline, slider server crashed, etc.) the request fails, this message is shown:
image

Finally, a bug was fixed in this PR, where if the initial bondconnections request fails but subsequent staterequests succeed, the client sends faulty state patches. The changes in this PR force the client to continue fetching bondconnections until the request succeeds.

@github-actions
Copy link
Contributor

Try this Pull Request!

Open Julia and type:

julia> import Pkg
julia> Pkg.activate(temp=true)
julia> Pkg.add(url="https://github.com/fonsp/Pluto.jl", rev="cb/slider-server-status")
julia> using Pluto

const base = trailingslash(launch_params.slider_server_url)
const hash = await notebookfile_hash
const graph = await bond_connections
const graph = bond_connections || {}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const graph = bond_connections || {}
const graph = bond_connections ?? {}

@fonsp
Copy link
Owner

fonsp commented Jul 20, 2023

Nice! You should be able to see those typescript errors directly in your IDE, maybe check your setup. You could put the bugfix in a separate PR or a commit to main.

@fonsp
Copy link
Owner

fonsp commented Jul 20, 2023

When no sliderserver url is given, we show bonds greyed out, and we show a message about running the notebook when you click on them. Maybe this UI could also be used when the sliderserver is not available for this notebook? Maybe with some extra info at the bottom of the popup?

If the PSS will be available soon for a notebook, I think it's nice to say "check back later" because people might actually do that, but if it doesn't seem like it will work in the next hour, we might as well give the "static notebook" UX, maybe with some extra info in a <detail> for the notebook author.

@ctrekker ctrekker marked this pull request as draft September 17, 2023 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants