Prepare for 0.6.0

This commit is contained in:
Dan Holmsand 2016-09-14 20:45:59 +02:00
parent b4c9b4d537
commit 7f4137b59d
4 changed files with 99 additions and 50 deletions

View File

@ -1,7 +1,7 @@
# Changelog
## Upcoming
## 0.6.0
- React updated to 15.2.1

View File

@ -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}]

View File

@ -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)

View File

@ -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)