diff --git a/lib/live_debugger/components.ex b/lib/live_debugger/components.ex
index 93da252..2ae29d8 100644
--- a/lib/live_debugger/components.ex
+++ b/lib/live_debugger/components.ex
@@ -6,6 +6,8 @@ defmodule LiveDebugger.Components do
use Phoenix.Component
import LiveDebuggerWeb.Helpers
+ @report_issue_url "https://github.com/software-mansion-labs/live-debugger/issues/new/choose"
+
@doc """
Renders an alert with
"""
@@ -528,6 +530,27 @@ defmodule LiveDebugger.Components do
"""
end
+ attr(:class, :any, default: nil)
+ attr(:text, :string, default: "See any issue? Report it")
+
+ def report_issue(assigns) do
+ assigns = assign(assigns, :report_issue_url, @report_issue_url)
+
+ ~H"""
+
+
+ <%= @text %>
+ <.link href={@report_issue_url} target="_blank" class="underline hover:text-gray-400">
+ here
+
+
+
+ """
+ end
+
attr(:variant, :string, required: true, values: ["danger", "success", "warning", "info"])
defp alert_icon(assigns) do
diff --git a/lib/live_debugger/components/error.ex b/lib/live_debugger/components/error.ex
index c3ec41e..ff2d1dc 100644
--- a/lib/live_debugger/components/error.ex
+++ b/lib/live_debugger/components/error.ex
@@ -38,6 +38,7 @@ defmodule LiveDebugger.Components.Error do
<:heading>Unexpected error
<:description>
Debugger encountered unexpected error. Check logs for more information
+ <.report_issue class="mb-4" text="Report the issue" />
"""
diff --git a/lib/live_debugger/live_components/sidebar.ex b/lib/live_debugger/live_components/sidebar.ex
index 7bf3c5e..636b4a1 100644
--- a/lib/live_debugger/live_components/sidebar.ex
+++ b/lib/live_debugger/live_components/sidebar.ex
@@ -73,7 +73,7 @@ defmodule LiveDebugger.LiveComponents.Sidebar do
def render(assigns) do
~H"""
-
+
<.sidebar_content
pid={@pid}
socket_id={@socket_id}
@@ -82,6 +82,7 @@ defmodule LiveDebugger.LiveComponents.Sidebar do
node_id={@node_id}
myself={@myself}
/>
+ <.report_issue class="border-t border-secondary-200" />
<.sidebar_slide_over :if={not @hidden?} myself={@myself}>
<.sidebar_content
@@ -92,6 +93,7 @@ defmodule LiveDebugger.LiveComponents.Sidebar do
node_id={@node_id}
myself={@myself}
/>
+ <.report_issue class="border-t border-secondary-200" />
"""
@@ -140,7 +142,7 @@ defmodule LiveDebugger.LiveComponents.Sidebar do
~H"""
diff --git a/lib/live_debugger/services/trace_service.ex b/lib/live_debugger/services/trace_service.ex
index 462bdaf..76fb311 100644
--- a/lib/live_debugger/services/trace_service.ex
+++ b/lib/live_debugger/services/trace_service.ex
@@ -4,8 +4,6 @@ defmodule LiveDebugger.Services.TraceService do
Created table is an ordered_set with non-positive integer keys.
"""
- require Logger
-
alias LiveDebugger.Structs.Trace
alias LiveDebugger.CommonTypes
alias Phoenix.LiveComponent.CID