on develop help sign in
Merge remote-tracking branch 'meditans/develop' into cn-return-correct-result-for-wheel
42b703eCarlo Nucera
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+26
@@ -1,5 +1,22 @@
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+
9+* Remove deprecation warnings for the following widgets in
10+ `Reflex.Dom.Widget.Basic`:
11+
12+ * `Link`
13+ * `button`
14+ * `dtdd`
15+ * `linkClass`
16+ * `link`
17+ * `tabDisplay`
18+ * `tableDynAttr`
19+
3## 0.5.3
20## 0.5.3
4
21
5* Deprecate a number of old inflexible widget helpers in `Reflex.Dom.Widget.Basic`:
22* Deprecate a number of old inflexible widget helpers in `Reflex.Dom.Widget.Basic`:
@@ -27,21 +44,30 @@
27## 0.5.2
44## 0.5.2
28
45
29* Update to use new dependent-sum/map packages and drop dependency on `*Tag` classes (e.g., `ShowTag`).
46* Update to use new dependent-sum/map packages and drop dependency on `*Tag` classes (e.g., `ShowTag`).
47+
30* Update version bounds of base, containers, and stm
48* Update version bounds of base, containers, and stm
49+
31* Update to use the newly split `these`/`semialign` packages. To use the pre-split `these` package, set the `split-these` flag to false.
50* Update to use the newly split `these`/`semialign` packages. To use the pre-split `these` package, set the `split-these` flag to false.
51+
32* Reintroduce "data-ssr": elements without this attribute are skipped during
52* Reintroduce "data-ssr": elements without this attribute are skipped during
33 hydration.
53 hydration.
54+
34* Fix an issue in the hydration tests that prevented the test from finding the chromium executable
55* Fix an issue in the hydration tests that prevented the test from finding the chromium executable
56+
35* Relax constraints on `dyn` and `widgetHold` to match the ones in `networkView` and `networkHold` respectively
57* Relax constraints on `dyn` and `widgetHold` to match the ones in `networkView` and `networkHold` respectively
58+
36* 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
59* 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
37
60
38## 0.5.1
61## 0.5.1
39
62
40* Added support for marking elements with a "data-skip-hydration" attribute, which will cause hydration to ignore and skip over them.
63* Added support for marking elements with a "data-skip-hydration" attribute, which will cause hydration to ignore and skip over them.
64+
41* Removed "data-ssr" attributes from statically rendered output.
65* Removed "data-ssr" attributes from statically rendered output.
42
66
43## 0.5
67## 0.5
44
68
45* Add HydrationDomBuilderT to support hydration of statically rendered DOM nodes. See the note at the top of Reflex.Dom.Builder.Immediate.
69* Add HydrationDomBuilderT to support hydration of statically rendered DOM nodes. See the note at the top of Reflex.Dom.Builder.Immediate.
70+
46* 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.
71* 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.
72+
47* Add the Reflex.Dom.Xhr.FormData module to make posting formdata over xhr more convenient.
73* 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
@@ -768,15 +768,10 @@ hydrateElement elementTag cfg child = do
768 let skipAttr = "data-hydration-skip" :: DOM.JSString
768 let skipAttr = "data-hydration-skip" :: DOM.JSString
769 ssrAttr = "data-ssr" :: DOM.JSString
769 ssrAttr = "data-ssr" :: DOM.JSString
770 shouldSkip :: DOM.Element -> HydrationRunnerT t m Bool
770 shouldSkip :: DOM.Element -> HydrationRunnerT t m Bool
771− shouldSkip e = case cfg ^. namespace of
771+ shouldSkip e = do
772− Nothing -> do
773− skip <- hasAttribute e skipAttr
772+ skip <- hasAttribute e skipAttr
774− ssr <- hasAttribute e ssrAttr
773+ ssr <- hasAttribute e ssrAttr
775− pure $ skip || not ssr
776− Just ns -> do
777− skip <- hasAttributeNS e (Just ns) skipAttr
778− ssr <- hasAttributeNS e (Just ns) ssrAttr
779− pure $ skip || not ssr
774+ pure $ skip || not ssr
780 childDom <- liftIO $ readIORef childDelayedRef
775 childDom <- liftIO $ readIORef childDelayedRef
781 let rawCfg = extractRawElementConfig cfg
776 let rawCfg = extractRawElementConfig cfg
782 doc <- askDocument
777 doc <- askDocument
reflex-dom-core/src/Reflex/Dom/Widget/Basic.hs−7
@@ -138,7 +138,6 @@ dynComment t = do
138display :: (PostBuild t m, DomBuilder t m, Show a) => Dynamic t a -> m ()
138display :: (PostBuild t m, DomBuilder t m, Show a) => Dynamic t a -> m ()
139display = dynText . fmap (T.pack . show)
139display = dynText . fmap (T.pack . show)
140
140
141−{-# DEPRECATED button "Use 'elAttr'' in combination with 'domEvent' instead" #-}
142button :: DomBuilder t m => Text -> m (Event t ())
141button :: DomBuilder t m => Text -> m (Event t ())
143button t = do
142button t = do
144 (e, _) <- element "button" def $ text t
143 (e, _) <- element "button" def $ text t
@@ -272,25 +271,21 @@ dynamicAttributesToModifyAttributesWithInitial attrs0 d = do
272 return $ if Map.null p then Nothing else Just p
271 return $ if Map.null p then Nothing else Just p
273 return modificationsNeeded
272 return modificationsNeeded
274
273
275−{-# DEPRECATED Link "Will be removed when 'linkClass' and 'link' are removed. Follow those functions' deprecation instructions." #-}
276newtype Link t
274newtype Link t
277 = Link { _link_clicked :: Event t ()
275 = Link { _link_clicked :: Event t ()
278 }
276 }
279
277
280−{-# DEPRECATED linkClass "Use 'elAttr'' in combination with 'domEvent' for just clicks. Use 'routeLink' for Obelisk navigation" #-}
281linkClass :: DomBuilder t m => Text -> Text -> m (Link t)
278linkClass :: DomBuilder t m => Text -> Text -> m (Link t)
282linkClass s c = do
279linkClass s c = do
283 (l,_) <- elAttr' "a" ("class" =: c) $ text s
280 (l,_) <- elAttr' "a" ("class" =: c) $ text s
284 return $ Link $ domEvent Click l
281 return $ Link $ domEvent Click l
285
282
286−{-# DEPRECATED link "Use 'elAttr'' in combination with 'domEvent' for just clicks. Use 'routeLink' for Obelisk navigation" #-}
287link :: DomBuilder t m => Text -> m (Link t)
283link :: DomBuilder t m => Text -> m (Link t)
288link s = linkClass s ""
284link s = linkClass s ""
289
285
290divClass :: forall t m a. DomBuilder t m => Text -> m a -> m a
286divClass :: forall t m a. DomBuilder t m => Text -> m a -> m a
291divClass = elClass "div"
287divClass = elClass "div"
292
288
293−{-# DEPRECATED dtdd "Use an application specific widget generating function" #-}
294dtdd :: forall t m a. DomBuilder t m => Text -> m a -> m a
289dtdd :: forall t m a. DomBuilder t m => Text -> m a -> m a
295dtdd h w = do
290dtdd h w = do
296 el "dt" $ text h
291 el "dt" $ text h
@@ -301,7 +296,6 @@ blank = return ()
301
296
302-- TODO: Move to an example project.
297-- TODO: Move to an example project.
303-- | A widget to display a table with static columns and dynamic rows.
298-- | A widget to display a table with static columns and dynamic rows.
304−{-# DEPRECATED tableDynAttr "Use an application specific widget generating function" #-}
305tableDynAttr :: forall t m r k v. (Ord k, DomBuilder t m, MonadHold t m, PostBuild t m, MonadFix m)
299tableDynAttr :: forall t m r k v. (Ord k, DomBuilder t m, MonadHold t m, PostBuild t m, MonadFix m)
306 => Text -- ^ Class applied to <table> element
300 => Text -- ^ Class applied to <table> element
307 -> [(Text, k -> Dynamic t r -> m v)] -- ^ Columns of (header, row key -> row value -> child widget)
301 -> [(Text, k -> Dynamic t r -> m v)] -- ^ Columns of (header, row key -> row value -> child widget)
@@ -321,7 +315,6 @@ tableDynAttr klass cols dRows rowAttrs = elAttr "div" (Map.singleton "style" "zo
321-- | A widget to construct a tabbed view that shows only one of its child widgets at a time.
315-- | A widget to construct a tabbed view that shows only one of its child widgets at a time.
322-- Creates a header bar containing a <ul> with one <li> per child; clicking a <li> displays
316-- Creates a header bar containing a <ul> with one <li> per child; clicking a <li> displays
323-- the corresponding child and hides all others.
317-- the corresponding child and hides all others.
324−{-# DEPRECATED tabDisplay "Use an application specific widget generating function" #-}
325tabDisplay :: forall t m k. (MonadFix m, DomBuilder t m, MonadHold t m, PostBuild t m, Ord k)
318tabDisplay :: forall t m k. (MonadFix m, DomBuilder t m, MonadHold t m, PostBuild t m, Ord k)
326 => Text -- ^ Class applied to <ul> element
319 => Text -- ^ Class applied to <ul> element
327 -> Text -- ^ Class applied to currently active <li> element
320 -> Text -- ^ Class applied to currently active <li> element
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.