on develop help sign in
Merge remote-tracking branch 'origin/develop' into undeprecate-reflex-basic-widgets
commitbcafebcebd5a0107b09e0c2899aeeb5319056b21 authorMatthew Bauer <mjbauer95@gmail.com> dateThu 13 Feb 2020, 11:32 (7 years ago) parent2e24ed06424eb9
7 files changed+38−18
cabal.project+1 dep/reflex-platform/github.json+3−3 reflex-dom-core/ChangeLog.md+13 reflex-dom-core/reflex-dom-core.cabal+5−5 reflex-dom-core/src/Reflex/Dom/Builder/Immediate.hs+5−10 reflex-dom-core/test/hydration.hs+10 reflex-dom/ChangeLog.md+1
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 @@
11{
22 "owner": "reflex-frp",
33 "repo": "reflex-platform",
4− "branch": "develop",
5− "rev": "e7b76dd552a10916c7d8702c11292dac4f4299ea",
6− "sha256": "0s1183arrwldcs50qhzgnv94v24n9bgq6dfq64wp0a3q2nzyvgwh"
4+ "branch": "master",
5+ "rev": "510b990d0b11f0626afbec5fe8575b5b2395391b",
6+ "sha256": "09cmahsbxr0963wq171c7j139iyzz49hramr4v9nsf684wcwkngv"
77}
reflex-dom-core/ChangeLog.md+13
@@ -2,6 +2,10 @@
22
33## Unreleased
44
5+* Support GHC 8.8.
6+
7+* Fix attribute support for explicitly namespaced elements
8+
59* Remove deprecation warnings for the following widgets in
610 `Reflex.Dom.Widget.Basic`:
711
@@ -37,21 +41,30 @@
3741## 0.5.2
3842
3943* Update to use new dependent-sum/map packages and drop dependency on `*Tag` classes (e.g., `ShowTag`).
44+
4045* Update version bounds of base, containers, and stm
46+
4147* Update to use the newly split `these`/`semialign` packages. To use the pre-split `these` package, set the `split-these` flag to false.
48+
4249* Reintroduce "data-ssr": elements without this attribute are skipped during
4350 hydration.
51+
4452* Fix an issue in the hydration tests that prevented the test from finding the chromium executable
53+
4554* Relax constraints on `dyn` and `widgetHold` to match the ones in `networkView` and `networkHold` respectively
55+
4656* 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
4757
4858## 0.5.1
4959
5060* Added support for marking elements with a "data-skip-hydration" attribute, which will cause hydration to ignore and skip over them.
61+
5162* Removed "data-ssr" attributes from statically rendered output.
5263
5364## 0.5
5465
5566* Add HydrationDomBuilderT to support hydration of statically rendered DOM nodes. See the note at the top of Reflex.Dom.Builder.Immediate.
67+
5668* 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.
69+
5770* 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
4848 hs-source-dirs: src
4949 build-depends:
5050 aeson >= 0.8 && < 1.5,
51− base >= 4.7 && < 4.13,
51+ base >= 4.7 && < 4.14,
5252 bifunctors >= 4.2 && < 6,
5353 bimap >= 0.3 && < 0.4,
5454 blaze-builder,
@@ -69,11 +69,11 @@ library
6969 lens >= 4.7 && < 5,
7070 monad-control >= 1.0.1 && < 1.1,
7171 mtl >= 2.1 && < 2.3,
72− primitive >= 0.5 && < 0.7,
72+ primitive >= 0.5 && < 0.8,
7373 random,
7474 ref-tf == 0.4.*,
7575 reflex >= 0.6.2 && < 0.7,
76− semigroups >= 0.16 && < 0.19,
76+ semigroups >= 0.16 && < 0.20,
7777 stm >= 2.4 && < 2.6,
7878 text == 1.2.*,
7979 transformers >= 0.3 && < 0.6,
@@ -84,7 +84,7 @@ library
8484 hs-source-dirs: src-ghcjs
8585 build-depends:
8686 ghcjs-base,
87− hashable == 1.2.*
87+ hashable >= 1.2 && < 1.4
8888 else
8989 hs-source-dirs: src-ghc
9090 if !os(windows)
@@ -92,7 +92,7 @@ library
9292
9393 if flag(split-these)
9494 build-depends:
95− semialign >= 1 && < 1.1,
95+ semialign >= 1 && < 1.2,
9696 these >= 1 && < 1.1
9797 else
9898 build-depends:
reflex-dom-core/src/Reflex/Dom/Builder/Immediate.hs+5−10
@@ -141,7 +141,7 @@ import Data.Text (Text)
141141import Foreign.JavaScript.Internal.Utils
142142import Foreign.JavaScript.TH
143143import 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)
145145import GHCJS.DOM.EventM (EventM, event, on)
146146import GHCJS.DOM.KeyboardEvent as KeyboardEvent
147147import GHCJS.DOM.MouseEvent
@@ -767,15 +767,10 @@ hydrateElement elementTag cfg child = do
767767 let skipAttr = "data-hydration-skip" :: DOM.JSString
768768 ssrAttr = "data-ssr" :: DOM.JSString
769769 shouldSkip :: DOM.Element -> HydrationRunnerT t m Bool
770− shouldSkip e = case cfg ^. namespace of
771− Nothing -> do
772− skip <- hasAttribute e skipAttr
773− ssr <- hasAttribute e ssrAttr
774− pure $ skip || not ssr
775− Just ns -> do
776− skip <- hasAttributeNS e (Just ns) skipAttr
777− ssr <- hasAttributeNS e (Just ns) ssrAttr
778− pure $ skip || not ssr
770+ shouldSkip e = do
771+ skip <- hasAttribute e skipAttr
772+ ssr <- hasAttribute e ssrAttr
773+ pure $ skip || not ssr
779774 childDom <- liftIO $ readIORef childDelayedRef
780775 let rawCfg = extractRawElementConfig cfg
781776 doc <- askDocument
reflex-dom-core/test/hydration.hs+10
@@ -22,6 +22,7 @@
2222
2323import Prelude hiding (fail)
2424import Control.Concurrent
25+import Control.Lens.Operators
2526import Control.Monad hiding (fail)
2627import Control.Monad.Catch
2728import Control.Monad.Fail
@@ -770,6 +771,15 @@ tests withDebugging wdConfig caps _selenium = do
770771 prerender_ (pure ()) (liftIO $ trigger "Client")
771772 textNode $ TextNodeConfig "Initial" $ Just e
772773
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+
773783 describe "runWithReplace" $ session' $ do
774784 it "works" $ runWD $ do
775785 replaceChan :: Chan Text <- liftIO newChan
reflex-dom/ChangeLog.md+1
@@ -18,4 +18,5 @@
1818## 0.5
1919
2020* Re-export new hydration widget "mainWidget" functions.
21+
2122* The use-warp flag now properly takes precedence on macOS.