Skip to content

Commit f916312

Browse files
committed
added comments. updated Changelog
1 parent 4c5792b commit f916312

File tree

2 files changed

+97
-54
lines changed

2 files changed

+97
-54
lines changed

CHANGELOG.md

Lines changed: 94 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,134 +1,175 @@
11
# Change Log
2+
23
All notable changes to this project will be documented in this file.
34

45
The format is based on [Keep a Changelog](http://keepachangelog.com/)
56
and this project adheres (more or less) to [Semantic Versioning](http://semver.org/).
67

78
## Unreleased
9+
810
When you submit a PR, add your changes here!
911

12+
### Added
13+
14+
* `timelineContext` is provided to `itemRenderer` #233
15+
1016
## 0.15.6
1117

1218
### Fixed
13-
- Fixed issue with state not properly updated when ending resize #173
14-
- Fixed issue with onItem* events not reporting correct time when timeline has outer padding #227
19+
20+
* Fixed issue with state not properly updated when ending resize #173
21+
* Fixed issue with onItem\* events not reporting correct time when timeline has outer padding #227
1522

1623
## 0.15.5
1724

1825
### Fixed
19-
- context click actually calls double click callback #225
20-
- Removed href attribute from header divs #222
26+
27+
* context click actually calls double click callback #225
28+
* Removed href attribute from header divs #222
2129

2230
## 0.15.4
2331

2432
### Fixed
25-
- Clicking on Svg element throws error #216
33+
34+
* Clicking on Svg element throws error #216
2635

2736
## 0.15.3
28-
This version contains one crucial bug fix and a simple update to item clicks to report time. Much of the other work was around repo maintenance and preparing the repo for future development (update to dev-tooling, some documentation updates)
37+
38+
This version contains one crucial bug fix and a simple update to item clicks to report time. Much of the other work was around repo maintenance and preparing the repo for future development (update to dev-tooling, some documentation updates)
2939

3040
### Added
31-
- Report time with all item clicks #210
41+
42+
* Report time with all item clicks #210
3243

3344
### Fixed
34-
- Drag doesn't stop when you leave the timeline canvas #182
45+
46+
* Drag doesn't stop when you leave the timeline canvas #182
3547

3648
## [0.15.0]
49+
3750
Plugin support and sticky header!
3851

3952
### Added
40-
- Plugins system (pass them as children) @mariusandra #122
41-
- Sticky header (`fixedHeader='sticky'`) @mariusandra #125
53+
54+
* Plugins system (pass them as children) @mariusandra #122
55+
* Sticky header (`fixedHeader='sticky'`) @mariusandra #125
4256

4357
### Removed
44-
- [BREAKING] Removed deprecated option to pass sidebar header content as children. Use `sidebarContent` instead. @mariusandra
45-
- [BREAKING] Removed fixedHeader option `absolute`, which was broken and is now replaced with the option `sticky` @mariusandra
58+
59+
* [BREAKING] Removed deprecated option to pass sidebar header content as children. Use `sidebarContent` instead. @mariusandra
60+
* [BREAKING] Removed fixedHeader option `absolute`, which was broken and is now replaced with the option `sticky` @mariusandra
4661

4762
### Demo & Docs
48-
- Notice for modern module bundlers @jlubben @mariusandra #128
49-
- Add [treeGroups](http://namespace.ee/react-calendar-timeline-docs/#/treeGroups) demo
63+
64+
* Notice for modern module bundlers @jlubben @mariusandra #128
65+
* Add [treeGroups](http://namespace.ee/react-calendar-timeline-docs/#/treeGroups) demo
5066

5167
## [0.14.11]
68+
5269
Plenty of bugfixes, tests and new demos in these 0.14 patch releases.
5370

5471
### Fixed
55-
- Fixed bug with `resizeDetector` and with detecting changes in `sidebarWidth` @mariusandra
56-
- Fixed bug where order `0` was evaluated as a falsy @nicocrm #111
57-
- Fix overflow-x with header @signalwerk
72+
73+
* Fixed bug with `resizeDetector` and with detecting changes in `sidebarWidth` @mariusandra
74+
* Fixed bug where order `0` was evaluated as a falsy @nicocrm #111
75+
* Fix overflow-x with header @signalwerk
5876

5977
### Added
60-
- Add meta+wheel modifier that zooms 3x the speed of the normal wheel events @mariusandra
78+
79+
* Add meta+wheel modifier that zooms 3x the speed of the normal wheel events @mariusandra
6180

6281
### Changed
63-
- Refactor `calculateDimensions` to be pure @signalwerk
64-
- Convert `groupHeights` and `groupTops` to arrays (from objects) @mariusandra
82+
83+
* Refactor `calculateDimensions` to be pure @signalwerk
84+
* Convert `groupHeights` and `groupTops` to arrays (from objects) @mariusandra
6585

6686
### Demo & docs
67-
- Add [linkedTimelines](http://namespace.ee/react-calendar-timeline-docs/#/linkedTimelines) demo
68-
- Add [elementResize](http://namespace.ee/react-calendar-timeline-docs/#/elementResize) demo
69-
- Add docs about modifier keys for zooming/scrolling @signalwerk
87+
88+
* Add [linkedTimelines](http://namespace.ee/react-calendar-timeline-docs/#/linkedTimelines) demo
89+
* Add [elementResize](http://namespace.ee/react-calendar-timeline-docs/#/elementResize) demo
90+
* Add docs about modifier keys for zooming/scrolling @signalwerk
7091

7192
## [0.14.2]
93+
7294
### Changed
73-
- Use `prop-types` instead of `React.PropTypes` to support React 15.5+. @mariusandra #110
95+
96+
* Use `prop-types` instead of `React.PropTypes` to support React 15.5+. @mariusandra #110
7497

7598
## [0.14.0]
99+
76100
### Added
77-
- Use `headerLabelFormats` and `subHeaderLabelFormats` to customise the header labels. @Slowyn #68
78-
- Optional pluggable `resizeDetector` to detect when the element's container is resized. @Ziller321 #94
101+
102+
* Use `headerLabelFormats` and `subHeaderLabelFormats` to customise the header labels. @Slowyn #68
103+
* Optional pluggable `resizeDetector` to detect when the element's container is resized. @Ziller321 #94
79104

80105
### Fixed
81-
- Fix renders with empty `groups` array. @signalwerk #106
106+
107+
* Fix renders with empty `groups` array. @signalwerk #106
82108

83109
## [0.13.0]
110+
84111
### Added
85-
- An option to add another sidebar to the right of the Timeline. @goooseman #80
86-
- `itemRenderer` prop to allow specifying a custom component to render the items @nicocrm #103
87-
- `groupRenderer` prop to allow specifying a custom component to render the groups @nicocrm #103
88-
- `showCursorLine` prop to show a vertical line at the snap position @meikoudras
89-
- You can now select multiple items if you take control of the `selected` prop and the `onItemSelect` handler. @meengit #71
90-
- Canvas context menu handler `onCanvasContextMenu` @meikoudras
112+
113+
* An option to add another sidebar to the right of the Timeline. @goooseman #80
114+
* `itemRenderer` prop to allow specifying a custom component to render the items @nicocrm #103
115+
* `groupRenderer` prop to allow specifying a custom component to render the groups @nicocrm #103
116+
* `showCursorLine` prop to show a vertical line at the snap position @meikoudras
117+
* You can now select multiple items if you take control of the `selected` prop and the `onItemSelect` handler. @meengit #71
118+
* Canvas context menu handler `onCanvasContextMenu` @meikoudras
91119

92120
### Fixed
93-
- Calculate width when we receive sidebar width property @jmerriweather #75
94-
- Avoid updating updateDimensions right after updateScrollCanvas @nicocrm #87
95-
- Fix typo collision detection in stack() @nicocrm #96
96-
- Remove dead code @signalwerk #101
97-
- Disable cursor style by interactjs @bkniffler #89
98-
- Fixed header width and Header label weekday support @meikoudras #66
121+
122+
* Calculate width when we receive sidebar width property @jmerriweather #75
123+
* Avoid updating updateDimensions right after updateScrollCanvas @nicocrm #87
124+
* Fix typo collision detection in stack() @nicocrm #96
125+
* Remove dead code @signalwerk #101
126+
* Disable cursor style by interactjs @bkniffler #89
127+
* Fixed header width and Header label weekday support @meikoudras #66
99128

100129
### Changed
101-
- [Deprecated] To have content above the left sidebar, pass it in a `sidebarContent={<div />}` prop, not as children to the component.
130+
131+
* [Deprecated] To have content above the left sidebar, pass it in a `sidebarContent={<div />}` prop, not as children to the component.
102132

103133
## [0.11.1]
134+
104135
### Fixed
105-
- Without canResize prop in items it gave a Uncaught TypeError. @tgosp
136+
137+
* Without canResize prop in items it gave a Uncaught TypeError. @tgosp
106138

107139
## [0.11.0]
140+
108141
### Added
109-
- An option to fully update the calendar at every scroll event. With this change, labels of items are always fully visible, even if looking at a multi day event with a zoom level set at 30min. @mariusandra
142+
143+
* An option to fully update the calendar at every scroll event. With this change, labels of items are always fully visible, even if looking at a multi day event with a zoom level set at 30min. @mariusandra
110144

111145
## [0.10.1]
146+
112147
### Changed
113-
- The left resize edge mouse cursor is now a left arrow @mariusandra
148+
149+
* The left resize edge mouse cursor is now a left arrow @mariusandra
114150

115151
## [0.10.0]
152+
116153
### Added
117-
- You can also resize items from the left now @mariusandra
154+
155+
* You can also resize items from the left now @mariusandra
118156

119157
## [0.9.0]
158+
120159
### Added
121-
- Allow disabling selection clicks on items #58 by @sjchmiela
122-
- Allow passing additional props to `Item`'s `<div/>` #58 by @sjchmiela
123-
- Add `clickTolerance` so dragging more than 3 pixels is no longer a click @mariusandra
160+
161+
* Allow disabling selection clicks on items #58 by @sjchmiela
162+
* Allow passing additional props to `Item`'s `<div/>` #58 by @sjchmiela
163+
* Add `clickTolerance` so dragging more than 3 pixels is no longer a click @mariusandra
124164

125165
### Changed
126-
- [BREAKING] Same arguments order (groupId, time, e) for onCanvasDoubleClick and onCanvasClick #52 by @signalwerk
127-
- [Deprecated] `onTimeChange` now gets `updateScrollCanvas` as the third argument. Doing `this.updateScrollCanvas` is no longer needed and will be removed soon.
128-
- Moved React & Moment from dependencies to peerDependencies #53 by @meikoudras
129-
- Fix resizing when inside DIV #47 by @semargal
130-
- Fix demo for IE11 #44 by @lucidlemon
131-
- Package a .css file, not a .scss file as previously done. @mariusandra
166+
167+
* [BREAKING] Same arguments order (groupId, time, e) for onCanvasDoubleClick and onCanvasClick #52 by @signalwerk
168+
* [Deprecated] `onTimeChange` now gets `updateScrollCanvas` as the third argument. Doing `this.updateScrollCanvas` is no longer needed and will be removed soon.
169+
* Moved React & Moment from dependencies to peerDependencies #53 by @meikoudras
170+
* Fix resizing when inside DIV #47 by @semargal
171+
* Fix demo for IE11 #44 by @lucidlemon
172+
* Package a .css file, not a .scss file as previously done. @mariusandra
132173

133174
[0.9.0]: https://github.com/namespace-ee/react-calendar-timeline/compare/v0.8.6...v0.9.0
134175
[0.10.0]: https://github.com/namespace-ee/react-calendar-timeline/compare/v0.9.0...v0.10.0

src/lib/Timeline.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,9 @@ export default class ReactCalendarTimeline extends Component {
295295
getTimelineContext: () => {
296296
const { width, visibleTimeStart, visibleTimeEnd } = this.state
297297

298-
//prob wanna memoize this so we ensure that if no items changed, we return same reference
298+
//TODO: Performance
299+
//prob wanna memoize this so we ensure that if no items changed,
300+
//we return same context reference
299301
return {
300302
timelineWidth: width,
301303
visibleTimeStart,

0 commit comments

Comments
 (0)