Skip to content

Commit

Permalink
Merge branch 'release/0.6.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Gregg8 committed Aug 12, 2015
2 parents ea2b1e2 + d582f16 commit 1663baf
Show file tree
Hide file tree
Showing 35 changed files with 3,103 additions and 1,248 deletions.
38 changes: 38 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Contributing to re-com

:+1::tada: First off, thanks for taking the time to contribute! :tada::+1:

The following is a set of guidelines for contributing to re-com which is hosted on [Github](https://github.com/Day8/re-com).
These are just guidelines, not rules, use your best judgment and feel free to propose changes to this document in a pull request.

## Creating issues for bugs

Check if the issue has already been reported. If possible provide:

* Version of re-com being used
* Minimal reproduction steps

## Creating issues for features

Use your best judgement on what is needed here.

## Pull requests

**Create pull requests to the develop branch**, work will merged onto master when it is ready to be released.

## Pull requests for bugs

If possible provide:

* Code that fixes the bug
* Failing tests which pass with the new changes
* Improvements to documentation to make it less likely that others will run into issues (if relevant).

## Pull requests for features

If possible provide:

* Code that implements the new feature
* Tests to cover the new feature including all of the code paths
* Docstrings for functions
* Documentation examples
22 changes: 10 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,15 @@ If you are similar, or if you work on Intranet apps where you can mandate a mode
re-com could be ideal for you, right now.

On the other hand, if you target the retail web, you might have to wait till early 2016
(10 months away, at the time of writing).
(5 months away, at the time of writing).

Why? **Well, here's the thing:** the entire layout side of this library plus a few of the widgets
rely on [Flexbox](http://css-tricks.com/snippets/css/a-guide-to-flexbox/)
which only works on [modern browsers](http://caniuse.com/#feat=flexbox), and specifically not IE 9 and 10.


Now, the grinding pain and longevity of IE6 has conditioned many to
expect 8, 9 and 10 to hang around forever too. But, this time around, there's
quite a different dynamic. Microsoft
itself is very actively forcing their demise -
quite a different dynamic. Microsoft itself is very actively forcing their demise -
[come Jan 12th 2016 corporates will have to be on IE11](http://blogs.msdn.com/b/ie/archive/2014/08/07/stay-up-to-date-with-internet-explorer.aspx)

So, by Q1 2016, the market share of IE9 and IE10 will have diminished sufficiently
Expand All @@ -50,14 +48,14 @@ If so, a modern flexbox implementation will be available on all the browsers you
**So that's surprisingly soon, but not now!**

But, even when it comes to modern browsers, there will be teething issues. Based on 5 minutes of
testing once a month, re-com appears to work reasonably on IE11 and Safari. On the other hand,
Firefox has all the speed of a snail
on performance reducing drugs.
So, yeah, "teething issues". (Update: Firefox 38, due May 2015,
[fixes](https://bugzilla.mozilla.org/show_bug.cgi?id=1149339) the performance problems caused by nested flexboxes.)

I can also confirm that none of the components have been designed with mobile in mind, and
that there's no attempt to handle media queries. I said we had a desktop app focus, right?
testing once a month, re-com appears to work reasonably on IE11 and Safari.
On the other hand, Firefox (pre version 38) has all the speed of a snail on performance reducing drugs. Version 38 and beyond
have a [fix](https://bugzilla.mozilla.org/show_bug.cgi?id=1149339) for the performance problems caused by nested flexboxes,
however we are informed by [@frozenlock](https://github.com/frozenlock) that it is still not as fast as Chrome if you are using **deeply** nested flexbox layouts
(much more nested than our demo app).

We can also confirm that none of the components have been designed with mobile in mind, and
that there's no attempt to handle media queries. We said we had a desktop app focus, right?

Neither have we been worried too much about code size because other design goals have
taken precedence. Our main demo app which includes every component, plus all demo
Expand Down
10 changes: 0 additions & 10 deletions dev/figwheel/figwheel_start.cljs

This file was deleted.

2 changes: 1 addition & 1 deletion docs/release-procedure.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Note that all these commands are entered at the repo root folder.
- [ ] Update README.md file if required.
- [ ] If you have made changes, commit and push this branch:
- `git commit -a -m "Bumped version to x.x.x etc."`
- `git push` ==> `git push --set-upstream origin release/x.x.x`
- DIDN'T USE THIS LINE...REMOVE? `git push` ==> `git push --set-upstream origin release/x.x.x`
- [ ] Finish the release:
- `git flow release finish 'x.x.x'`
- Pops up an editor to describe the release. I just put "Version x.x.x".
Expand Down
56 changes: 16 additions & 40 deletions project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,9 @@

(def fig-port 3449)

(defn build-command-map
"Return a map containing a different build command for each supported os"
[base-cmd]
(let [cmd {:windows ["shell" "cmd" "/c" "start"]
:macosx ["shell" "open"]
:linux ["shell" "xdg-open"]}]
{:windows (conj (:windows cmd) base-cmd)
:macosx (conj (:macosx cmd) base-cmd)
:linux (conj (:linux cmd) base-cmd)}))

(def command-lookups {:launch-server-url (build-command-map (str "http://localhost:" fig-port "/index_dev.html"))
:launch-file-url (build-command-map "run/resources/public/index_dev.html")
:launch-prod-url (build-command-map "run/resources/public/index_prod.html")
:launch-test-url (build-command-map "run/test/test.html")})

(defn get-command-for-os
"Return the os-dependent command"
[cmd]
(get-in command-lookups [cmd (leiningen.core.eval/get-os)]))

;; ---------------------------------------------------------------------------------------

(defproject re-com "0.6.0-SNAPSHOT"
(defproject re-com "0.6.0"
:description "Reusable UI components for Reagent"
:url "https://github.com/Day8/re-com.git"
:license {:name "MIT"}
Expand All @@ -49,48 +29,40 @@

:profiles {:dev {:dependencies [[clj-stacktrace "0.2.8"]
[alandipert/storage-atom "1.2.4" ]
[figwheel "0.2.6"]
[figwheel "0.3.7"]
[spellhouse/clairvoyant "0.0-48-gf5e59d3"]
[secretary "1.2.3"]]
:plugins [[lein-cljsbuild "1.0.6"]
[lein-figwheel "0.2.6"]
[lein-shell "0.4.0"]
[lein-figwheel "0.3.7"]
[lein-shell "0.4.1"]
[com.cemerick/clojurescript.test "0.3.3"]
[lein-s3-static-deploy "0.1.1-SNAPSHOT"]
[lein-ancient "0.6.2"]]}
:dev-run {:clean-targets ^{:protect false} ["run/resources/public/compiled_dev"]}
:prod-run {:clean-targets ^{:protect false} ["run/resources/public/compiled_prod"]}
:dev-test {:clean-targets ^{:protect false} ["run/test/compiled"]}}

;:jvm-opts ^:replace ["-Xms2g" "-Xmx2g" "-server"]

:source-paths ["src" "dev"]
:test-paths ["test"]
:resource-paths ["run/resources"]
; :clean-targets [:target-path]

;; Exclude the demo and compiled files from the output of either 'lein jar' or 'lein install'
:jar-exclusions [#"(?:^|\/)re_demo\/" #"(?:^|\/)compiled.*\/"]
:jar-exclusions [#"(?:^|\/)re_demo\/" #"(?:^|\/)demo\/" #"(?:^|\/)compiled.*\/" #"html$"]

:cljsbuild {:builds [{:id "demo"
:source-paths ["src" "dev"]
:source-paths ["src"]
:figwheel {:on-jsload "re-demo.core/mount-demo"}
:compiler {:output-to "run/resources/public/compiled_dev/demo.js"
:output-dir "run/resources/public/compiled_dev/demo"
:main "figwheel-start.core"
:main "re-demo.core"
:asset-path "compiled_dev/demo"
:source-map true
:optimizations :none
:pretty-print true}}
{:id "prod"
:source-paths ["src"]
:compiler {:output-to "run/resources/public/compiled_prod/demo.js"
;:source-map "run/resources/public/compiled_prod/demo.js.map"
:output-dir "run/resources/public/compiled_prod/demo"
:closure-defines {:goog.DEBUG false}
;:source-map-path "js/out" ;; https://github.com/clojure/clojurescript/wiki/Source-maps#web-server-integration
;:main "re-demo.core" ;; Works but not required in this case becasue index_prod.html knows which function to call
;:asset-path "compiled_prod/demo"
;:elide-asserts true
:optimizations :advanced
:pretty-print false
:pseudo-names false}}
Expand All @@ -111,24 +83,28 @@
:s3-static-deploy {:bucket "re-demo"
:local-root "run/resources/public"}}

:shell {:commands {"open" {:windows ["cmd" "/c" "start"]
:macosx "open"
:linux "xdg-open"}}}

:aliases {;; *** DEMO ***

"run" ["with-profile" "+dev-run" "do"
["clean"]
["cljsbuild" "once" "demo"]
~(get-command-for-os :launch-file-url)]
["shell" "open" "run/resources/public/index_dev.html"]]

"debug" ["with-profile" "+dev-run" "do"
["clean"]
~(get-command-for-os :launch-server-url) ;; NOTE: run will initially fail, refresh browser once build complete
~["shell" "open" (str "http://localhost:" fig-port "/index_dev.html")] ;; NOTE: run will initially fail, refresh browser once build complete
["figwheel" "demo"]]

;; *** PROD ***

"run-prod" ["with-profile" "+prod-run" "do"
["clean"]
["cljsbuild" "once" "prod"]
~(get-command-for-os :launch-prod-url)]
["shell" "open" "run/resources/public/index_prod.html"]]

"debug-prod" ["with-profile" "+prod-run" "do"
["run-prod"]
Expand All @@ -144,7 +120,7 @@
"run-test" ["with-profile" "+dev-test" "do"
["clean"]
["cljsbuild" "once" "test"]
~(get-command-for-os :launch-test-url)]
["shell" "open" "run/test/test.html"]]

"debug-test" ["with-profile" "+dev-test" "do"
["run-test"]
Expand Down
Loading

0 comments on commit 1663baf

Please sign in to comment.