From 6bae9f3d937e47bf0bdd0f9c67ff65e7775a4386 Mon Sep 17 00:00:00 2001 From: Chris Kellendonk Date: Sat, 29 Jan 2022 13:23:18 -0500 Subject: [PATCH] Small fixes to the explore docs (#953) * Fix Intro to Kino link in chat_app.livemd * Install Kino before usage in distributed portals exploration --- .../distributed_portals_with_elixir.livemd | 26 +++++-------------- .../notebook/explore/kino/chat_app.livemd | 2 +- 2 files changed, 7 insertions(+), 21 deletions(-) diff --git a/lib/livebook/notebook/explore/distributed_portals_with_elixir.livemd b/lib/livebook/notebook/explore/distributed_portals_with_elixir.livemd index b63e387d4..f70111bd8 100644 --- a/lib/livebook/notebook/explore/distributed_portals_with_elixir.livemd +++ b/lib/livebook/notebook/explore/distributed_portals_with_elixir.livemd @@ -699,34 +699,20 @@ and execute it: ```elixir -IO.puts node() -IO.puts Node.get_cookie() +IO.inspect node() +IO.inspect Node.get_cookie() ``` -Now paste the result of the other node name and its cookie in the inputs below: +Now paste the result of the other node name and its cookie in the variables below: ```elixir -node_input = Kino.Input.text("Other node") +other_node = :"name-of-the@other-node" +other_cookie = :"value-of-the-other-cookie" ``` -```elixir -cookie_input = Kino.Input.text("Other cookie") -``` - -And now execute the code cell below, which will read the inputs, configure the -cookie, and connect to the other notebook: +With both variables defined, let's connect to the other node with the given cookie: ```elixir -other_node = - node_input - |> Kino.Input.read() - |> String.to_atom() - -other_cookie = - cookie_input - |> Kino.Input.read() - |> String.to_atom() - Node.set_cookie(other_node, other_cookie) Node.connect(other_node) ``` diff --git a/lib/livebook/notebook/explore/kino/chat_app.livemd b/lib/livebook/notebook/explore/kino/chat_app.livemd index 444153369..5aded66a4 100644 --- a/lib/livebook/notebook/explore/kino/chat_app.livemd +++ b/lib/livebook/notebook/explore/kino/chat_app.livemd @@ -14,7 +14,7 @@ Mix.install([ ## Kino.Control -In our [introduction to Kino](/explore/notebooks/intro_to_kino), +In our [introduction to Kino](/explore/notebooks/intro-to-kino), we learned about inputs and several different outputs, such as tables, frames, and more. In particular, we learned how to use inputs to capture values directly into our notebooks: