on develop help sign in
Merge branch 'develop' into avoid-run-with-replace-when-hydrating
97dd3bcElliot Cameron
cabal.projectnew file+1
@@ -0,0 +1 @@
1+packages: reflex-dom-core, reflex-dom
dep/reflex-platform/github.json+3−3
@@ -1,7 +1,7 @@
1{
1{
2 "owner": "reflex-frp",
2 "owner": "reflex-frp",
3 "repo": "reflex-platform",
3 "repo": "reflex-platform",
4− "branch": "develop",
4+ "branch": "master",
5− "rev": "e7b76dd552a10916c7d8702c11292dac4f4299ea",
5+ "rev": "510b990d0b11f0626afbec5fe8575b5b2395391b",
6− "sha256": "0s1183arrwldcs50qhzgnv94v24n9bgq6dfq64wp0a3q2nzyvgwh"
6+ "sha256": "09cmahsbxr0963wq171c7j139iyzz49hramr4v9nsf684wcwkngv"
7}
7}
reflex-dom-core/ChangeLog.md+15
@@ -1,5 +1,11 @@
1# Revision history for reflex-dom-core
1# Revision history for reflex-dom-core
2
2
3+## Unreleased
4+
5+* Support GHC 8.8.
6+
7+* Fix attribute support for explicitly namespaced elements
8+
3## 0.5.3
9## 0.5.3
4
10
5* Deprecate a number of old inflexible widget helpers in `Reflex.Dom.Widget.Basic`:
11* Deprecate a number of old inflexible widget helpers in `Reflex.Dom.Widget.Basic`:
@@ -24,21 +30,30 @@
24## 0.5.2
30## 0.5.2
25
31
26* Update to use new dependent-sum/map packages and drop dependency on `*Tag` classes (e.g., `ShowTag`).
32* Update to use new dependent-sum/map packages and drop dependency on `*Tag` classes (e.g., `ShowTag`).
33+
27* Update version bounds of base, containers, and stm
34* Update version bounds of base, containers, and stm
35+
28* Update to use the newly split `these`/`semialign` packages. To use the pre-split `these` package, set the `split-these` flag to false.
36* Update to use the newly split `these`/`semialign` packages. To use the pre-split `these` package, set the `split-these` flag to false.
37+
29* Reintroduce "data-ssr": elements without this attribute are skipped during
38* Reintroduce "data-ssr": elements without this attribute are skipped during
30 hydration.
39 hydration.
40+
31* Fix an issue in the hydration tests that prevented the test from finding the chromium executable
41* Fix an issue in the hydration tests that prevented the test from finding the chromium executable
42+
32* Relax constraints on `dyn` and `widgetHold` to match the ones in `networkView` and `networkHold` respectively
43* Relax constraints on `dyn` and `widgetHold` to match the ones in `networkView` and `networkHold` respectively
44+
33* Fix prerender for RequesterT so that it doesn't accidentally discard a request that is made at the same moment as getPostBuild's Event fires
45* Fix prerender for RequesterT so that it doesn't accidentally discard a request that is made at the same moment as getPostBuild's Event fires
34
46
35## 0.5.1
47## 0.5.1
36
48
37* Added support for marking elements with a "data-skip-hydration" attribute, which will cause hydration to ignore and skip over them.
49* Added support for marking elements with a "data-skip-hydration" attribute, which will cause hydration to ignore and skip over them.
50+
38* Removed "data-ssr" attributes from statically rendered output.
51* Removed "data-ssr" attributes from statically rendered output.
39
52
40## 0.5
53## 0.5
41
54
42* Add HydrationDomBuilderT to support hydration of statically rendered DOM nodes. See the note at the top of Reflex.Dom.Builder.Immediate.
55* Add HydrationDomBuilderT to support hydration of statically rendered DOM nodes. See the note at the top of Reflex.Dom.Builder.Immediate.
56+
43* As a result of the hydration changes, the Prerender class has changed, the type of `prerender` has changed and it is now a class method.
57* As a result of the hydration changes, the Prerender class has changed, the type of `prerender` has changed and it is now a class method.
58+
44* Add the Reflex.Dom.Xhr.FormData module to make posting formdata over xhr more convenient.
59* Add the Reflex.Dom.Xhr.FormData module to make posting formdata over xhr more convenient.
reflex-dom-core/reflex-dom-core.cabal+5−5
@@ -48,7 +48,7 @@ library
48 hs-source-dirs: src
48 hs-source-dirs: src
49 build-depends:
49 build-depends:
50 aeson >= 0.8 && < 1.5,
50 aeson >= 0.8 && < 1.5,
51− base >= 4.7 && < 4.13,
51+ base >= 4.7 && < 4.14,
52 bifunctors >= 4.2 && < 6,
52 bifunctors >= 4.2 && < 6,
53 bimap >= 0.3 && < 0.4,
53 bimap >= 0.3 && < 0.4,
54 blaze-builder,
54 blaze-builder,
@@ -69,11 +69,11 @@ library
69 lens >= 4.7 && < 5,
69 lens >= 4.7 && < 5,
70 monad-control >= 1.0.1 && < 1.1,
70 monad-control >= 1.0.1 && < 1.1,
71 mtl >= 2.1 && < 2.3,
71 mtl >= 2.1 && < 2.3,
72− primitive >= 0.5 && < 0.7,
72+ primitive >= 0.5 && < 0.8,
73 random,
73 random,
74 ref-tf == 0.4.*,
74 ref-tf == 0.4.*,
75 reflex >= 0.6.2 && < 0.7,
75 reflex >= 0.6.2 && < 0.7,
76− semigroups >= 0.16 && < 0.19,
76+ semigroups >= 0.16 && < 0.20,
77 stm >= 2.4 && < 2.6,
77 stm >= 2.4 && < 2.6,
78 text == 1.2.*,
78 text == 1.2.*,
79 transformers >= 0.3 && < 0.6,
79 transformers >= 0.3 && < 0.6,
@@ -84,7 +84,7 @@ library
84 hs-source-dirs: src-ghcjs
84 hs-source-dirs: src-ghcjs
85 build-depends:
85 build-depends:
86 ghcjs-base,
86 ghcjs-base,
87− hashable == 1.2.*
87+ hashable >= 1.2 && < 1.4
88 else
88 else
89 hs-source-dirs: src-ghc
89 hs-source-dirs: src-ghc
90 if !os(windows)
90 if !os(windows)
@@ -92,7 +92,7 @@ library
92
92
93 if flag(split-these)
93 if flag(split-these)
94 build-depends:
94 build-depends:
95− semialign >= 1 && < 1.1,
95+ semialign >= 1 && < 1.2,
96 these >= 1 && < 1.1
96 these >= 1 && < 1.1
97 else
97 else
98 build-depends:
98 build-depends:
reflex-dom-core/src/Reflex/Dom/Builder/Immediate.hs+5−10
@@ -141,7 +141,7 @@ import Data.Text (Text)
141import Foreign.JavaScript.Internal.Utils
141import Foreign.JavaScript.Internal.Utils
142import Foreign.JavaScript.TH
142import Foreign.JavaScript.TH
143import GHCJS.DOM.Document (Document, createDocumentFragment, createElement, createElementNS, createTextNode, createComment)
143import GHCJS.DOM.Document (Document, createDocumentFragment, createElement, createElementNS, createTextNode, createComment)
144−import GHCJS.DOM.Element (getScrollTop, removeAttribute, removeAttributeNS, setAttribute, setAttributeNS, hasAttribute, hasAttributeNS)
144+import GHCJS.DOM.Element (getScrollTop, removeAttribute, removeAttributeNS, setAttribute, setAttributeNS, hasAttribute)
145import GHCJS.DOM.EventM (EventM, event, on)
145import GHCJS.DOM.EventM (EventM, event, on)
146import GHCJS.DOM.KeyboardEvent as KeyboardEvent
146import GHCJS.DOM.KeyboardEvent as KeyboardEvent
147import GHCJS.DOM.MouseEvent
147import GHCJS.DOM.MouseEvent
@@ -766,15 +766,10 @@ hydrateElement elementTag cfg child = do
766 let skipAttr = "data-hydration-skip" :: DOM.JSString
766 let skipAttr = "data-hydration-skip" :: DOM.JSString
767 ssrAttr = "data-ssr" :: DOM.JSString
767 ssrAttr = "data-ssr" :: DOM.JSString
768 shouldSkip :: DOM.Element -> HydrationRunnerT t m Bool
768 shouldSkip :: DOM.Element -> HydrationRunnerT t m Bool
769− shouldSkip e = case cfg ^. namespace of
769+ shouldSkip e = do
770− Nothing -> do
771− skip <- hasAttribute e skipAttr
770+ skip <- hasAttribute e skipAttr
772− ssr <- hasAttribute e ssrAttr
771+ ssr <- hasAttribute e ssrAttr
773− pure $ skip || not ssr
774− Just ns -> do
775− skip <- hasAttributeNS e (Just ns) skipAttr
776− ssr <- hasAttributeNS e (Just ns) ssrAttr
777− pure $ skip || not ssr
772+ pure $ skip || not ssr
778 childDom <- liftIO $ readIORef childDelayedRef
773 childDom <- liftIO $ readIORef childDelayedRef
779 let rawCfg = extractRawElementConfig cfg
774 let rawCfg = extractRawElementConfig cfg
780 doc <- askDocument
775 doc <- askDocument
reflex-dom-core/test/hydration.hs+10
@@ -22,6 +22,7 @@
22
22
23import Prelude hiding (fail)
23import Prelude hiding (fail)
24import Control.Concurrent
24import Control.Concurrent
25+import Control.Lens.Operators
25import Control.Monad hiding (fail)
26import Control.Monad hiding (fail)
26import Control.Monad.Catch
27import Control.Monad.Catch
27import Control.Monad.Fail
28import Control.Monad.Fail
@@ -770,6 +771,15 @@ tests withDebugging wdConfig caps _selenium = do
770 prerender_ (pure ()) (liftIO $ trigger "Client")
771 prerender_ (pure ()) (liftIO $ trigger "Client")
771 textNode $ TextNodeConfig "Initial" $ Just e
772 textNode $ TextNodeConfig "Initial" $ Just e
772
773
774+ describe "namespaces" $ session' $ do
775+ it "dyn can be nested in namespaced widget" $ runWD $ do
776+ testWidget (pure ()) (checkTextInTag "svg" "one") $ do
777+ let svgRootCfg = def
778+ & (elementConfig_namespace ?~ "http://www.w3.org/2000/svg")
779+ & (elementConfig_initialAttributes .~ ("width" =: "100%" <> "height" =: "100%" <> "viewBox" =: "0 0 1536 2048"))
780+ void $ element "svg" svgRootCfg $ do
781+ dyn_ $ text "one" <$ pure ()
782+
773 describe "runWithReplace" $ session' $ do
783 describe "runWithReplace" $ session' $ do
774 it "works" $ runWD $ do
784 it "works" $ runWD $ do
775 replaceChan :: Chan Text <- liftIO newChan
785 replaceChan :: Chan Text <- liftIO newChan
reflex-dom/ChangeLog.md+1
@@ -18,4 +18,5 @@
18## 0.5
18## 0.5
19
19
20* Re-export new hydration widget "mainWidget" functions.
20* Re-export new hydration widget "mainWidget" functions.
21+
21* The use-warp flag now properly takes precedence on macOS.
22* The use-warp flag now properly takes precedence on macOS.