From dcbf0d156cdc44e89e9cd7da470f0fe7012a0534 Mon Sep 17 00:00:00 2001 From: Paulo Valim Date: Fri, 12 Aug 2022 19:42:54 +0200 Subject: [PATCH] Make the global sidebar collapsible (#1343) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jonatan Kłosko Co-authored-by: José Valim --- lib/livebook_web/live/explore_live.ex | 11 ++--- lib/livebook_web/live/home_live.ex | 13 ++++-- lib/livebook_web/live/settings_live.ex | 5 ++- lib/livebook_web/live/sidebar_helpers.ex | 51 +++++++++++++++++++++++- 4 files changed, 68 insertions(+), 12 deletions(-) diff --git a/lib/livebook_web/live/explore_live.ex b/lib/livebook_web/live/explore_live.ex index f59ec30b3..78e63d2c2 100644 --- a/lib/livebook_web/live/explore_live.ex +++ b/lib/livebook_web/live/explore_live.ex @@ -30,8 +30,9 @@ defmodule LivebookWeb.ExploreLive do current_page={Routes.explore_path(@socket, :page)} current_user={@current_user} /> -
-
+
+ +

@@ -84,7 +85,7 @@ defmodule LivebookWeb.ExploreLive do defp notebook_group(assigns) do ~H"""

-
+
@@ -101,7 +102,7 @@ defmodule LivebookWeb.ExploreLive do
    <%= for {notebook_info, number} <- Enum.with_index(@group_info.notebook_infos, 1) do %> -
  • +
  • <%= number |> Integer.to_string() |> String.pad_leading(2, "0") %>
    @@ -109,7 +110,7 @@ defmodule LivebookWeb.ExploreLive do <%= notebook_info.title %>
<%= live_redirect to: Routes.explore_path(@socket, :notebook, notebook_info.slug), - class: "button-base button-outlined-gray" do %> + class: "button-base button-outlined-gray mt-3 sm:mt-0" do %> <.remix_icon icon="play-circle-line" class="align-middle mr-1" /> Open notebook <% end %> diff --git a/lib/livebook_web/live/home_live.ex b/lib/livebook_web/live/home_live.ex index 5497f7f16..34f87572a 100644 --- a/lib/livebook_web/live/home_live.ex +++ b/lib/livebook_web/live/home_live.ex @@ -45,13 +45,18 @@ defmodule LivebookWeb.HomeLive do current_user={@current_user} />
+ + + <.remix_icon icon="add-line" /> + New notebook + + <.update_notification version={@new_version} instructions_url={@update_instructions_url} /> <.memory_notification memory={@memory} app_service_url={@app_service_url} /> -
-
+
+
-