Skip to content

Commit

Permalink
Fix Collapse Issue in the Projects Page Welcome Section (#2605)
Browse files Browse the repository at this point in the history
* Fix shadow overflow

* Correctly use retry for exunit assertions

* Update Arcade resources

---------

Co-authored-by: Stuart Corbishley <[email protected]>
  • Loading branch information
elias-ba and stuartc authored Oct 23, 2024
1 parent d8c0c09 commit 6722954
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 14 deletions.
19 changes: 12 additions & 7 deletions lib/lightning_web/live/dashboard_live/index.ex
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,25 @@ defmodule LightningWeb.DashboardLive.Index do
id: 1,
title: "Getting Started with OpenFn",
link:
"https://demo.arcade.software/WhOK61AiXdG73Dd5lfSa?embed&embed_mobile=inline&embed_desktop=inline&show_copy_link=true"
"https://demo.arcade.software/xmGSUuZ1Ovd9WeHaTLle?embed&embed_mobile=inline&embed_desktop=inline&show_copy_link=true"
},
%{
id: 2,
title: "Creating your first workflow",
link:
"https://demo.arcade.software/WhOK61AiXdG73Dd5lfSa?embed&embed_mobile=inline&embed_desktop=inline&show_copy_link=true"
"https://demo.arcade.software/JzPHX0mUGTkPgAUoctHy?embed&embed_mobile=inline&embed_desktop=inline&show_copy_link=true"
},
%{
id: 3,
title: "How to use the IDE",
link:
"https://demo.arcade.software/WhOK61AiXdG73Dd5lfSa?embed&embed_mobile=inline&embed_desktop=inline&show_copy_link=true"
"https://demo.arcade.software/L3jtNbBEdMJHtY1Z1PFk?embed&embed_mobile=inline&embed_desktop=inline&show_copy_link=true"
},
%{
id: 4,
title: "Managing project history",
link:
"https://demo.arcade.software/WhOK61AiXdG73Dd5lfSa?embed&embed_mobile=inline&embed_desktop=inline&show_copy_link=true"
"https://demo.arcade.software/JLR25gjZdm3NlasAIrZ5?embed&embed_mobile=inline&embed_desktop=inline&show_copy_link=true"
}
]

Expand Down Expand Up @@ -212,7 +212,7 @@ defmodule LightningWeb.DashboardLive.Index do
<div
id="welcome-banner-content"
class={[
"overflow-visible transition-all duration-500 ease-in-out overflow-hidden",
"transition-all duration-500 ease-in-out overflow-hidden hover:overflow-visible",
banner_content_classes(@collapsed)
]}
>
Expand Down Expand Up @@ -246,7 +246,12 @@ defmodule LightningWeb.DashboardLive.Index do
type="button"
phx-click="select-arcade-resource"
phx-value-resource={@resource.id}
class="relative flex items-end h-[150px] bg-gradient-to-r from-blue-400 to-purple-500 text-white rounded-lg shadow-sm hover:shadow-md transition-shadow duration-300 p-4 text-left"
class={[
"relative flex items-end h-[150px] p-4 text-left",
"bg-gradient-to-r from-blue-400 to-purple-500",
"text-white rounded-lg shadow-sm hover:shadow-md",
"transition-shadow duration-300"
]}
>
<h2 class="text-lg font-semibold absolute bottom-4 left-4">
<%= @resource.title %>
Expand All @@ -264,7 +269,7 @@ defmodule LightningWeb.DashboardLive.Index do
show={true}
width="w-5/6"
>
<div class="relative h-0 w-full pb-[60%]">
<div style="position: relative; padding-bottom: calc(54.43121693121693% + 41px); height: 0; width: 100%;">
<iframe
src={@resource.link}
title={@resource.title}
Expand Down
11 changes: 5 additions & 6 deletions test/lightning/version_control_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ defmodule Lightning.VersionControlTest do
describe "create_github_connection/2" do
test "user with valid oauth token creates connection successfully" do
Mox.verify_on_exit!()

project = insert(:project)
user = user_with_valid_github_oauth()

Expand Down Expand Up @@ -84,23 +83,23 @@ defmodule Lightning.VersionControlTest do
"accept" => "true"
}

now = DateTime.utc_now()
current_time_in_unix = now |> DateTime.to_unix()

Lightning.Stub.freeze_time(now)

assert {:ok, repo_connection} =
VersionControl.create_github_connection(
params,
user
)

now = DateTime.utc_now()
Lightning.Stub.freeze_time(now)

{:ok, claims} =
ProjectRepoConnection.AccessToken.verify_and_validate(
repo_connection.access_token,
Lightning.Config.repo_connection_token_signer()
)

current_time_in_unix = now |> DateTime.to_unix()

project_id = project.id

assert %{
Expand Down
3 changes: 2 additions & 1 deletion test/lightning_web/live/workflow_live/edit_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -2108,7 +2108,8 @@ defmodule LightningWeb.WorkflowLive.EditTest do
assert high_priority_view
|> has_element?("#inspector-workflow-version", "latest")

wait exponential_backoff() |> expiry(4_000) do
retry with: exponential_backoff() |> expiry(4_000),
rescue_only: [ExUnit.AssertionError] do
refute low_priority_view
|> has_element?("#inspector-workflow-version", "latest")

Expand Down

0 comments on commit 6722954

Please sign in to comment.