Releases: day8/re-com
1.1.0
1.0.0
Breaking Changes
- Sorry, but the API for popovers has slightly changed and you will have to tweak your code (double sorry). There's every chance the changes you'll make will be simple and mechanical. Full particulars are given below.
re-com.css
has changed so please grab this latest version for your code.- In fact, please grab this updated one: re-com.css.
Changes
- Popover changes:
- Popovers now automatically adjust their
:position
to prevent (as much as possible) them being clipped by the screen edges (thanks to @richiardiandrea and @tomek for inspiration and some of their code from http:/clojurescript.io) - Popovers now fade in when initially showing on screen
- Added
:success
status topopover-tooltip
- In the demo, renamed Popover Args page to Popover Reference and added "The Basics" section which shows sample code and corresponding popover
- In the demo, added an advanced topic "Component hierarchy of a Popover" to the end of the Popover Reference page
- Popovers now automatically adjust their
- Input-text changes:
- Added
:validating
and:success
status forinput-text
fields
- Added
- Throbber changes:
- Added
:smaller
version - which we then used ininput-text
for status
- Added
- Addressed #86 - Note about api namespace in docs.
- Renamed
:component-function
to:reagent-render
in form-3 components (and added:display-name
). - Promoted popover and typeahead components to Stable.
- In the demo left navbar, made any line without a panel a little greyer to emphasise Introduction and Layout panels (and turned cursor to a hand for those with panels).
- The demo right panel now scrolls back to top when you change panels.
- Removed develop branch. Updated release procedures and CONTRIBUTING.md.
- Added Dirac support.
- Added Add CircleCI tests.
- In the demo, bumped transit-cljs to
0.8.239
to override the version pulled in by storage-atom to prevent compiler warnings about uuid? and boolean? being replaced. - In project.clj, renamed various lein aliases:
- run => dev-once
- debug => dev-auto
- run-prod => prod-once
- debug-prod => prod-auto
- run-test => test-once
- debug-test => test-auto
Fixes
- Merged #110 - fix missing core.async dependency error.
- Merged #111 - Bug-fix for new reagent 0.6.0.
- Fixed a bug where popovers don't move to the correct new position when the position is changed while the popover is showing.
Breaking Popover Changes
In this version, the way popover-anchor-wrapper
interacts with its :popover
child has changed. This child is typically a popover-content-wrapper
.
You will need to search for all occurrences of popover-content-wrapper
in your app (the child), and then, depending on the way it is used, make one of the two changes described below.
1. Simple Change
When, popover-content-wrapper
is used to directly create the :popover
child of popover-anchor-wrapper
, like this sketch:
[popover-anchor-wrapper
...
:popover [popover-content-wrapper
...]]
You need to remove the :showing?
and :position
parameters given to the inner popover-content-wrapper
. That's all.
You see :showing?
and :position
args are no longer statically supplied to the child popover-content-wrapper
because the parent popover-anchor-wrapper
now "injects" them at run time.
Supplying :showing?
and :position
at this inner level was always unnecessary duplication of what was already given in the outer popover-anchor-wrapper
, so this is actually a nice simplification.
2. Harder Change
If you provide an alternative to popover-content-wrapper
like this:
[popover-anchor-wrapper
...
:popover [my-content-wrapper ;; <--- not popover-content-wrapper
arg1 arg2 arg3]]
then we need to talk about how popover-anchor-wrapper
will "inject" parameters into the :popover
child you have supplied.
In the code sketch above, it looks like only 3 arguments will be supplied to my-content-wrapper
: arg1
, arg2
and arg3
. But, starting with this version, popover-anchor-wrapper
(the parent) injects two named arguments into the popup child my-content-wrapper
. The two named arguments are :showing-injected?
and :position-injected
. Both are atoms.
So while it might appear like this in the code:
[my-content-wrapper arg1 arg2 arg3]
at runtime, it will actually be like this:
[my-content-wrapper arg1 arg2 arg3 :showing-injected? showing?
:position-injected position ]`
so, just to be clear four args have been added:
:showing-injected? showing?
:position-injected position`
So your :popover
component (aka my-content-wrapper
above) must be re-written to accept these two "injected" named arguments.
Typically, my-content-wrapper
will itself use popover-content-wrapper
, in which case, the transformation you must make will look like this:
Before:
(defn my-content-wrapper
[showing? position arg3 arg4]
...
[popover-content-wrapper
:showing? showing?
:position position
:on-cancel #(swap! showing? not)
:body [...]]
...)
After:
(defn my-content-wrapper ;; <--- remove showing?/position from all calls to this
[arg3 arg4 & {:keys [showing-injected? position-injected]}] ;; <--- remove showing?/position & add injected versions
...
[popover-content-wrapper
:showing-injected? showing-injected? ;; <--- new arg name and value for showing?
:position-injected position-injected ;; <--- new arg name and value for position
:on-cancel #(swap! showing-injected? not) ;; <--- also rename other occurrences
:body [...]]
...)
0.9.0
Changes
- This release is mostly about pull requests, so thanks to everyone for your helpful contributions.
- Merged #105 - Added typeahead component. Special thanks to blak3mill3r for such a significant contribution and a lovely new demo page.
- Merged #44 - Added ability for the current selection of a dropdown list to have a title attribute. See "Dropdown with grouping" demo in the dropdown page (hover over the country dropdown).
- Merged #108 - Decoupled label from rendering function in dropdown. See "Custom markup" demo in the dropdown page.
- Merged #89 - Added
:start-of-week
for datepicker. datepicker page updated. - Merged #57 - Added a split between the left navbar and content of the demo. Note that splits are percentage-based and the default percent is optimised for a Full HD display. demo updated.
- Merged #106 - Added
:dev-cider
profile with piggieback for cider cljs repl. - Bumped:
- Clojure to 1.8.0
- ClojureScript to 1.9.14
- cljsbuild to 1.1.3
- reagent to 0.6.0-rc
- storage-atom to 2.0.1
- figwheel to 0.5.4-7
- lein-ancient to 0.6.10
- Turned ClojureScript repl off
Fixes
- Prevent React 15 error messages about "unitless numbers".
0.8.3
Switched back to Reagent 0.6.0-alpha
as Leiningen will not release with dependencies on -SNAPSHOT
versions.
Please note that the re-com library has been successfully tested against 0.6.0-SNAPSHOT
. Only the demo needed changes as explained in the previous release.
0.8.2
Changes
- Bumped dependencies:
- [reagent "0.6.0-SNAPSHOT"]
Fixes
- Make the demo app compatible with the new Reagent:
- Fix
<ul> cannot appear as a descendant of <p>
error message by moving[:ul]
(and[:ol]
and[:div]
) tags out of[:p]
and[p]
in various demo pages - The way the
h-box
demo was writing to a reaction is no longer allowed (not very idiomatic anyway). Fixed this (with another hack that works)
- Fix
0.8.1
Changes
- Bumped dependencies:
- [lein-cljsbuild "1.1.2"]
- [figwheel "0.5.2"]
- [lein-ancient "0.6.7"]
- [com.andrewmcveigh/cljs-time "0.4.0"]
Fixes
- Fixed single-dropdown bug. When you press home/end keys in filtered lists and the filtered list was empty, an unhandled exception occurrs
- Correct
:closure-defines
to "goog.DEBUG" - Fixed #96 [figwheel "0.5.2"] Causes figwheel configuration error
0.8.0
Breaking Changes
- Updated
re-com.css
, please update your copies. RemovedSegoe UI Semilight
from re-com.css as this doesn't render correctly in Chrome for Windows/Mac and well, we prefer the look of Roboto for our title fonts anyway.
Changes
- Added the two unique
datepicker-dropdown
argument to the datepicker demo page
Fixes
- Merged #78 - Fix clickable area for month navigation chevron buttons in datepicker
- Merged #71 - hide the tooltip when a button is disabled
- Merged #54 - Added the event to on-click callbacks (previously callback functions
- Merged #80 - Fix for #79 Validation fails when attempting to register a capture phase event handler
- Re-fixed
popover
bug where:no-clip?
popovers would be repositioned incorrectly if they were within scrolled scrollbars - Added
:no-clip?
topopover-tooltip
(defaults to true, unlike normal popovers) so it doesn't suffer clipping issues - Also added
:no-clip?
todatepicker-dropdown
for the same reason - Added a feature to most buttons to prevent the tooltip from still showing after a button is included in a drag/drop
single-dropdown
no longer fires anon-change
if the currently selected item is selected
0.7.0
No additional changes since alpha2. Combined list of changes and fixes...
Changes
- Added two new
popover-content-wrapper
arguments::position-offset
- px offset of the arrow from its default:position
along the popover border. Is ignored when:position
is one of the:xxx-center
variants. Positive numbers slide the popover toward its center.:arrow-gap
- px gap between the anchor and the arrow tip. Positive numbers push the popover away from the anchor.
- Bumped the following:
- clojurescript ("1.7.48" ==> "1.7.145")
- reagent ("0.5.1-rc3" ==> "0.5.1")
- cljs-time ("0.3.10" ==> "0.3.14")
- And some dev dependencies
- Remember, it is the deps in your app's project.clj which determines which version of these libs are ultimately used.
Fixes
- In
popover-content-wrapper
, the:arrow-length
argument never worked. Although it drew an arrow of the correct size, it positioned the arrow 11px away from the popover no matter what number was specified. id-fn
andlabel-fn
fixes and fixes and improvements:- In
tab
components:- Fixed
validate-fn
(fn?
=>ifn?
) for:id-fn
and:label-fn
to allow keywords - Improved types and descriptions
- Fixed
- In
selection-list
:- Fixed default for
:label-fn
from'str
to:label
- Improved types and descriptions
- Fixed default for
- In
dropdown
:- Fixed
validate-fn
(vector?
=>vector-of-maps?
) for:choices
- Fixed
- In
- Fixed #59 - Components in splitter panels not updating
- Fixed #61 - datepicker-dropdown should deref-or-value model
- Fixed a popover bug where, if you have an element with relative or absolute positioning, then any child popovers with :no-clip? set to true will not be positioned correctly. e.g., if there was a :no-clip? popover within another :no-clip? popover, the position of the nested one would be wrong
- Fixed inline styles in alert-box demos
0.7.0-alpha2
Changes
- Bumped the following:
- clojurescript ("1.7.48" ==> "1.7.145")
- reagent ("0.5.1-rc3" ==> "0.5.1")
- cljs-time ("0.3.10" ==> "0.3.14")
- And some dev dependencies
- Remember, your app will determine which version of these libs are used by re-com.
Fixes
- Fixed #59 - Components in splitter panels not updating
- Fixed #61 - datepicker-dropdown should deref-or-value model
- Fixed a popover bug where, if you have an element with relative or absolute positioning, then any child popovers with :no-clip? set to true will not be positioned correctly. e.g., if there was a :no-clip? popover within another :no-clip? popover, the position of the nested one would be wrong
- Fixed inline styles in alert-box demos
0.7.0-alpha1
Changes
- Added two new
popover-content-wrapper
arguments::position-offset
- px offset of the arrow from its default:position
along the popover border. Is ignored when:position
is one of the:xxx-center
variants. Positive numbers slide the popover toward its center.:arrow-gap
- px gap between the anchor and the arrow tip. Positive numbers push the popover away from the anchor.
Fixes
- In
popover-content-wrapper
, the:arrow-length
argument never worked. Although it drew an arrow of the correct size, it positioned the arrow 11px away from the popover no matter what number was specified. id-fn
andlabel-fn
fixes and fixes and improvements:- In
tab
components:- Fixed
validate-fn
(fn?
=>ifn?
) for:id-fn
and:label-fn
to allow keywords - Improved types and descriptions
- Fixed
- In
selection-list
:- Fixed default for
:label-fn
from'str
to:label
- Improved types and descriptions
- Fixed default for
- In
dropdown
:- Fixed
validate-fn
(vector?
=>vector-of-maps?
) for:choices
- Fixed
- In