Skip to content

Commit 086e3c6

Browse files
committed
Improve instructions for making changes
1 parent bdd3a77 commit 086e3c6

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ This applies from version 0.5.0 onwards, as some versions before that have broke
1414
### Added
1515
### Changed
1616
### Fixed
17+
18+
- Improve instructions for making changes.
19+
1720
### Removed
1821

1922
## [1.2.3] - 2022-04-24

src/ApplicationShell.elm

-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ init flags =
5454
|> Maybe.andThen Url.fromString
5555
|> Maybe.map .path
5656
|> Maybe.andThen (String.split "/" >> List.reverse >> List.head)
57-
|> Maybe.withDefault "glossary.html"
5857

5958
title =
6059
flags

src/CommonModel.elm

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ type OrderItemsBy
1313

1414

1515
type alias CommonModel =
16-
{ filename : String
16+
{ filename : Maybe String
1717
, enableHelpForMakingChanges : Bool
1818
, title : GlossaryTitle
1919
, aboutParagraph : String

src/Pages/ListAll.elm

+9-5
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ scrollToTopInElement id =
349349
-- VIEW
350350

351351

352-
viewMakingChangesHelp : String -> Bool -> Bool -> Html Msg
352+
viewMakingChangesHelp : Maybe String -> Bool -> Bool -> Html Msg
353353
viewMakingChangesHelp filename tabbable expanded =
354354
div
355355
[ class "mb-5 rounded-md overflow-x-auto bg-amber-50 dark:bg-gray-700 text-gray-700 dark:text-gray-300 print:hidden"
@@ -393,14 +393,18 @@ viewMakingChangesHelp filename tabbable expanded =
393393
]
394394
, pre
395395
[ class "mt-5" ]
396-
[ code []
396+
[ code [] <|
397+
let
398+
defaultFilename =
399+
"glossary.html"
400+
in
397401
[ text "sed -n '/START OF editor.js$/,$p' "
398-
, text filename
399-
, if filename == "glossary.html" then
402+
, text <| Maybe.withDefault defaultFilename filename
403+
, if filename == Just defaultFilename then
400404
text " | node"
401405

402406
else
403-
text <| " | FILE=" ++ filename ++ " node"
407+
text <| " | FILE=" ++ (filename |> Maybe.withDefault defaultFilename) ++ " node"
404408
]
405409
]
406410
, p

0 commit comments

Comments
 (0)