Skip to content

Commit fdc99e2

Browse files
Release version 3.7.0
1 parent 5c0f6ad commit fdc99e2

File tree

5 files changed

+38
-22
lines changed

5 files changed

+38
-22
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## Unreleased
88

9+
## 3.7.0
10+
11+
* Update Fable and make repl available (with warning) on mobile
12+
913
## 3.4.10
1014

1115
* Update Fable

src/App/Loader.fs

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,12 @@ open Feliz.Bulma
1010
type Model =
1111
| Initializing
1212
| Running of Main.Model
13-
| InvalidPlatform
13+
| InvalidPlatform of Option<Router.Page>
1414

1515
type Msg =
16+
| Initialize of Option<Router.Page>
1617
| MainMsg of Main.Msg
1718

18-
let update msg (model : Model) =
19-
match model with
20-
| Initializing -> model, Cmd.none
21-
22-
| Running model ->
23-
match msg with
24-
| MainMsg subMsg ->
25-
let (mainModel, mainCmd) = Main.update subMsg model
26-
Running mainModel, Cmd.map MainMsg mainCmd
27-
28-
| InvalidPlatform ->
29-
model, Cmd.none
30-
3119
let urlUpdate (result: Option<Router.Page>) model =
3220
let (model, cmd) =
3321
match model with
@@ -37,7 +25,7 @@ let urlUpdate (result: Option<Router.Page>) model =
3725

3826
| Running model -> Running model, Cmd.ofMsg (MainMsg Main.UrlHashChange)
3927

40-
| InvalidPlatform -> InvalidPlatform, Cmd.none
28+
| InvalidPlatform p -> InvalidPlatform p, Cmd.none
4129

4230
match result with
4331
| None ->
@@ -57,9 +45,21 @@ let urlUpdate (result: Option<Router.Page>) model =
5745
model, Cmd.batch [ cmd
5846
Cmd.ofMsg (MainMsg Main.Reset) ]
5947

48+
let update msg (model : Model) =
49+
match msg with
50+
| Initialize p -> urlUpdate p Initializing
51+
52+
| MainMsg subMsg ->
53+
match model with
54+
| Initializing
55+
| InvalidPlatform _ -> model, Cmd.none
56+
| Running model ->
57+
let (mainModel, mainCmd) = Main.update subMsg model
58+
Running mainModel, Cmd.map MainMsg mainCmd
59+
6060
let init (result: Option<Router.Page>) =
6161
if ReactDeviceDetect.exports.isMobile then
62-
urlUpdate result InvalidPlatform
62+
InvalidPlatform result |> urlUpdate result
6363
else
6464
urlUpdate result Initializing
6565

@@ -71,7 +71,7 @@ let private view (model: Model) dispatch =
7171
| Running model ->
7272
Main.view model (MainMsg >> dispatch)
7373

74-
| InvalidPlatform ->
74+
| InvalidPlatform p ->
7575
Html.div [
7676
Bulma.hero [
7777
hero.isFullHeight
@@ -96,8 +96,18 @@ let private view (model: Model) dispatch =
9696

9797
Bulma.subtitle.h5 [
9898
text.hasTextCentered
99-
prop.text "is only available on desktop"
99+
prop.text "For best experience we recommend running the REPL on a desktop"
100100
]
101+
102+
Bulma.level [
103+
Bulma.levelItem [
104+
Bulma.button.a [
105+
prop.onClick (fun _ -> Initialize p |> dispatch)
106+
prop.text "Continue"
107+
]
108+
]
109+
]
110+
101111
]
102112
]
103113
]

src/App/Main.fs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -617,6 +617,9 @@ let workerCmd (worker : ObservableWorker<_>)=
617617
| CompilationFinished (jsCode, errors, stats) ->
618618
Ok(jsCode, errors) |> EndCompile |> dispatch
619619
UpdateStats stats |> dispatch
620+
| CompilationsFinished (jsCode, errors, stats) ->
621+
Ok(Array.last jsCode, errors) |> EndCompile |> dispatch
622+
UpdateStats stats |> dispatch
620623
| CompilerCrashed msg -> Error msg |> EndCompile |> dispatch
621624
// Do nothing, these will be handled by .PostAndAwaitResponse
622625
| FoundTooltip _ -> ()

src/App/Prelude.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ open Fable.Core
66

77
[<RequireQualifiedAccess>]
88
module Literals =
9-
let [<Literal>] REPL_VERSION = "3.4.10" // Do not edit manually
9+
let [<Literal>] REPL_VERSION = "3.7.0" // Do not edit manually
1010
let [<Literal>] STORAGE_KEY = "fable-repl"
1111
let [<Literal>] MAX_LOGS_LENGTH = 200
1212
// let [<Literal>] HOST =

src/App/Widgets/Stats.fs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,8 @@ let view (model : Model) =
3535
]
3636

3737
Html.tbody [
38-
row "FCS checker" model.FCS_checker
39-
row "FCS parsing" model.FCS_parsing
40-
row "Fable transform" model.Fable_transform
38+
row "FCS" model.FCS_parsing
39+
row "Fable" model.Fable_transform
4140
]
4241
]
4342
]

0 commit comments

Comments
 (0)