Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 33ba785

Browse files
committedJan 25, 2021
Improve copy/paste UX in Options and packages
- Change title from button to a to make it selectable - Resurect `Name` meta for Options - Make sure this won't break keyboard selection
1 parent 5bb94c9 commit 33ba785

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed
 

‎src/Page/Options.elm

+5-2
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,9 @@ viewResultItem channel _ show item =
213213
showDetails =
214214
if Just item.source.name == show then
215215
div [ Html.Attributes.map SearchMsg Search.trapClick ]
216-
[ div [] [ text "Default value" ]
216+
[ div [] [ text "Name" ]
217+
, div [] [ wrapped asPreCode item.source.name ]
218+
, div [] [ text "Default value" ]
217219
, div [] [ withEmpty (wrapped asPreCode) item.source.default ]
218220
, div [] [ text "Type" ]
219221
, div [] [ withEmpty asPre item.source.type_ ]
@@ -241,9 +243,10 @@ viewResultItem channel _ show item =
241243
<|
242244
List.filterMap identity
243245
[ Just <|
244-
Html.button
246+
Html.a
245247
[ class "search-result-button"
246248
, onClick toggle
249+
, href ""
247250
]
248251
[ text item.source.name ]
249252
, Maybe.map showHtml item.source.description

‎src/Page/Packages.elm

+2-1
Original file line numberDiff line numberDiff line change
@@ -540,9 +540,10 @@ viewResultItem channel showNixOSDetails show item =
540540
([]
541541
|> List.append longerPackageDetails
542542
|> List.append
543-
[ Html.button
543+
[ Html.a
544544
[ class "search-result-button"
545545
, onClick toggle
546+
, href ""
546547
]
547548
[ text item.source.attr_name ]
548549
, div [] [ text <| Maybe.withDefault "" item.source.description ]

0 commit comments

Comments
 (0)
Please sign in to comment.