@@ -97,6 +97,7 @@ type Msg
9797 | ToggleFold WorkspaceItemRef
9898 | Keydown KeyboardEvent . KeyboardEvent
9999 | SetFocusedItem WorkspaceItemRef
100+ | ToPermalink Reference
100101 | DefinitionSummaryTooltipMsg DefinitionSummaryTooltip . Msg
101102 | KeyboardShortcutMsg KeyboardShortcut . Msg
102103
@@ -107,6 +108,7 @@ type OutMsg
107108 | FocusOn WorkspaceItemRef
108109 | RequestFindInNamespace FQN
109110 | RequestChangePerspective Reference FQN
111+ | RequestPermalink Reference
110112 | Emptied
111113
112114
@@ -368,6 +370,12 @@ update config paneId msg model =
368370 , FocusOn wsRef
369371 )
370372
373+ ToPermalink ref ->
374+ ( model
375+ , Cmd . none
376+ , RequestPermalink ref
377+ )
378+
371379 FindWithinNamespace wsRef fqn ->
372380 let
373381 workspaceItems_ =
@@ -804,6 +812,7 @@ type alias PaneConfig =
804812 , withFocusedPaneIndicator : Bool
805813 , withNamespaceDropdown : Bool
806814 , withMinimap : Bool
815+ , withPermalink : Bool
807816 }
808817
809818
@@ -857,6 +866,13 @@ viewItem cfg collapsedItems definitionSummaryTooltip item isFocused =
857866 else
858867 Nothing
859868
869+ toPermalink =
870+ if cfg. withPermalink then
871+ Just ( ToPermalink definitionRef)
872+
873+ else
874+ Nothing
875+
860876 config =
861877 { wsRef = wsRef
862878 , definitionRef = definitionRef
@@ -874,6 +890,7 @@ viewItem cfg collapsedItems definitionSummaryTooltip item isFocused =
874890 , toggleFold = ToggleFold wsRef
875891 , showDependents = ShowDependentsOf wsRef
876892 , showDependencies = ShowDependenciesOf wsRef
893+ , toPermalink = toPermalink
877894 , namespaceDropdown = namespaceDropdown
878895 }
879896 in
0 commit comments