Skip to content

Commit bf639c6

Browse files
authored
Merge pull request #1 from interviewstreet/react-select-1.3.fixes
React select 1.3.fixes
2 parents 7523c20 + 97be94d commit bf639c6

File tree

280 files changed

+40459
-57406
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

280 files changed

+40459
-57406
lines changed

.TODO.md

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# Changes planned from Beta -> RC:
2+
3+
* [ ] Look into package size reduction, extract optional modules, e.g
4+
* createFilter could be optional, saving 2.6k gz
5+
* vendor simple Menu by default, allow opt-in to advanced usage
6+
* [ ] Bind getStyles for each component
7+
8+
---
9+
10+
# Order of focus:
11+
12+
* [ ] Review how the `required` state of the `<input>` can be handled
13+
* [ ] Example of how to implement Separators
14+
* [ ] Handle Header and Footer elements in the Menu
15+
* [ ] Keyboard focusing of values in multi select
16+
17+
---
18+
19+
# Review:
20+
21+
### Select Component Props
22+
23+
* [ ] `backspaceToRemoveMessage` _investigate_
24+
* [x] `className` _investigate_ might need to move the className util into commonProps
25+
* [x] `openOnClick` / `openOnFocus` needs implementation
26+
* [ ] `required` _|||_ this has some complex behaviour in v1 which may or may not be needed
27+
* [x] `tabIndex` needs implementation
28+
29+
#### Done
30+
31+
* [x] `id`
32+
* [x] `inputId` falls back to `react-select-${props.instanceId}-input`
33+
* [x] `autoBlur` **REMOVED** can be handled with `onChange`
34+
* [x] `autosize` **REMOVED** can replace `<Input />` component
35+
* [x] `onClose` --> `onMenuClose`
36+
* [x] `onOpen` --> `onMenuOpen`
37+
* [x] `onBlurResetsInput` / `onCloseResetsInput` / `onSelectResetsInput` **REMOVED** now that `inputValue` can be controlled, these should be unnecessary
38+
* [x] `onMenuScrollToBottom` implemented
39+
* [x] `clearable` --> `isClearable`
40+
* [x] `rtl` --> `isRTL`
41+
* [x] `pageSize`
42+
* [x] `menuShouldScrollIntoView`
43+
* [x] `searchable` --> `isSearchable`
44+
* [x] `resetValue` **REMOVED** can be handled with `onInputChange`
45+
* [x] `clearAllText` / `clearValueText` **REMOVED** title no longer applied, can replace `<ClearIndicator />`
46+
47+
### Async Component Props
48+
49+
* [ ] `autoLoad` _investigate_ should be considered in conjunction with `searchPromptText`, may affect `defaultOptions` behaviour
50+
* [ ] `searchPromptText` _investigate_ how do we know to display it? (https://goo.gl/PLTwV5)
51+
52+
---
53+
54+
# Maybe:
55+
56+
* [ ] Virtualisation
57+
* [ ] Prevent values from being popped, was `option.clearableValue === false`
58+
* [ ] Async w/ pagination
59+
* [ ] Extention point to reorder / change menu options array when it's created
60+
61+
---
62+
63+
# Later:
64+
65+
* [ ] Reordering of Options (drag and drop)
66+
67+
---
68+
69+
# Done:
70+
71+
* [x] Tags mode (Creatable)
72+
* [x] Handle changing of isDisabled prop
73+
* [x] Better mobile support and touch handling
74+
* [x] Better control of flip behaviour
75+
* [x] Scroll the menu into view when it opens
76+
* [x] Handle touch outside (see v1 implementation)
77+
* [x] Review implementation of `isSearchable` prop (creates a "fake" input)
78+
* [x] Async + Creatable variant
79+
* [x] Cleanup
80+
* [x] Documentation - Props, Customisation
81+
* [x] Upgrade Guide from v1 -> v2
82+
* [x] Lock scrolling on Menu (enable with prop)
83+
* [x] Make inputValue a controllable prop
84+
* [x] Make menuIsOpen a controllable prop
85+
* [x] Finalise theme and style customisation framework
86+
* [x] Remove `disabledKey`, clean up similar functionality
87+
* [x] Pseudo-focus Options
88+
* [x] Keyboard navigation
89+
* [x] Make `isDisabled` / `isSelected` etc. props
90+
* [x] Scroll to focused option
91+
* [x] Add `autofocus` prop
92+
* [x] Add HTML Form Input
93+
* [x] Async with:
94+
* [x] * promises
95+
* [x] * better loading state and behaviour
96+
* [x] Pass more (and consistent?) props and state from Select to Components
97+
* [x] Fix issue with how the mouse hover interacts with keyboard scrolling
98+
* [x] Ability to customise built-in strings

.babelrc

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
{
2-
"ignore": ["node-modules/**", "src/index.umd.js"],
3-
"presets": [ "es2015", "stage-0", "react"],
2+
"plugins": [
3+
"emotion",
4+
"transform-class-properties",
5+
"transform-object-rest-spread"
6+
],
7+
"presets": ["env", "react"],
8+
"ignore": ["node_modules"],
49
"env": {
510
"test": {
6-
"plugins": ["istanbul"],
7-
},
11+
"plugins": ["istanbul"]
12+
}
813
}
914
}

.browserslistrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
> 0.25%
2+
ie 11
3+
not op_mini all

.circleci/config.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
version: 2
2+
3+
docker_defaults: &docker_defaults
4+
docker:
5+
- image: cypress/base:8
6+
environment:
7+
TERM: xterm
8+
working_directory: ~/project/repo
9+
10+
attach_workspace: &attach_workspace
11+
attach_workspace:
12+
at: ~/project
13+
14+
install_steps: &install_steps
15+
steps:
16+
- checkout
17+
- restore_cache:
18+
name: Restore node_modules cache
19+
keys:
20+
- dependency-cache-{{ .Branch }}-{{ checksum "package.json" }}
21+
- dependency-cache-{{ .Branch }}-
22+
- dependency-cache-
23+
- run:
24+
name: Installing Dependencies
25+
command: |
26+
yarn install --silent
27+
- save_cache:
28+
name: Save node_modules cache
29+
key: dependency-cache-{{ .Branch }}-{{ checksum "package.json" }}
30+
paths:
31+
- node_modules/
32+
- persist_to_workspace:
33+
root: ~/project
34+
paths:
35+
- repo
36+
37+
workflows:
38+
version: 2
39+
build_pipeline:
40+
jobs:
41+
- build
42+
- unit_test:
43+
requires:
44+
- build
45+
- end_to_end:
46+
requires:
47+
- build
48+
jobs:
49+
build:
50+
<<: *docker_defaults
51+
<<: *install_steps
52+
unit_test:
53+
<<: *docker_defaults
54+
steps:
55+
- *attach_workspace
56+
- run:
57+
name: Running unit tests
58+
command: |
59+
yarn lint
60+
yarn test:jest
61+
yarn coveralls
62+
end_to_end:
63+
<<: *docker_defaults
64+
steps:
65+
- *attach_workspace
66+
- run:
67+
name: Running E2E tests
68+
command: |
69+
yarn e2e

.editorconfig

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,11 @@ end_of_line = lf
77
charset = utf-8
88
trim_trailing_whitespace = true
99
insert_final_newline = true
10-
indent_style = tab
11-
translate_tabs_to_spaces = false
12-
13-
[*.json]
14-
indent_style = space
15-
indent_size = 2
16-
17-
[*.yml]
1810
indent_style = space
1911
indent_size = 2
2012

2113
[*.md]
2214
trim_trailing_whitespace = false
15+
16+
[.circleci/config.yml]
17+
indent_size = 4

.eslintignore

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
lib/*
1+
coverage/*
2+
cypress/plugins/*
3+
cypress/support/*
24
dist/*
3-
examples/dist/*
5+
flow-typed/*
6+
lib/*
47
node_modules/*
5-
bower_components/*

.eslintrc.js

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
11
module.exports = {
2-
parserOptions: {
3-
ecmaVersion: 6,
4-
sourceType: 'module',
5-
ecmaFeatures: {
6-
experimentalObjectRestSpread: true,
7-
jsx: true,
8-
},
9-
},
10-
env: {
11-
browser: true,
12-
es6: true,
13-
node: true,
14-
},
15-
plugins: ['react'],
16-
rules: {
17-
'curly': [2, 'multi-line'],
18-
'jsx-quotes': 1,
19-
'no-shadow': 0,
20-
'no-trailing-spaces': 0,
21-
'no-underscore-dangle': 0,
22-
'no-unused-expressions': 0,
23-
'object-curly-spacing': [1, 'always'],
24-
'quotes': [2, 'single', 'avoid-escape'],
25-
'react/jsx-boolean-value': 1,
26-
'react/jsx-no-undef': 1,
27-
'react/jsx-uses-react': 1,
28-
'react/jsx-uses-vars': 1,
29-
'react/jsx-wrap-multilines': 1,
30-
'react/no-did-mount-set-state': 1,
31-
'react/no-did-update-set-state': 1,
32-
'react/no-unknown-property': 1,
33-
'react/prop-types': 1,
34-
'react/react-in-jsx-scope': 1,
35-
'react/self-closing-comp': 1,
36-
'react/sort-comp': 1,
37-
'react/sort-prop-types': 1,
38-
'semi': 2,
39-
'strict': 0,
40-
},
2+
parser: 'babel-eslint',
3+
env: {
4+
browser: true,
5+
es6: true,
6+
node: true,
7+
},
8+
plugins: ['react'],
9+
rules: {
10+
'no-unused-vars': [
11+
'error',
12+
{
13+
args: 'after-used',
14+
argsIgnorePattern: '^event$',
15+
ignoreRestSiblings: true,
16+
vars: 'all',
17+
},
18+
],
19+
curly: [2, 'multi-line'],
20+
'jsx-quotes': 1,
21+
'no-shadow': 1,
22+
'no-trailing-spaces': 1,
23+
'no-underscore-dangle': 1,
24+
'no-unused-expressions': 1,
25+
'object-curly-spacing': [1, 'always'],
26+
quotes: [2, 'single', 'avoid-escape'],
27+
'react/jsx-boolean-value': 1,
28+
'react/jsx-no-undef': 1,
29+
'react/jsx-uses-react': 1,
30+
'react/jsx-uses-vars': 1,
31+
'react/jsx-wrap-multilines': 1,
32+
'react/no-did-mount-set-state': 1,
33+
'react/no-did-update-set-state': 1,
34+
'react/no-unknown-property': 1,
35+
'react/react-in-jsx-scope': 1,
36+
'react/self-closing-comp': 1,
37+
'react/sort-prop-types': 1,
38+
semi: 2,
39+
strict: 0,
40+
},
4141
};

.flowconfig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[ignore]
2+
./lib/.*
3+
./dist/.*
4+
.*/node_modules/cypress/.*
5+
.*/node_modules/@atlaskit/tooltip/dist/cjs/components/Marshal.js.flow
6+
7+
[include]
8+
9+
[libs]
10+
flow-typed
11+
12+
[lints]
13+
14+
[options]
15+
module.name_mapper='\!\!raw-loader\!.*' -> '<PROJECT_ROOT>/typings/raw-loader.js'
16+
module.name_mapper='\!\!extract-react-types-loader\!.*' -> '<PROJECT_ROOT>/typings/extract-react-types-loader.js'
17+
18+
[strict]

.gitattributes

Lines changed: 0 additions & 3 deletions
This file was deleted.

.github/CONTRIBUTING.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Contributing
2+
3+
Thanks for your interest in React-Select. All forms of contribution are
4+
welcome, from issue reports to PRs and documentation / write-ups.
5+
6+
Before you open a PR:
7+
8+
* In development, run `yarn start` to build (+watch) the project source, and run
9+
the [development server](http://localhost:8000).
10+
* Please ensure all the examples work correctly after your change. If you're
11+
adding a major new use-case, add a new example demonstrating its use.
12+
* Be careful to follow the code style of the project. Run `yarn lint` after
13+
your changes and ensure you do not introduce any new errors or warnings.
14+
* This repository uses `flow`, please run `yarn flow` after your changes to ensure
15+
that you do not introduce any new type errors.
16+
17+
* Ensure that your effort is aligned with the project's roadmap by talking to
18+
the maintainers, especially if you are going to spend a lot of time on it.
19+
* Make sure there's an issue open for any work you take on and intend to submit
20+
as a pull request - it helps core members review your concept and direction
21+
early and is a good way to discuss what you're planning to do.
22+
* If you open an issue and are interested in working on a fix, please let us
23+
know. We'll help you get started, rather than adding it to the queue.
24+
* Make sure you do not add regressions by running `yarn test`.
25+
* Where possible, include tests with your changes, either that demonstrates the
26+
bug, or tests the new functionality. If you're not sure how to test your
27+
changes, feel free to ping @gwyneplaine or @JedWatson
28+
* Run `yarn coveralls` to check that the coverage hasn't dropped, and look at the
29+
report (under the generated `coverage` directory) to check that your changes are
30+
covered

0 commit comments

Comments
 (0)