Skip to content

Commit 126b1e0

Browse files
committed
Remove Elm application Feeds
Replace last functionality that had not been ported to LiveView yet by regular <form>.
1 parent 9671a04 commit 126b1e0

File tree

13 files changed

+28
-371
lines changed

13 files changed

+28
-371
lines changed

.github/workflows/ci.yml

+7-3
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,17 @@ jobs:
7979

8080
- name: Precompile Elm entry points
8181
run: |
82-
# By compiling both `Feeds.elm` and `NewFeed.elm`, we make sure all
83-
# intermediate files are present before `npm run deploy` runs.
82+
# By compiling `NewFeed.elm`, we make sure all intermediate files are
83+
# present before `npm run deploy` runs.
8484
#
8585
# Otherwise, webpack would compile files in parallel which can lead
8686
# to data races and let one of the compiler processes fail with an
8787
# error about corrupt files.
88-
npx elm make app/App/Feeds.elm --output /dev/null
88+
#
89+
# 2024-12-18
90+
# This is probably not necessary anymore, but since the Elm parts
91+
# will soon be completely removed, this doesn’t really matter and we
92+
# can leave this step in place, just in case it is still necessary.
8993
npx elm make app/App/NewFeed.elm --output /dev/null
9094
working-directory: assets/elm
9195

assets/elm/app/App/Feeds.elm

-128
This file was deleted.

assets/elm/app/Feeds/Icons.elm

-34
This file was deleted.

assets/elm/app/Feeds/Model.elm

-22
This file was deleted.

assets/elm/app/Feeds/Msg.elm

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ module Feeds.Msg exposing (Msg(..))
22

33
import Feeds.Addition as Addition
44
import Feeds.Discovery as Discovery
5-
import Feeds.Model exposing (..)
65
import Types.Feed exposing (..)
76

87

assets/elm/app/Feeds/Options.elm

-62
This file was deleted.

assets/elm/app/Feeds/Options/Addition.elm

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ module Feeds.Options.Addition exposing (requestFieldset)
22

33
import Dict exposing (Dict)
44
import Feeds.Addition as Addition exposing (Addition)
5-
import Feeds.Model exposing (..)
65
import Feeds.Msg exposing (..)
76
import Html as H exposing (Html)
87
import Html.Attributes as A

assets/elm/app/Feeds/Options/Discovery.elm

+1-82
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,13 @@
11
module Feeds.Options.Discovery exposing
22
( addableFeed
3-
, discoverFeedFieldset
4-
, discoverFeedsFieldset
53
, requestFieldset
64
)
75

8-
import Dict exposing (Dict)
96
import Feeds.Discovery as Discovery exposing (Discovery)
10-
import Feeds.Model exposing (..)
11-
import Feeds.Msg exposing (..)
7+
import Feeds.Msg exposing (Msg(..))
128
import Html as H exposing (Html)
139
import Html.Attributes as A
1410
import Html.Events as E
15-
import Http
16-
import Json.Decode as Decode
1711
import Request exposing (..)
1812
import Types.Feed exposing (..)
1913

@@ -28,81 +22,6 @@ close url =
2822
[ H.text "×" ]
2923

3024

31-
onEnter : Msg -> H.Attribute Msg
32-
onEnter msg =
33-
let
34-
isEnter key =
35-
if key == 13 then
36-
Decode.succeed msg
37-
38-
else
39-
Decode.fail "keyCode != 13"
40-
in
41-
E.on "keydown" <| Decode.andThen isEnter E.keyCode
42-
43-
44-
discoverFeedsFieldset : String -> Html Msg
45-
discoverFeedsFieldset discoveryUrl =
46-
H.fieldset [ A.class "border-2 p-2" ]
47-
[ H.legend [] [ H.text "Discover feeds on a site" ]
48-
, H.label
49-
[ A.for "feed-url" ]
50-
[ H.text "Address to discover feeds on" ]
51-
, H.input
52-
[ A.id "feed-url"
53-
, A.type_ "url"
54-
, A.value discoveryUrl
55-
, E.onInput SetDiscoveryUrl
56-
, onEnter <| DiscoverFeeds discoveryUrl
57-
]
58-
[]
59-
, H.button
60-
[ A.class "px-4 py-2 text-sm font-extrabold bg-blue-700 text-white"
61-
, E.onClick <| DiscoverFeeds discoveryUrl
62-
]
63-
[ H.text "Discover" ]
64-
, H.p
65-
[]
66-
[ H.text "Enter the address of a site that contains one or more feeds. "
67-
, H.text "Make sure it starts with "
68-
, H.code [] [ H.text "http://" ]
69-
, H.text " or "
70-
, H.code [] [ H.text "https://" ]
71-
, H.text "."
72-
]
73-
]
74-
75-
76-
discoverFeedFieldset : Html Msg
77-
discoverFeedFieldset =
78-
H.fieldset [ A.class "border-2 p-2" ]
79-
[ H.legend [] [ H.text "Add feed by address" ]
80-
, H.form [ A.method "GET", A.action "/feeds/new/" ]
81-
[ H.label [ A.for "add-feed-url" ] [ H.text "Address of the feed" ]
82-
, H.input
83-
[ A.id "add-feed-url"
84-
, A.type_ "url"
85-
, A.name "url"
86-
]
87-
[]
88-
, H.input
89-
[ A.class "px-4 py-2 text-sm font-extrabold bg-blue-700 text-white"
90-
, A.type_ "submit"
91-
, A.value "Discover"
92-
]
93-
[]
94-
]
95-
, H.p []
96-
[ H.text "Enter the address of an RSS or Atom feed. "
97-
, H.text "Make sure it starts with "
98-
, H.code [] [ H.text "http://" ]
99-
, H.text " or "
100-
, H.code [] [ H.text "https://" ]
101-
, H.text "."
102-
]
103-
]
104-
105-
10625
inProgressFieldset : String -> Html Msg
10726
inProgressFieldset url =
10827
H.fieldset [ A.class "border-2 p-2" ]

0 commit comments

Comments
 (0)