on develop help sign in
Remove deprecation warnings for Reflex.Dom.Widget.Basic

These were added in 0.5.3, but ended up being a burden on users. For now, they will remain in Reflex.Dom.Widget.Basic until a better alternative emerges. A separate widget toolkit may eventually contain these opinionated widgets. Note that deprecations from Reflex.Dom.Widget.Input in 0.5.3 still stand.

commit2e24ed0fb861d1004f87ebf07cc1096a8788e0ba authorMatthew Bauer <mjbauer95@gmail.com> dateWed 12 Feb 2020, 16:37 (7 years ago) parent94c2607
2 files changed+13−7
reflex-dom-core/ChangeLog.md+13 reflex-dom-core/src/Reflex/Dom/Widget/Basic.hs−7
reflex-dom-core/ChangeLog.md+13
@@ -1,5 +1,18 @@
11# Revision history for reflex-dom-core
22
3+## Unreleased
4+
5+* Remove deprecation warnings for the following widgets in
6+ `Reflex.Dom.Widget.Basic`:
7+
8+ * `Link`
9+ * `button`
10+ * `dtdd`
11+ * `linkClass`
12+ * `link`
13+ * `tabDisplay`
14+ * `tableDynAttr`
15+
316## 0.5.3
417
518* Deprecate a number of old inflexible widget helpers in `Reflex.Dom.Widget.Basic`:
reflex-dom-core/src/Reflex/Dom/Widget/Basic.hs−7
@@ -138,7 +138,6 @@ dynComment t = do
138138display :: (PostBuild t m, DomBuilder t m, Show a) => Dynamic t a -> m ()
139139display = dynText . fmap (T.pack . show)
140140
141−{-# DEPRECATED button "Use 'elAttr'' in combination with 'domEvent' instead" #-}
142141button :: DomBuilder t m => Text -> m (Event t ())
143142button t = do
144143 (e, _) <- element "button" def $ text t
@@ -272,25 +271,21 @@ dynamicAttributesToModifyAttributesWithInitial attrs0 d = do
272271 return $ if Map.null p then Nothing else Just p
273272 return modificationsNeeded
274273
275−{-# DEPRECATED Link "Will be removed when 'linkClass' and 'link' are removed. Follow those functions' deprecation instructions." #-}
276274newtype Link t
277275 = Link { _link_clicked :: Event t ()
278276 }
279277
280−{-# DEPRECATED linkClass "Use 'elAttr'' in combination with 'domEvent' for just clicks. Use 'routeLink' for Obelisk navigation" #-}
281278linkClass :: DomBuilder t m => Text -> Text -> m (Link t)
282279linkClass s c = do
283280 (l,_) <- elAttr' "a" ("class" =: c) $ text s
284281 return $ Link $ domEvent Click l
285282
286−{-# DEPRECATED link "Use 'elAttr'' in combination with 'domEvent' for just clicks. Use 'routeLink' for Obelisk navigation" #-}
287283link :: DomBuilder t m => Text -> m (Link t)
288284link s = linkClass s ""
289285
290286divClass :: forall t m a. DomBuilder t m => Text -> m a -> m a
291287divClass = elClass "div"
292288
293−{-# DEPRECATED dtdd "Use an application specific widget generating function" #-}
294289dtdd :: forall t m a. DomBuilder t m => Text -> m a -> m a
295290dtdd h w = do
296291 el "dt" $ text h
@@ -301,7 +296,6 @@ blank = return ()
301296
302297-- TODO: Move to an example project.
303298-- | A widget to display a table with static columns and dynamic rows.
304−{-# DEPRECATED tableDynAttr "Use an application specific widget generating function" #-}
305299tableDynAttr :: forall t m r k v. (Ord k, DomBuilder t m, MonadHold t m, PostBuild t m, MonadFix m)
306300 => Text -- ^ Class applied to <table> element
307301 -> [(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
321315-- | A widget to construct a tabbed view that shows only one of its child widgets at a time.
322316-- Creates a header bar containing a <ul> with one <li> per child; clicking a <li> displays
323317-- the corresponding child and hides all others.
324−{-# DEPRECATED tabDisplay "Use an application specific widget generating function" #-}
325318tabDisplay :: forall t m k. (MonadFix m, DomBuilder t m, MonadHold t m, PostBuild t m, Ord k)
326319 => Text -- ^ Class applied to <ul> element
327320 -> Text -- ^ Class applied to currently active <li> element