Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automagical search/sort documentation page - closes #649 #684

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
60ee8e1
Fixed documentation on fuzzyOptions
Spone Nov 5, 2016
222a0fb
Update links
javve Jan 29, 2017
8b406b4
fix typo
javve Feb 1, 2017
b3db0de
Fix #469
javve Feb 4, 2017
7610c59
One listener per pagination look for data attributes instead
javve Feb 4, 2017
6c3714d
Add faq
javve Feb 4, 2017
92027a3
Add version badge
javve Feb 4, 2017
995a09d
Avoid CSP violation when using pagination due to inline javascript
trappedion Mar 8, 2017
5a2cb2a
Click on pagination dots, null attribute
trappedion Mar 8, 2017
4bf6e9c
Remove duplicate list property
Jackevansevo Mar 29, 2017
7a6fec5
Merge pull request #501 from Jackevansevo/patch-1
javve Mar 29, 2017
88874a4
Merge pull request #499 from victorgaspar/pagination-csp-violation
javve May 25, 2017
edf04ae
Merge pull request #463 from Spone/patch-1
javve May 25, 2017
274f229
Update Carbon Ad Code
Jun 16, 2017
0a9893b
Merge pull request #527 from sayzlim/master
javve Jun 21, 2017
dfc930e
Add jsDelivr hits badge
LukasDrgon Oct 10, 2017
4e66c9d
Fix typos in error message
clbn Nov 17, 2017
dd57780
Update README.md
BerkhanBerkdemir Jan 6, 2018
d17b280
Update LICENSE
BerkhanBerkdemir Jan 6, 2018
ae1d45f
Documentation correction
jeremypeters May 14, 2018
d565b66
Update devDependencies
boidolr Jun 17, 2018
c517178
Update `jquery` devDependency
boidolr Aug 4, 2018
739b40b
Update `jest` devDependency
boidolr Aug 5, 2018
908b0b5
Update contribution guidelines
boidolr Oct 20, 2018
08a20e0
Update gems
boidolr Aug 12, 2018
bfd4002
Update _config.yml
boidolr Aug 14, 2018
4c69b78
Add prefetch meta tags
boidolr Aug 14, 2018
080afa7
Update remaining gh-pages paths
boidolr Aug 14, 2018
701a5b3
Update `github-pages`
boidolr Oct 20, 2018
edf91f7
Livereload is added automatically
boidolr Oct 20, 2018
ee89fa4
Update gems
javve Dec 15, 2018
f2d3305
Merge branch 'master' of github.com:javve/list.js
javve Dec 15, 2018
e17e1c1
Merge branch 'master' into update_github_page
javve Dec 16, 2018
f0e572c
Merge pull request #624 from boidolr/update_github_page
javve Dec 16, 2018
85066db
Update jQuery
javve Dec 16, 2018
47e1b94
Merge pull request #619 from boidolr/update_contributing_docs
javve Dec 16, 2018
3ed8e95
Merge branch 'master' into update_dev_dependencies
javve Dec 16, 2018
d0e5b31
Merge pull request #602 from boidolr/update_dev_dependencies
javve Dec 16, 2018
41b6935
Merge pull request #595 from jeremypeters/patch-1
javve Dec 16, 2018
fef25d7
Merge pull request #571 from BerkhanBerkdemir/master
javve Dec 16, 2018
aaa7fd6
Merge pull request #564 from clbn/patch-1
javve Dec 16, 2018
7c45b25
Merge pull request #553 from LukasDrgon/patch-1
javve Dec 16, 2018
60579c4
Update Release instructions
javve Dec 16, 2018
a12a704
Update History.md with 1.5.1 updates
javve Dec 16, 2018
56d4d99
Fix pagination test
javve Dec 16, 2018
9c465e7
Add link to Stack overflow in readme
javve Dec 16, 2018
8198d13
Merge branch 'master' of github.com:javve/list.js
javve Dec 16, 2018
ae3024c
Update to circle ci 2
javve Dec 16, 2018
4420c58
Use node version 10 for circle ci
javve Dec 16, 2018
785dc97
Update node version in package.json and sync with circleci
javve Dec 16, 2018
6954947
Correctly name circleconfig (lolz)
javve Dec 16, 2018
8b8d2d9
Validate and fix circleci config
javve Dec 16, 2018
5afc258
Update codecov command
javve Dec 16, 2018
b58b9fb
More circleci fixes
javve Dec 16, 2018
330c8e8
Fix typo
javve Dec 18, 2018
166b73c
Added a WISHLIST.md to be able to clean up in issues.
javve Dec 18, 2018
dc6ab59
Update wishlist
javve Dec 18, 2018
41764c7
Added OkayAnalytics.com to the web site
javve Dec 23, 2019
88ac583
Add options.searchColumns to List API docs #648
sheffieldnick Apr 2, 2020
85f18b1
Fixed searchColumns default
sheffieldnick Apr 2, 2020
109adc1
Minor fixes to doc
sheffieldnick Apr 2, 2020
a22771a
More minor fixes to API docs
sheffieldnick Apr 2, 2020
e12d137
Added custom search function to List API doc - closes #678
sheffieldnick Apr 2, 2020
389b9dc
Multiple word searching with List.search - closes #680
sheffieldnick Apr 2, 2020
5a8c19b
Multiple word searching documented in List API
sheffieldnick Apr 2, 2020
ec685e7
Added test units for multi-word and quoted phrase searches
sheffieldnick Apr 2, 2020
bbf50b7
Added new documentation page "Automagical Searching + Sorting" with l…
sheffieldnick Apr 4, 2020
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
20 changes: 20 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: 2
jobs:
build:
docker:
- image: circleci/node:6.15
steps:
- checkout
- restore_cache:
key: dependency-cache-{{ checksum "package.json" }}
- run: npm install
- save_cache:
key: dependency-cache-{{ checksum "package.json" }}
paths:
- node_modules
- run:
name: test
command: npm test
- run:
name: code-coverage
command: 'bash <(curl -s https://codecov.io/bash)'
29 changes: 11 additions & 18 deletions History.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,16 @@
# TODO

- Add tests for custom event handlers. 27e2d6fdeee7090eb1342a108013db898fc29b96
- Regex in search https://github.com/javve/list.js/issues/371
- Keep original order?
- Automatically add item in the right place if sort is active
- How to handle arrays?
- Implement debouncing in search?
- Better search https://github.com/javve/list.js/pull/312/files ?
- Investigate sort button defaults:
- https://github.com/javve/list.js/issues/316
- https://github.com/javve/list.js/pull/301
- Improve testability by decoupling things and make it possible to use require('') in tests
- Add .remove() method to remove all listeners etc.
- Example of more advanced filtering
- Fix test suite
- Example with multiple lists

# Changelog

### 1.5.1
- **[Misc]** Added WISHLIST.md for feature requests to allow cleanup of issue list.
- **[Misc]** Update CircleCI from 1.0 to 2.0
- **[Website]** Use https instead of http for listjs.com
- **[Website]** Update Contribute guidelines [See commit →](https://github.com/javve/list.js/commit/6242496de2ac5c07903fb1590a5cb5129f0887a7)
- **[Website]** Update Jekyll & jQuery versions to remove security warnings.
- **[Bugfix]** Use one event listener per pagination and select page via data attributes
[See commit →](https://github.com/javve/list.js/commit/7610c59039f3b39f52175cd1a200e935664869e8)
- **[Bugfix]** Don't break pagination if page=0
[See commit →](https://github.com/javve/list.js/commit/b3db0de731d436422e016b5e17f7ceab5941cd5d)
[See commit →](https://github.com/javve/list.js/commit/725bc188d7ba72c7d234bda1e09fc50b40661310)
### 2017-01-29 v1.5.0
- **[Feature]** Bundle fuzzySearch and pagination plugins into List.js
[See commit →](https://github.com/javve/list.js/commit/2f5322fd139ee6f30cef3bb5e15d382ff29f9489)
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2011-2014 Jonny Strömberg, jonnystromberg.com
Copyright (c) 2011-2018 Jonny Strömberg, jonnystromberg.com

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ Perfect library for adding **search**, **sort**, **filters** and **flexibility**
Really simple and easy to use!

[![Donate](https://s3.amazonaws.com/listjs/donate-coffee.png)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=M7ZGHV75VSD2E)
[![npm version](https://badge.fury.io/js/list.js.svg)](https://badge.fury.io/js/list.js)
[![CircleCI](https://circleci.com/gh/javve/list.js/tree/master.svg?style=shield)](https://circleci.com/gh/javve/list.js/tree/master)
[![codecov](https://codecov.io/gh/javve/list.js/branch/master/graph/badge.svg)](https://codecov.io/gh/javve/list.js)
[![jsDelivr Hits](https://data.jsdelivr.com/v1/package/npm/list.js/badge?style=rounded)](https://www.jsdelivr.com/package/npm/list.js)

### Core idea
- Simple and invisible
Expand Down Expand Up @@ -35,11 +37,14 @@ npm install list.js
```
##### Via CDNJS
```html
<script src="//cdnjs.cloudflare.com/ajax/libs/list.js/1.4.1/list.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/list.js/1.5.0/list.min.js"></script>
```
##### Via Direct Download
- [Compressed list.js](https://raw.githubusercontent.com/javve/list.js/v1.4.1/dist/list.min.js)
- [Uncompressed list.js](https://raw.githubusercontent.com/javve/list.js/v1.4.1/dist/list.js)
- [Compressed list.js](https://raw.githubusercontent.com/javve/list.js/v1.5.0/dist/list.min.js)
- [Uncompressed list.js](https://raw.githubusercontent.com/javve/list.js/v1.5.0/dist/list.js)

### Questions / How to?
https://stackoverflow.com/questions/tagged/list.js

### Demo / Examples
- [Existing list](http://listjs.com/examples/existing-list)
Expand Down Expand Up @@ -77,5 +82,5 @@ npm install list.js

## License (MIT)

Copyright (c) 2012-2017 Jonny Strömberg <[jonny.stromberg@gmail.com](mailto:jonny.stromberg@gmail.com)>
Copyright (c) 2011-2018 Jonny Strömberg <[jonny.stromberg@gmail.com](mailto:jonny.stromberg@gmail.com)>
[http://javve.com](http://javve.com)
12 changes: 6 additions & 6 deletions Release.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# RELEASE

1. Update version in package.json
2. `cp package.json docs/_data/pkg.json`
3. Commit "Version x.y.z"
4. Tag with `git tag -a v1.14.0 -m "Version 1.14.0`
5. Push with `git push`
6. Push tags with `git push --tags`
7. Update links in README.md
2. Update links in README.md
3. `cp package.json docs/_data/pkg.json`
4. Commit "Version x.y.z"
5. Tag with `git tag -a v1.14.0 -m "Version 1.14.0`
6. Push with `git push`
7. Push tags with `git push --tags`
8. `npm publish`
21 changes: 21 additions & 0 deletions WISHLIST.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Wishlist
- Add tests for custom event handlers. 27e2d6fdeee7090eb1342a108013db898fc29b96
- Regex in search https://github.com/javve/list.js/issues/371
- Keep original order? + know
- Automatically add item in the right place if sort is active
- How to handle arrays?
- [Implement debouncing in search?](https://github.com/javve/list.js/issues/621)
- Better search https://github.com/javve/list.js/pull/312/files ?
- Investigate sort button defaults:
- https://github.com/javve/list.js/issues/316
- https://github.com/javve/list.js/pull/301
- Improve testability by decoupling things and make it possible to use require('') in tests
- Add .remove() method to remove all listeners etc.
- Example of more advanced filtering
- Example with multiple lists
- Multiple filter functionality
- Activ search term, sort order, filter, etc
- [Smarter pagination window](https://github.com/javve/list.js/issues/599)

# Known bugs
Pagination does not respect .show(i, page)
18 changes: 9 additions & 9 deletions __test__/create.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ describe('Create', function() {

it('should contain one item', function() {
expect(list.items.length).toEqual(1);
expect(listEl.find('li').size()).toEqual(1);
expect(listEl.find('li').length).toEqual(1);
});

it('should contain two items', function() {
list.add({ name: 'Jonas' });
expect(list.items.length).toEqual(2);
expect(listEl.find('li').size()).toEqual(2);
expect(listEl.find('li').length).toEqual(2);
});

listEl.remove();
Expand All @@ -44,13 +44,13 @@ describe('Create', function() {

it('should contain one item', function() {
expect(list.items.length).toEqual(1);
expect(listEl.find('li').size()).toEqual(1);
expect(listEl.find('li').length).toEqual(1);
});

it('should contain two items', function() {
list.add({ name: 'Jonas' });
expect(list.items.length).toEqual(2);
expect(listEl.find('li').size()).toEqual(2);
expect(listEl.find('li').length).toEqual(2);
});

listEl.remove();
Expand All @@ -72,13 +72,13 @@ describe('Create', function() {

it('should contain one item', function() {
expect(list.items.length).toEqual(1);
expect(listEl.find('tr').size()).toEqual(1);
expect(listEl.find('tr').length).toEqual(1);
});

it('should contain two items', function() {
list.add({ name: 'Jonas' });
expect(list.items.length).toEqual(2);
expect(listEl.find('tr').size()).toEqual(2);
expect(listEl.find('tr').length).toEqual(2);
});

listEl.remove();
Expand Down Expand Up @@ -134,13 +134,13 @@ describe('Create', function() {

it('should contain one item', function() {
expect(list.items.length).toEqual(1);
expect(listEl.find('li').size()).toEqual(1);
expect(listEl.find('li').length).toEqual(1);
});

it('should contain two items', function() {
list.add({ name: 'Jonas' });
expect(list.items.length).toEqual(2);
expect(listEl.find('li').size()).toEqual(2);
expect(listEl.find('li').length).toEqual(2);
});

listEl.remove();
Expand Down Expand Up @@ -240,7 +240,7 @@ describe('Create', function() {
valueNames: ['name'],
indexAsync: true,
parseComplete: function(list) {
expect(listEl.find('li').size()).toEqual(162);
expect(listEl.find('li').length).toEqual(162);
listEl.remove();
done();
}
Expand Down
58 changes: 0 additions & 58 deletions __test__/index.html

This file was deleted.

8 changes: 4 additions & 4 deletions __test__/item.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,17 @@ describe('Item', function() {

describe('Hide, show, visible', function() {
it('should be hidden', function() {
expect($('#list li').size()).toEqual(1);
expect($('#list li').length).toEqual(1);
item.hide();
expect(item.visible()).toBe(false);
expect($('#list li').size()).toEqual(0);
expect($('#list li').length).toEqual(0);
});
it('should be visible', function() {
item.hide();
expect($('#list li').size()).toEqual(0);
expect($('#list li').length).toEqual(0);
item.show();
expect(item.visible()).toBe(true);
expect($('#list li').size()).toEqual(1);
expect($('#list li').length).toEqual(1);
});
});

Expand Down
Loading