From 7f4137b59d8e51defa2b781d856ab35ed111bc39 Mon Sep 17 00:00:00 2001 From: Dan Holmsand Date: Wed, 14 Sep 2016 20:45:59 +0200 Subject: [PATCH] Prepare for 0.6.0 --- CHANGELOG.md | 2 +- demo/reagentdemo/news.cljs | 2 + demo/reagentdemo/news/news060rc.cljs | 70 +++++++++++++++++++++ demo/reagentdemo/news/news060release.cljs | 75 ++++++++--------------- 4 files changed, 99 insertions(+), 50 deletions(-) create mode 100644 demo/reagentdemo/news/news060rc.cljs diff --git a/CHANGELOG.md b/CHANGELOG.md index b4902ac..1d08c17 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ # Changelog -## Upcoming +## 0.6.0 - React updated to 15.2.1 diff --git a/demo/reagentdemo/news.cljs b/demo/reagentdemo/news.cljs index 84f3567..3a78c0d 100644 --- a/demo/reagentdemo/news.cljs +++ b/demo/reagentdemo/news.cljs @@ -6,12 +6,14 @@ [reagentdemo.news.news050 :as news050] [reagentdemo.news.news051 :as news051] [reagentdemo.news.news060 :as news060] + [reagentdemo.news.news060rc :as news060rc] [reagentdemo.news.news060release :as news060r] [sitetools.core :as tools])) (defn main [] [:div [news060r/main {:summary true}] + [news060rc/main {:summary true}] [news060/main {:summary true}] [news051/main {:summary true}] [news050/main {:summary true}] diff --git a/demo/reagentdemo/news/news060rc.cljs b/demo/reagentdemo/news/news060rc.cljs new file mode 100644 index 0000000..b0093e8 --- /dev/null +++ b/demo/reagentdemo/news/news060rc.cljs @@ -0,0 +1,70 @@ +(ns reagentdemo.news.news060rc + (:require [reagent.core :as r] + [reagent.debug :refer-macros [dbg println]] + [reagentdemo.syntax :as s] + [sitetools.core :as tools :refer [link]] + [reagentdemo.news.news060 :as news060] + [reagentdemo.common :as common :refer [demo-component]])) + +(def url "/news/news060-rc.html") +(def title "Reagent 0.6.0-rc") + +(def ns-src (s/syntaxed "(ns example.core + (:require [reagent.core :as r]))")) + +(defn mixed [] + [:div + "Symbols are " 'ok " as well as " :keywords "."]) + +(def some-atom (r/atom 0)) + +(defn confusion-avoided [] + [:div "This is some atom: " some-atom]) + + +(defn main [{:keys [summary]}] + [:div.reagent-demo + [:h1 [link {:href url} title]] + [:div.demo-text + [:p "Reagent 0.6.0-rc has been given a lot of testing, a new + version of React (15.1.0), bug fixing and some small general + improvements since 0.6.0-alpha. It has one new feature: general + ClojureScript objects can now be used anywhere in markup + content."] + + (if summary + [link {:href url :class 'news-read-more} "Read more"] + [:div.demo-text + [:section.demo-text + [:p "See " [link {:href news060/url} "this + article"] " for more information about Reagent 0.6.0."] + + [:h2 "Generalized markup"] + + [:p "Symbols and keywords can now be used in markup content + like this: "] + + [demo-component {:comp mixed + :src (s/src-of [:mixed])}] + + [:p "This makes content conversions behave the same as in + attributes, where symbols and keywords have been supported + before. "] + + [:p "But mainly it avoids confusing error messages when you + happen to drop an arbitrary ClojureScript object into the + markup, like this: "] + + [demo-component {:comp confusion-avoided + :src (s/src-of [:some-atom + :confusion-avoided])}] + + [:p "This may not be particularly useful, but it is at least a + lot better than getting a quite confusing error message from + React, that no longer accepts unknown objects…"] + + [:p "Any object hat satisfies IPrintWithWriter is allowed, and + is converted to a string using " [:code "pr-str" "."]]]])]]) + + +(tools/register-page url [#'main] title) diff --git a/demo/reagentdemo/news/news060release.cljs b/demo/reagentdemo/news/news060release.cljs index 2b2b0c0..4ee77d7 100644 --- a/demo/reagentdemo/news/news060release.cljs +++ b/demo/reagentdemo/news/news060release.cljs @@ -2,69 +2,46 @@ (:require [reagent.core :as r] [reagent.debug :refer-macros [dbg println]] [reagentdemo.syntax :as s] + [reagentdemo.common :as common :refer [demo-component]] [sitetools.core :as tools :refer [link]] [reagentdemo.news.news060 :as news060] - [reagentdemo.common :as common :refer [demo-component]])) + [reagentdemo.news.news060rc :as news060rc])) (def url "/news/news060.html") -(def title "Reagent 0.6.0-rc") +(def title "Reagent 0.6.0") (def ns-src (s/syntaxed "(ns example.core (:require [reagent.core :as r]))")) -(defn mixed [] - [:div - "Symbols are " 'ok " as well as " :keywords "."]) +(def changelog + "https://github.com/reagent-project/reagent/blob/master/CHANGELOG.md") -(def some-atom (r/atom 0)) - -(defn confusion-avoided [] - [:div "This is some atom: " some-atom]) +(defn abstract [] + [:div.demo-text + [:p + "Reagent 0.6.0 has a new version of React (15.2.1), and a few + bug fixes. Otherwise it is identical to 0.6.0-rc."]]) +(defn story [] + [:div.demo-text + [:p + "See " [link {:href news060/url} "this story"] + " for much more information about Reagent 0.6.0."] + [:p + "You can also have a look at the " + [link {:href news060rc/url} "news in 0.6.0-rc"] + " and the " [link {:href changelog} "change log"] + "."]]) (defn main [{:keys [summary]}] [:div.reagent-demo - [:h1 [link {:href url} title]] - [:div.demo-text - [:p "Reagent 0.6.0-rc has been given a lot of testing, a new - version of React (15.1.0), bug fixing and some small general - improvements since 0.6.0-alpha. It has one new feature: general - ClojureScript objects can now be used anywhere in markup - content."] - + [:h1 + [link {:href url} title]] + [:div + [abstract] (if summary [link {:href url :class 'news-read-more} "Read more"] - [:div.demo-text - [:section.demo-text - [:p "See " [link {:href news060/url} "this - article"] " for more information about Reagent 0.6.0."] - - [:h2 "Generalized markup"] - - [:p "Symbols and keywords can now be used in markup content - like this: "] - - [demo-component {:comp mixed - :src (s/src-of [:mixed])}] - - [:p "This makes content conversions behave the same as in - attributes, where symbols and keywords have been supported - before. "] - - [:p "But mainly it avoids confusing error messages when you - happen to drop an arbitrary ClojureScript object into the - markup, like this: "] - - [demo-component {:comp confusion-avoided - :src (s/src-of [:some-atom - :confusion-avoided])}] - - [:p "This may not be particularly useful, but it is at least a - lot better than getting a quite confusing error message from - React, that no longer accepts unknown objects…"] - - [:p "Any object hat satisfies IPrintWithWriter is allowed, and - is converted to a string using " [:code "pr-str" "."]]]])]]) - + [:section.demo-text + [story]])]]) (tools/register-page url [#'main] title)