Skip to content

Commit

Permalink
update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
fonsp committed Aug 14, 2024
1 parent d8d0ba4 commit da6d31c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion frontend/components/CellOutput.js
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ const execute_scripttags = async ({ root_node, script_nodes, previous_results_ma
let run = (f) => f()

/**
* Support declarative shadowroot 😼
* Support declarative shadowroot 😺
* https://web.dev/declarative-shadow-dom/
* The polyfill they mention on the page is nice and all, but we need more.
* For one, we need the polyfill anyway as we're adding html using innerHTML (just like we need to run the scripts ourselves)
Expand Down
9 changes: 2 additions & 7 deletions src/webserver/Dynamic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -412,14 +412,9 @@ responses[:reset_shared_state] = function response_reset_shared_state(🙋::Clie
end

"""
This is a little hack to solve https://github.com/fonsp/Pluto.jl/pull/1892
This function updates current_state_for_clients for our client with `cell.queued = true`. We do the same on the client side, where we set the cell's result to `queued = true` immediately in that client's local state. Search for `😼` in the frontend code.
This function updates current_state_for_clients for our client with cell.queued = true.
Later, during update_save_run!, the cell will actually run, eventually setting cell.queued = false again, which will be sent to the client through a patch update.
This guarantees that something will be sent.
We *need* to send *something* to the client, because of https://github.com/fonsp/Pluto.jl/pull/1892, but we also don't want to send unnecessary updates. We can do this instead of a regular call to `send_notebook_changes!`, because update_save_run! will trigger a send_notebook_changes! call very very soon.
This is also kinda related to https://github.com/fonsp/Pluto.jl/pull/1892 but not really, see https://github.com/fonsp/Pluto.jl/pull/2989. I actually think this does not make a differency anymore, see https://github.com/fonsp/Pluto.jl/pull/2999.
"""
function _set_cells_to_queued_in_local_state(client, notebook, cells)
if haskey(current_state_for_clients, client)
Expand Down

0 comments on commit da6d31c

Please sign in to comment.