re-frame/CHANGES.md

492 lines
24 KiB
Markdown
Raw Normal View History

2017-10-07 06:35:04 +00:00
## Unreleased
2017-10-30 11:19:52 +00:00
#### New
2017-10-07 06:35:04 +00:00
2017-10-30 11:19:52 +00:00
- add `purge-event-queue` to the API. See https://github.com/Day8/re-frame-test/issues/13 for motivation.
- added [a new FAQ entry](/docs/FAQs/DoINeedReFrame.md) Reagent looks terrific. Why do I need re-frame?
2017-10-07 06:35:04 +00:00
## 0.10.2 (2017.10.07)
2017-10-07 06:32:10 +00:00
#### New Features
- On dispose callbacks now run on JVM re-frame. [#386](https://github.com/Day8/re-frame/pull/386).
- Log warnings when tracing is not enabled and you try to add a trace callback [#395](https://github.com/Day8/re-frame/pull/395).
2017-08-28 07:13:19 +00:00
#### New Docs
- added [a new FAQ entry](/docs/FAQs/PollADatabaseEvery60.md) How do I turn on/off polling a database every 60 secs (hint: effects)
- added [a new FAQ entry](/docs/FAQs/FullStackReframe.md) How do I do full-stack re-frame?
2017-10-07 06:32:10 +00:00
- Added a gitbook for re-frame docs [#414](https://github.com/Day8/re-frame/pull/414).
- Lots of spelling fixes, for which we are eternally grateful.
2017-08-28 07:13:19 +00:00
## 0.10.1 (2017.08.17)
- fix a showstopper bug introduced at the last minute in v0.10.0
2017-08-16 02:55:58 +00:00
## 0.10.0 (2017.08.16)
2017-03-26 22:32:19 +00:00
#### New Docs
- added [API documentation](/docs/API.md)
- added [testing docs](/docs/Testing.md)
- added [a new mental model](/docs/MentalModelOmnibus.md#on-dsls-and-machines)
- added [a new FAQ entry](/docs/FAQs/When-Does-Dispatch-Happen.md) on dispatch processing
2017-08-07 14:32:26 +00:00
- added [a new FAQ entry](/docs/FAQs/DB_Normalisation.md) on representing normalised data in `app-db`
- added [a new FAQ entry](/docs/FAQs/GlobalInterceptors.md) on how to register a global interceptor
2017-08-05 05:30:13 +00:00
#### Breaking
2017-07-22 00:04:39 +00:00
- [#357](https://github.com/Day8/re-frame/pull/357)
I'd be amazed if this actually broke any apps. Shocked! But, better safe than sorry.
The effect handler for `:db` has changed: if the new value provided tests
`identical?` to the existing value within `app-db`, then `app-db` is not `reset!`.
Previously, `app-db` was always `reset!` irrespective,
which potentially caused Layer 2 subscriptions to run unnecessarily. So this is a tiny
efficiency change in this edge case, and it results in behaviour that better matches
2017-07-22 00:04:39 +00:00
programmer intuitions.
#### Minor Fixes and Improvements
2017-05-28 22:58:37 +00:00
2017-08-15 22:27:28 +00:00
- [#400](https://github.com/Day8/re-frame/pull/400) Improve error message when a registered cofx can't be found
- The effect handler for `:dispatch-n` will now ignore `nils`. [See checkin](https://github.com/Day8/re-frame/commit/6efdae438f393f8121a2d6dfbf76db00e6dafbf5)
2017-07-14 07:53:34 +00:00
- [#340](https://github.com/Day8/re-frame/pull/340)
2017-08-16 02:55:58 +00:00
- [#341](https://github.com/Day8/re-frame/pull/341) Fix `re-frame.core/on-changes` to work even if event handler does not set `:db`.
- [#395](https://github.com/Day8/re-frame/pull/395) Warn users if they try to enable tracing without setting the closure define `re-frame.trace.trace-enabled?`.
2017-07-16 09:44:28 +00:00
2017-06-01 04:25:52 +00:00
## 0.9.4 (2017.06.01)
2017-05-14 20:29:01 +00:00
2017-06-01 04:25:52 +00:00
#### Improvements
- added a CITATION.md file
2017-05-28 22:58:37 +00:00
- re-frame now supports self-hosted ClojureScript at an alpha/unofficial/experimental level. It may be removed in the future if it causes problems elsewhere. [#325](https://github.com/Day8/re-frame/pull/325)
2017-05-14 20:29:01 +00:00
## 0.9.3 (2017.05.15)
2017-05-18 20:39:23 +00:00
2017-05-14 20:26:04 +00:00
#### Breaking (previously undefined behaviour)
2017-04-30 20:44:32 +00:00
2017-05-14 20:26:04 +00:00
- `reg-sub` enforces using `:<-` to indicate subscription inputs. Previously any keyword would have worked here. While using anything other than `:<-` was undefined behaviour previously, this could possibly break some code when upgrading. Thanks to [@Sohalt](https://github.com/Sohalt) [#336](https://github.com/Day8/re-frame/pull/336).
2017-04-30 20:44:32 +00:00
2017-03-26 22:32:19 +00:00
#### Fixes
- `re-frame.interceptor/update-coeffect` has been fixed. [#328](https://github.com/Day8/re-frame/pull/328)
2017-05-14 20:26:04 +00:00
- Fix ns form in `re-frame.interceptor`. Thanks to [@ggeoffrey](https://github.com/ggeoffrey). [#338](https://github.com/Day8/re-frame/pull/338)
- Even more spelling fixes.
2017-03-26 22:32:19 +00:00
2017-05-14 20:29:01 +00:00
## 0.9.2 (2017.02.09)
2017-02-28 21:46:29 +00:00
#### Improvements
- Update dependency on reagent from `0.6.0-rc` to `0.6.0`.
- A truckload of tweaks, spelling fixes, and general improvements to the docs. A big thanks to everyone who contributed!
#### Fixes
- Use `:devDependencies` instead of `:dependencies` for the lein-npm Karma dependencies. This stops consumers of re-frame with the lein-npm plugin from having to install Karma and friends.
- Correct `:id` of on-changes interceptor from `:enrich` to `:on-changes`
## 0.9.1 (2016.12.20)
#### Fixes
- [#296](https://github.com/Day8/re-frame/issues/296) Dynamic subscriptions weren't working in re-frame 0.9.0. This has been rectified. The hosts responsible have been taken underground for reprocessing.
2016-12-17 07:29:47 +00:00
## 0.9.0 (2016.12.15) - The Dolores Release
2016-10-19 10:27:34 +00:00
2017-05-14 20:29:01 +00:00
Welcome, board members. Dr Ford has created a new [6-part narrative](README.md),
2016-12-15 02:49:13 +00:00
and Bernard [some infographics](/docs/EventHandlingInfographic.md). Anyone seen Dolores?
2016-12-13 21:57:28 +00:00
2016-10-19 10:27:34 +00:00
#### Headline
2016-12-13 21:57:28 +00:00
- The [README](README.md) and [/docs](/docs/README.md) have been substantially reworked.
2016-12-11 12:46:55 +00:00
- [#218](https://github.com/Day8/re-frame/issues/218) Make it okay to use `subscribe` in Form-1 components. This is a big deal.
2016-08-22 04:21:38 +00:00
#### Breaking
- Due to the new tracing features using `goog-define` (described below), re-frame now requires ClojureScript 1.7.48 or above. See [Parameterizing ClojureScript Builds](https://www.martinklepsch.org/posts/parameterizing-clojurescript-builds.html) for more information.
2016-12-15 05:28:17 +00:00
#### Migrating
- Added `clear-subscription-cache!` function. You should call this when you are hot reloading code to ensure that any bad subscriptions that cause rendering exceptions are removed. See [Why do we call `clear-subscription-cache!`?](docs/FAQs/Why-Clear-Sub-Cache.md) and [reagent-project/reagent#272](https://github.com/reagent-project/reagent/issues/272) for more details.
2016-08-22 04:21:38 +00:00
#### Improvements
2017-05-14 20:29:01 +00:00
- [#200](https://github.com/Day8/re-frame/pull/200) Remove trailing spaces from console logging
2016-12-04 11:26:01 +00:00
- Add `re-frame.loggers/get-loggers` function to well, you know.
- Added experimental tracing features. These are subject to change and remain undocumented at the moment. By default they are disabled, and will be completely compiled out by advanced optimisations. To enable them, set a [`:closure-defines`](https://www.martinklepsch.org/posts/parameterizing-clojurescript-builds.html) key to `{"re_frame.trace.trace_enabled_QMARK_" true}`
- [#223](https://github.com/Day8/re-frame/issues/223) When using `make-restore-fn`, dispose of any subscriptions that were created after the restore function was created.
- [#283](https://github.com/Day8/re-frame/pull/283) Make trim-v interceptor symmetrical, so it adds the missing event id back on to the `:event` coeffect in the `:after` function.
2016-08-22 04:21:38 +00:00
#### Fixes
- [#259](https://github.com/Day8/re-frame/pull/259) Fix a bug where registering a subscription would create and close over dependent subscriptions, meaning that they would never be garbage collected, and doing more work than necessary.
- Fix a bug where subscribing to a subscription that didn't exist would throw an exception, instead of returning nil.
- [#248](https://github.com/Day8/re-frame/pull/248) Provide after interceptor with `db` coeffect, if no `db` effect was produced.
- [#278](https://github.com/Day8/re-frame/issues/278) Provide enrich interceptor with `db` coeffect, if no `db` effect was produced.
2016-12-17 07:29:47 +00:00
## 0.8.0 (2016.08.19) - The Walnuts Release
2016-07-07 04:52:13 +00:00
2017-05-14 20:29:01 +00:00
Staying on the leading edge of new buzzwords is obviously critical for any framework.
Angular's terrifying faceplant is a sobering reminder to us all.
2016-07-23 00:09:19 +00:00
With this release, re-frame's already impressive buzzword muscles
bulge further with new walnuts like "effects", "coeffects", "interceptors"
and "de-duplicated signal graph". I know, right?
2016-07-11 06:53:57 +00:00
Some may even find these new features useful.
2016-08-08 13:16:44 +00:00
Joking aside, this is a substantial release which will change how you use re-frame.
2016-07-19 23:52:39 +00:00
2016-08-19 08:20:21 +00:00
#### Headline
2016-07-19 23:52:39 +00:00
- re-frame subscriptions are now de-duplicated. As a result,
many Signal graphs will be more efficient. The new behaviour better
matches programmer intuitions about what "should" happen.
2016-05-29 13:23:17 +00:00
Each subscription causes a handler to execute, producing
2016-07-07 05:16:49 +00:00
a reactive stream of updates. Two calls to `(subscribe [:some :query])` results in two copies of the same
subscription handler running, each delivering a stream of updates. Now, if these two subscriptions
2016-05-29 13:23:17 +00:00
were running at the same time, this would be inefficient. Both handlers would be
doing the same computations and delivering the same stream of updates. Unnecessary, duplicate work.
Starting with this version, this sort of duplication has been eliminated. Two, or more, concurrent
subscriptions for the same query will now source reactive updates from the one executing handler.
So, how do we know if two subscriptions are "the same"? Answer: two subscriptions
2016-05-29 13:23:17 +00:00
are the same if their query vectors test `=` to each other.
So, these two subscriptions are *not* "the same": `[:some-event 42]` `[:some-event "blah"]`. Even
though they involve the same event id, `:some-event`, the query vectors do not test `=`.
- added a new subscription handler registration function called `re-frame.core/reg-sub`. It is an
alternative to `re-frame.core/register-sub` (now renamed to `re-frame.core/reg-sub-raw`).
`reg-sub` is significantly easier to use and understand,
while often also being more performant. The design has really fallen out nicely and we're
delighted with it.
With `reg-sub`, you no longer need to use `reaction` explicitly. Subscription handlers are now pure
2016-08-08 13:16:44 +00:00
which makes them easier to understand, trace and test etc. Plus, as you'll see in the docs, there is some
gratuitous syntactic sugar. Who doesn't like sugar?
2016-07-26 01:41:42 +00:00
At this point, the todomvc example represents the best tutorial on the subject:
2016-07-07 04:52:13 +00:00
https://github.com/Day8/re-frame/blob/master/examples/todomvc/src/todomvc/subs.cljs
2016-08-22 00:01:33 +00:00
- re-frame now supports the notion of Event Handlers accepting coeffects and returning effects. <br>
There's now three kinds of event handlers: `-db`, `-fx` and `-ctx`. <br>
For a tutorial see: https://github.com/Day8/re-frame/tree/master/docs <br>
2017-05-14 20:29:01 +00:00
For Effect Handler examples see:
2016-07-15 13:50:33 +00:00
1. https://github.com/Day8/re-frame-http-fx
2. https://github.com/Day8/re-frame-forward-events-fx
3. https://github.com/Day8/re-frame-async-flow-fx
2016-08-08 13:16:44 +00:00
- You can now run and debug re-frame tests on the JVM.
2017-05-14 20:29:01 +00:00
Just to be clear: this does not mean you can run re-frame apps on the JVM (there's no React or
2016-08-08 13:16:44 +00:00
Reagent available). But you can debug your event handler tests using full JVM tooling goodness.
2017-05-14 20:29:01 +00:00
@samroberton and @escherize have provided the thought leadership and drive here. They converted
2016-10-13 04:44:29 +00:00
re-frame to `.cljc`, supplying pluggable interop for both the `js` and `jvm` platforms.
2016-07-26 01:41:42 +00:00
2017-05-14 20:29:01 +00:00
Further, they have worked with @danielcompton to create a library of testing utilities which
2016-08-08 13:16:44 +00:00
will hopefully evolve into a nice step forward on both platforms: <br>
2016-08-16 02:24:49 +00:00
https://github.com/Day8/re-frame-test
2016-07-26 01:41:42 +00:00
2017-05-14 20:29:01 +00:00
Work is ongoing in this area.
- the undo/redo features buried in re-frame has been factored out into
2016-08-08 13:16:44 +00:00
[a standalone library](https://github.com/Day8/re-frame-undo).
2017-05-14 20:29:01 +00:00
2016-08-03 07:36:18 +00:00
undo and redo have been a part of re-frame from the beginning, but they have never officially
2017-05-14 20:29:01 +00:00
been made a part of the API, and have not been documented. So it nice to see it available, and fully
documented.
2016-08-03 07:36:18 +00:00
This new library includes [various enhancements](https://github.com/Day8/re-frame-undo#harvesting-and-re-instating)
2016-08-15 01:55:19 +00:00
over that which previously existed, and it works in with effectful handlers described above.
2017-05-14 20:29:01 +00:00
- Middleware is dead, long live Interceptors.
Up until now, re-frame has allowed you to decorate event handlers with
2016-08-08 13:16:44 +00:00
middleware which looked after the cross cutting concerns of
2017-05-14 20:29:01 +00:00
tracing, undo/redo, validation, etc. This has proved a neat and
2016-08-08 13:16:44 +00:00
successful part of the framework. We thought we were happy.
2017-05-14 20:29:01 +00:00
But recently @steveb8n gave a cljsyd talk on
Pedestal's Interceptor pattern which suddenly transformed them from
arcane to delightfully simple in 20 mins. Interceptors are
really "middleware via data" rather than "middleware via higher order functions".
2017-05-14 20:29:01 +00:00
So it is another way of doing the same thing, but thanks to @steveb8n
Interceptors appear a more flexible base, and simpler.
Interceptors also dovetail really nicely with the effects and coeffects
story which has emerged in re-frame through this 0.8.0 release.
Docs: https://github.com/Day8/re-frame/tree/master/docs
2017-05-14 20:29:01 +00:00
- we now have a logo designed by Sketch Maester @martinklepsch. Thank you Martin! But remember, no
2016-07-26 01:41:42 +00:00
good deed ever goes unpunished - we'll be pestering you every time from now on :-)
2016-07-22 23:45:54 +00:00
2016-08-19 08:20:21 +00:00
#### Breaking
2016-07-22 10:41:37 +00:00
- requires Reagent >= v0.6.0
2016-08-03 07:36:18 +00:00
- `re-frame.core/register-handler` has been renamed `re-frame.core/reg-event-db`. There's now
three kinds of event-handlers, `-db`, `-fx` and `-ctx`. Event handlers of the 2nd and 3rd kinds
2017-05-14 20:29:01 +00:00
should be registered via the new registration functions `re-frame.core/reg-event-fx` and
2016-08-03 07:36:18 +00:00
`re-frame.core/reg-event-ctx`
- `re-frame.core/register-sub` has been renamed `re-frame.core/reg-sub-raw`. This is to indicate that
2016-08-03 07:36:18 +00:00
this kind of registration is now considered the low level, close to the metal way to
create subscriptions handlers. This release introduced `reg-sub` which becomes the preferred way
to register subscription handlers.
2017-05-14 20:29:01 +00:00
- middlewares have been replaced by Interceptors. In day to day use, there's a good
chance you won't notice the change UNLESS:
1. You have written your own middleware. If so, you'll have to rewrite it.
See how [the builtin interceptors are done](https://github.com/Day8/re-frame/blob/master/src/re_frame/std_interceptors.cljc).
2017-05-14 20:29:01 +00:00
2. You explicitly use `comp` to compose middleware like this:
```clj
2017-05-14 20:29:01 +00:00
(reg-event-db
:some-id
(comp debug tim-v) ;; <-- change to [debug trim-v]
2017-05-14 20:29:01 +00:00
(fn [db event]
...))
```
2017-05-14 20:29:01 +00:00
- if you have previously used the undo/redo capabilities buried in re-frame, be aware they have
2016-08-03 07:36:18 +00:00
extracted into a sibling library: https://github.com/Day8/re-frame-undo.
- By default, re-frame uses `js/console` functions like `error` and `warn` when logging, but you can
supply alternative functions using `re-frame.core/set-loggers!`.
With this release, any alternatives you supply will be called with different parameters.
Previously loggers were called with a single `str` parameter but now they are expected to act
2016-05-30 21:50:49 +00:00
like `console.log` itself and take variadic, non string params. Sorry to break things, but
we are trying to maximise use of cljs-devtools and information is lost when strings are
output, instead of actual data.
Of course, you need only worry about this if you are using `re-frame.core/set-loggers!` to
hook in your own loggers. If you are, then, to transition, you'll need to tweak like this:
2016-05-30 21:50:49 +00:00
```
2016-05-30 22:04:36 +00:00
;; your old log function might have looked like this. Single string parameter.
(defn my-logger [s] (do-something-with s))
2016-05-30 21:50:49 +00:00
;; your new version will have variadic params, and turn them into a string
2016-05-30 22:04:36 +00:00
(defn my-logger [& args] (do-something-with (apply str args))
2016-05-30 21:50:49 +00:00
```
2016-08-19 08:20:21 +00:00
#### Improvements
2016-07-07 06:05:37 +00:00
- Bug fix: `post-event-callbacks` were not called when `dispatch-sync` was called.
2017-05-14 20:29:01 +00:00
- added new API `re-frame.core/clear-post-event-callback` which de-registers a callback
previously added by `re-frame.core/add-post-event-callback`
- when an event-handler makes no change to `app-db`, the `debug` middleware now logs a
single line saying so, rather than a "group". Makes it slightly easier to grok
2016-05-29 13:23:17 +00:00
the absence of change.
- Standardised test namespaces: renamed to use -test suffix and moved to eliminate redundant /test folder
- Added cljs.test based tests via browser/html. These mimic original karma tests. NOTE: previous
lein aliases `once` and `auto` have been replaced by `test-once` , `test-auto` & `karma-once`
see [CONTRIBUTING.md](CONTRIBUTING.md)
## 0.7.0 (2016-03-14)
2015-12-16 18:26:30 +00:00
Breaking:
- removed middleware `log-ex`. It is no longer needed because browsers now correctly report the
2016-10-13 04:44:29 +00:00
throw site of re-thrown exceptions. In the unlikely event that you absolutely still need it,
the source for `log-ex` is still in `middleware.cljs`, commented out. Just transfer it to your project.
- `debug` middleware now produces slightly different output (to console). So no code will need to change,
just your expectations of what you see in console. Previously all console output from an event handler was put
into the one console group, which could lead to exceptions being hidden (down in a closed group).
2015-12-16 18:26:30 +00:00
Improvements:
2016-08-21 14:11:57 +00:00
- added one tick of extra pause when events have `:flush-dom` metadata. Previously, there were odd times when
the pause wasn't long enough to ensure redraws.
- now compatible with Reagent 0.6.0 (but this not fully tested) while remaining backwards compatible with
Reagent v0.5.1
2015-12-16 18:26:30 +00:00
- [#138](https://github.com/Day8/re-frame/pull/138) Switch to using CircleCI and automated testing with Karma
2016-01-28 22:07:58 +00:00
Fixed:
- [#149](https://github.com/Day8/re-frame/pull/149) Undo now discards oldest undo states, not the newest ones.
2015-12-08 20:40:47 +00:00
## 0.6.0 (2015-12-09)
New API:
- [#118](https://github.com/Day8/re-frame/pull/118) - Add `add-post-event-callback` to the API.
2016-10-13 04:44:29 +00:00
@pupeno is developing [prerenderer](https://carouselapps.com/prerenderer) which looks pretty neat.
Support this effort by adding a way for prerenderer to hook event processing.
2015-12-10 11:44:58 +00:00
- `on-changes` middleware now official. No longer experimental.
Improvements:
- [#134](https://github.com/Day8/re-frame/pull/134)
My thanks to @scgilardi for a nice simplification of the routing state machine. Again!
- [#133](https://github.com/Day8/re-frame/pull/133) Improve Readme formatting
## 0.5.0 (2015-11-5)
New Features:
- [#108](https://github.com/Day8/re-frame/pull/108) - Add dynamic subscriptions.
2015-11-05 07:32:06 +00:00
Docs to follow, and your cheque is in the mail.
2015-07-17 02:43:22 +00:00
2015-11-02 12:43:19 +00:00
Improvements:
2015-07-17 02:43:22 +00:00
- fixed problem with log grouping
- removed `-------New Event-------` log msg
- made groups collapsed by default
2015-11-05 07:32:06 +00:00
- [#104](https://github.com/Day8/re-frame/pull/104) - Updated to the latest TodoMVC CSS
- Reimplemented the router loop. Removed use of core.async. Replaced with hand rolled scheduling.
2015-11-04 02:33:50 +00:00
See [420e42a](https://github.com/Day8/re-frame/commit/420e42aacccbac2d81fedc5ff861442a4ce70c1d)
As a result:
- there is less of a pause between a `dispatch` and the associated event handler being run. (<1ms vs 5ms??)
- groups of events queued up will be handled in a batch, one after the other, without yielding
2015-11-04 02:33:50 +00:00
to the browser (previously re-frame yielded to the browser before every single event).
This fixes issues like [#39](https://github.com/Day8/re-frame/pull/39) and
2015-11-02 11:56:18 +00:00
[#121](https://github.com/Day8/re-frame/pull/121)
2015-11-04 02:33:50 +00:00
I doubt this will affect normal apps. But it could affect games which depend on existing timings. Maybe.
It could affect apps which dispatch large volumes of events (telemetry?) very quickly. Maybe.
2015-04-26 21:38:37 +00:00
2015-05-28 13:15:47 +00:00
## v0.4.1 (2015-05-29)
2015-05-08 14:06:38 +00:00
2015-05-28 13:15:47 +00:00
Improvements:
- fix #65 - Detect mistaken use of middleware factories
- `examples/` now work with figwheel
2015-04-26 21:38:37 +00:00
## v0.4.0 (2015-05-04)
Headline:
- Exceptions in event handlers no longer break the router loop.
Previously, any exception in an event handler broke the app
permanently. This change will:
- improve the debugging experience with figwheel
- mean apps, in production, stand a chance of reporting UHE
to the user, and can perhaps even recover to a sane state.
- #53 Fix Logging And Error Reporting
2016-10-13 04:44:29 +00:00
You can now provide your own logging functions.
Further explanation [here](https://github.com/Day8/re-frame/wiki/FAQ#3-can-re-frame-use-my-logging-functions).
Deprecated:
- `log-ex` middleware is no longer needed. Simply remove its use.
Sometime in the last couple of months, changes to the CLJS
runtime meant that useful exceptions could escape go-loops, and
good stack traces appear (at least in Chrome).
2015-04-26 21:38:37 +00:00
New Features:
- #52 Add a way to purge redos `(dispatch [:purge-redos])`
When trying to recover from an UHE, do an undo to get back to the
last sane state, and then use this new feature to purge the
just-generated-redo.
- #43 Add ability to clear handlers (event and subs) via
2015-05-03 09:04:31 +00:00
two new API functions:
- re-frame.core/clear-sub-handlers!
- re-frame.core/clear-event-handlers!
Useful for those using the [ClojureScript fork](https://github.com/quile/component-cljs) of [Component](https://github.com/stuartsierra/component).
2015-04-26 21:38:37 +00:00
Experimental:
- #50 Add "reaction-like" middleware called `on-changes`.
Other:
- improve some comments in todomvc example
2015-03-05 23:47:28 +00:00
2015-04-21 14:18:31 +00:00
## v0.3.2 (2015-04-21)
2015-04-17 13:49:31 +00:00
2015-04-21 14:18:31 +00:00
Improvements:
- Fix #42 - Put in checks for dispatch-sync
- Fix #49 - add table of content and link to wiki for middleware
2015-04-21 14:22:54 +00:00
- Fix #46 - Minor typos fixed
2015-04-17 13:49:31 +00:00
2015-04-17 12:34:40 +00:00
## v0.3.1 (2015-04-18)
2015-04-15 14:13:11 +00:00
2015-04-17 12:34:40 +00:00
Various small improvements and bug fixes:
2015-04-17 12:51:03 +00:00
- log-ex middleware added to core api (it was a mistake that it was missing)
2015-04-17 12:34:40 +00:00
- modest improves to simple example. Better comments, layout, etc.
- the anonymous functions in standard middleware now have meaningful
names, which makes stack traces easier to understand.
2015-04-16 06:04:41 +00:00
- #24 - Fix missing paren in README
2015-04-15 14:26:49 +00:00
- #31 - Fix list formatting in README
2015-04-16 06:04:41 +00:00
- #32 - fix a broken wiki link
- #30 - Fix up the enrich docstring
2015-04-15 14:22:40 +00:00
2015-04-15 13:02:37 +00:00
## v0.3.0 (2015-04-15)
2015-03-13 22:47:31 +00:00
### Headline
2015-04-15 13:02:37 +00:00
- the middleware `after` and `enrich` now call the supplied function `f` with
both `db` and `v` (previously just `db`). Because javascript is so forgiving
about function arity, this change is backwards compatible.
2015-03-17 11:49:24 +00:00
- new event handler middleware `log-ex` for correctly printing handler stacktraces.
See [explanation](https://github.com/Day8/re-frame/wiki/Debugging-Event-Handlers#1-an-exception-is-thrown).
2015-03-13 22:47:31 +00:00
- ongoing improvements to the docs in Wiki
2015-03-13 22:47:31 +00:00
### Other
2015-04-15 13:02:37 +00:00
- move to reagent v0.5.0
2015-03-17 11:49:24 +00:00
- fix undo bug which could result in incorrect explanations.
2015-03-13 22:47:31 +00:00
- improve todomvc's use of localstorage
- experimental work with slimmer.js for testing
2015-04-15 13:02:37 +00:00
- correct README wiki links
2015-03-13 22:47:31 +00:00
- license.txt was incorrectly named previously
2015-03-05 23:47:28 +00:00
## v0.2.0 (2015-03-06)
### Breaking
Renames:
- `register-pure-handler` renamed to `register-handler` (and existing low level `register-handler` becomes `register-handler-base` but is not a part of the API).
- remove `apply-event` middleware and replace with similar `trim-v`
- rename `register-subs` to `register-sub` (avoid confusion over possible plurals)
- rename `set-max-undos` to `set-max-undos!`
Changes:
- `undoable` middleware is now a factory. Where before you used this `undoable`,
you must now use this `(undoable "some explanation")`. See further below.
### Headline
2015-03-06 02:02:30 +00:00
- exceptions in handler now reported more sanely via console.error.
(core.async really messes with a good stack)
2015-03-05 23:47:28 +00:00
- example `todomvc` available in examples folder.
- Wiki documentation is now more substantial.
2015-03-06 02:02:30 +00:00
- introduce new handler middleware: `debug`, `enrich` and `after`
2015-03-05 23:47:28 +00:00
### Other:
- exceptions in a go loop are a special type of hell. Improve the reporting of exceptions happening in event handlers.
- allow Middleware to be registered as a vector. data > functions > macros
- fix two bugs in undo implementation
- name licence file correctly, thanks to @smith
- fix typo in readme, thanks to @btheado
- Readme now admits to 200 lines of code, not 100.
- dispatch now explicitly returns nil
- travis integration (not that we have any tests currently)
### Details On Undo Changes
2015-03-06 02:02:30 +00:00
The undo/redo feature built into re-frame is now more functional
(at the cost of a breaking change).
2015-03-05 23:47:28 +00:00
2015-03-06 02:02:30 +00:00
There is now an explanation associated with each undo state describing
modification. This allows an app to inform the user what actions
they will be undoing or redoing.
2015-03-05 23:47:28 +00:00
2015-03-06 02:02:30 +00:00
Previously `undoable` was simply middleware, but it is now a middleware factory.
2015-03-05 23:47:28 +00:00
2015-03-06 02:02:30 +00:00
Essentially, that means you can't use it "plain" anymore, and instead you must
call it, like this `(undoable "Some explanation")`
2015-03-05 23:47:28 +00:00
The `explanation` provided to undoable must be either a `string` (static
2015-03-06 02:02:30 +00:00
explanation) or a function `(db event) -> string`, allowing you to customize
the undo message based on details of the event.