Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
d608b50
Fix for issue#186 removed usage of refs, switched to using functions …
thaggie Sep 28, 2016
ec652ba
Fixed lint error
thaggie Sep 28, 2016
866235b
Fixed typo
thaggie Sep 28, 2016
f91e494
Merge pull request #188 from thaggie/master
garetht Oct 4, 2016
d111380
New release files.
garetht Oct 4, 2016
ba5684e
Upgrade Jest and fix tests.
garetht Oct 4, 2016
d80be7d
Upgrade Node.
garetht Oct 4, 2016
4647d7c
Exit if a test fails.
garetht Oct 4, 2016
795f80d
Upgrade flow and fix typechecking.
garetht Oct 4, 2016
6c38c2e
Merge pull request #189 from seatgeek/new-tests
garetht Oct 4, 2016
ca4c5c3
New distribution files.
garetht Oct 4, 2016
e453e65
0.10.0
garetht Oct 4, 2016
5e42eae
Update year in LICENSE.txt to 2017
daveschumaker Jan 5, 2017
436d5d5
Fix window is not defined
titipakorn Feb 17, 2017
56daa48
Fix window is not defined
titipakorn Feb 17, 2017
143192f
Fix window is not defined
titipakorn Feb 17, 2017
db71c2b
Fix window is not defined
titipakorn Feb 17, 2017
f88e855
update build
titipakorn Feb 21, 2017
4e92abc
react deprecations: PropTypes, createClass
kgregory May 3, 2017
756b225
Add prop-types and create-react-class to travis test
kgregory May 3, 2017
d5d194f
Attempt to access global for requires
kgregory May 3, 2017
d2825cc
travis: install peerdependencies
kgregory May 3, 2017
e5db51f
Merge pull request #219 from kgregory/develop
garetht May 15, 2017
8ff5c5e
Fix examples.
garetht May 15, 2017
0892a45
Relax certain version requirements.
garetht May 15, 2017
282b8cb
Merge pull request #222 from seatgeek/fixes
garetht May 15, 2017
b17c7b7
Build new versions.
garetht May 15, 2017
94dc599
0.11.0
garetht May 15, 2017
3de098e
Bring pull request in.
garetht Aug 2, 2017
4128f4e
Remove build files.
garetht Aug 2, 2017
778c128
Merge branch 'titipakorn-master'
garetht Aug 2, 2017
554bc83
Produce committed dist.
garetht Aug 2, 2017
12b9c18
0.11.1
garetht Aug 2, 2017
4cb4e7e
Merge pull request #199 from daveschumaker/patch-1
garetht Aug 2, 2017
3b1f200
Switch to safer method of dealing with window.
garetht Aug 3, 2017
81d15f4
Merge pull request #233 from seatgeek/fix-window
garetht Aug 3, 2017
e2bf5bb
Build new dist bundles.
garetht Aug 3, 2017
a2360f9
Refactor and fix typechecking.
garetht Aug 3, 2017
17f5143
Fix tests.
garetht Aug 3, 2017
468bb05
Fix lint.
garetht Aug 3, 2017
89e98c1
Merge pull request #234 from seatgeek/fix-tests
garetht Aug 3, 2017
d66ddd6
Add new dist bundles.
garetht Aug 3, 2017
a7d80a6
0.11.2
garetht Aug 3, 2017
963d015
Refactor methods into functions.
garetht Aug 4, 2017
c0f2760
Remove annotation.
garetht Aug 4, 2017
4194edb
Finally remove deprecated prop.
garetht Aug 4, 2017
4ae1448
Continue upgrading to Jest 20.
garetht Aug 4, 2017
d3c5557
Continue updating tests.
garetht Aug 4, 2017
beb4770
Fix pointer events tests.
garetht Aug 4, 2017
10598ec
Remove mocking and imports.
garetht Aug 4, 2017
89bf7f6
Continue working on tests.
garetht Aug 4, 2017
dc5dc64
Continue with tests.
garetht Aug 4, 2017
892fde2
Update infinite tests.
garetht Aug 5, 2017
aff218f
Update infinite tests.
garetht Aug 5, 2017
196f5c5
Fix bottom upwards tests.
garetht Aug 5, 2017
e238a94
Continue upgrading tests.
garetht Aug 5, 2017
bd10e42
Add fixes.
garetht Aug 5, 2017
b8b7abf
Convert to ES2015 class.
garetht Aug 5, 2017
9c80491
Fix tests after component upgrade.
garetht Aug 5, 2017
507a2b6
Update package.json.
garetht Aug 5, 2017
9dbfb55
Upgrade ESLint to standard SeatGeek configuration.
garetht Aug 5, 2017
f020bab
Fix flowtype linting.
garetht Aug 5, 2017
5f940cc
Format with prettier.
garetht Aug 5, 2017
807ce28
Fix dependencies.
garetht Aug 5, 2017
49f2a6a
Add JSX files.
garetht Aug 5, 2017
c857799
Cache node_modules and install dependencies.
garetht Aug 5, 2017
8e5483e
Fix Gulpfile.
garetht Aug 5, 2017
3c366e9
Upgrade build pipeline.
garetht Aug 5, 2017
ec2bcbd
Add Cypress.
garetht Aug 5, 2017
5c6ebab
Add first spec.
garetht Aug 5, 2017
6ee181e
Fix for cypress.
garetht Aug 5, 2017
b2cc7ac
Remove argument.
garetht Aug 5, 2017
6ca75e9
Install peer dependencies.
garetht Aug 5, 2017
22ae28f
Tweak config.
garetht Aug 5, 2017
3848461
Cache cypress and build examples.
garetht Aug 5, 2017
4e8b6bb
Exclude prop-types from the build.
garetht Aug 6, 2017
b324f73
Package and package lock updates.
garetht Aug 6, 2017
9549cd3
Touch up tests and eslint.
garetht Aug 6, 2017
fa40c97
Focus on specific properties.
garetht Aug 6, 2017
1dcfb89
Update examples.
garetht Aug 6, 2017
1596a17
Strip prop types for production builds.
garetht Aug 6, 2017
7efd664
Merge pull request #235 from seatgeek/upgrades
garetht Aug 7, 2017
ac57ec0
Prepare new dist files.
garetht Aug 7, 2017
29f658d
Ignore additional files.
garetht Aug 7, 2017
ef8d2d2
0.12.0
garetht Aug 7, 2017
919459f
Start listening to window scroll events when useWindowAsScrollContain…
Aug 2, 2017
d837000
Merge pull request #236 from seatgeek/window-as-scroll
garetht Aug 7, 2017
8278fee
0.12.1
garetht Aug 7, 2017
48182b4
Update dist files.
garetht Aug 7, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"presets": ["es2015", "flow", "react"],
"plugins": ["transform-class-properties", "transform-object-rest-spread"],
"env": {
"production": {
"plugins": ["transform-react-remove-prop-types"]
}
}
}
50 changes: 12 additions & 38 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,52 +1,26 @@
{
"parser": "babel-eslint",

"rules": {
"curly": [2, "all"],
"indent": [2, 2, {"VariableDeclarator": 2}],
"linebreak-style": [2, "unix"],
"one-var": 0,
"space-before-function-paren": [2, "never"],

"react/jsx-boolean-value": 1,
"react/jsx-curly-spacing": [2, "never"],
"react/jsx-no-undef": 1,
"react/no-danger": 1,
"react/react-in-jsx-scope": 1
},

"globals": {
"require": false,
"module": false,
"global": false,

"SyntheticEvent": false,
"ReactElement": false,

"PreloadType": false,
"ElementHeight": false,
"CSSStyle": false,
"ReactInfiniteUtilityFunctions": false,
"ReactInfiniteProvidedDefaultProps": false,
"ReactInfiniteProps": false,
"ReactInfiniteComputedProps": false,
"ReactInfiniteState": false,
"InfiniteComputer": false
"global": false
},

"env": {
"es6": true,
"browser": true
},

"extends": ["semistandard"],

"ecmaFeatures": {
"jsx": true,
"experimentalObjectRestSpread": true
"rules": {
"react/no-did-update-set-state": "off",
"flowtype/define-flow-type": 1
},

"extends": [
"seatgeek-standard",
"seatgeek-react-standard"
],
"plugins": [
"react"
"react",
"prettier",
"flowtype"
]
}

2 changes: 2 additions & 0 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
.*/build/.*
.*/dist/.*
.*/y18n/.*
.*/babel-plugin-transform-react-remove-prop-types/.*
.*json

[include]

Expand Down
8 changes: 6 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
sudo: false
language: node_js
node_js:
- 0.10
- lts/*
cache:
directories:
- node_modules
- /home/travis/.cypress/Cypress
env:
- TEST=1
- TYPECHECK=1
- LINT=1

- BROWSER=1
script:
- ./config/travis/test.sh
after_success: cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
58 changes: 31 additions & 27 deletions Gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ var del = require('del');

var browserifyCreator = require('./pipeline/browserify');

var args = require('yargs').alias('P', 'production')
.alias('D', 'development')
.alias('E', 'example').argv;
var args = require('yargs')
.alias('P', 'production')
.alias('D', 'development')
.alias('E', 'example').argv;

var envObject = {
production: args.production,
Expand All @@ -20,17 +21,21 @@ var buildFunction = browserifyCreator(false, envObject, INFINITE_SOURCE);

gulp.task('build-bundle', buildFunction);
gulp.task('cleanly-build-bundle', ['clean'], buildFunction);
gulp.task('watch-develop-bundle', browserifyCreator(true, {development: true}, INFINITE_SOURCE));
gulp.task(
'watch-develop-bundle',
browserifyCreator(true, { development: true }, INFINITE_SOURCE)
);

// This task builds everything for release: the dist
// folder is populated with react-infinite.js and
// react-infinite.min.js, while the build folder is
// provided with a copy of the source transpiled to ES5.
gulp.task('release', ['cleanly-build-bundle'], function() {
// Transpile CommonJS files to ES5 with React's tools.
gulp.src(['./src/**/*.js', './src/**/*.jsx'])
.pipe(babel())
.pipe(gulp.dest('build'));
gulp
.src(['./src/**/*.js', './src/**/*.jsx'])
.pipe(babel())
.pipe(gulp.dest('build'));
});

gulp.task('clean', function() {
Expand All @@ -40,31 +45,30 @@ gulp.task('clean', function() {
// This task is used to build the examples. It is used
// in the development watch function as well.
gulp.task('examples', function() {
gulp.src('./examples/*.jsx')
.pipe(babel())
.pipe(gulp.dest('examples'));
gulp.src('./examples/*.jsx').pipe(babel()).pipe(gulp.dest('examples'));
});

gulp.task('server', function() {
gulp.src(__dirname)
.pipe(server({
port: 8080,
directoryListing: true,
livereload: {
enable: true,
filter: function(filename) {
if (filename.match(__dirname + '/examples')) {
return true;
// The examples draw from /dist, which should change
// when the source files change
} else if (filename.match(__dirname + '/dist')) {
return true;
} else {
return false;
}
gulp.src(__dirname).pipe(
server({
port: 8080,
directoryListing: true,
livereload: {
enable: true,
filter: function(filename) {
if (filename.match(__dirname + '/examples')) {
return true;
// The examples draw from /dist, which should change
// when the source files change
} else if (filename.match(__dirname + '/dist')) {
return true;
} else {
return false;
}
}
}));
}
})
);
});

// This task is used for development. When run, it sets up
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2014-2015, SeatGeek, Inc.
Copyright (c) 2014-2017, SeatGeek, Inc.
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Expand Down
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,6 @@ When working with the window as the scroll container, it is sometimes useful to
#### **Function** `handleScroll(DOMNode node)`
Defaults to `function(){}`. A function that is called when the container is scrolled, i.e. when the `onScroll` event of the infinite scrolling container is fired. The only argument passed to it is the native DOM [Node](https://developer.mozilla.org/en-US/docs/Web/API/Node) of the scrolling container.

#### **Number** `infiniteLoadBeginBottomOffset`
**Deprecated as of 0.6.0. Please use `infiniteLoadBeginEdgeOffset`, which is identical but renamed.**

#### **Number** `infiniteLoadBeginEdgeOffset`
Defaults to `undefined`, which means that infinite loading is disabled. To disable infinite loading, do not provide this property or set it to undefined.

Expand Down Expand Up @@ -164,15 +161,17 @@ Code samples are now available in the `/examples` directory for your perusal. Tw
To get you started, here is some sample code that implements an infinite scroll with an simulated delay of 2.5 seconds. A [live demo of this example is available](http://chairnerd.seatgeek.com/react-infinite-a-browser-ready-efficient-scrolling-container-based-on-uitableview/) on our blog.

```js
var ListItem = React.createClass({
var createReactClass = require('create-react-class');

var ListItem = createReactClass({
render: function() {
return <div className="infinite-list-item">
List Item {this.props.num}
</div>;
}
});

var InfiniteList = React.createClass({
var InfiniteList = createReactClass({
getInitialState: function() {
return {
elements: this.buildElements(0, 20),
Expand Down
Loading