Commit graph

1142 commits

Author SHA1 Message Date
Josh Johnson 44da784f29
🔖 Version 9.0.0 (#758) 2019-11-14 22:51:50 +00:00
agamemnus 6be462c80b Typo. (#759) 2019-11-14 20:34:05 +00:00
Josh Johnson e67b8a3e4c
Commit and push built files to master (#756)
* Commit and push built files to master

* Testing...

* Add  name

* Add fallback

* Revert back to master branch
2019-11-14 09:47:20 +00:00
Josh Johnson 933ea6093f
Remove redundant check (#755)
* Remove redundant check

* Add integration tests covering fix

* Add missing test
2019-11-13 15:40:47 +00:00
Josh Johnson 84b952e115
Resolve bug #637 (#754)
* Add is-selected class when item is selected

* Remove console.log

* Update README
2019-11-13 14:49:23 +00:00
Chris DeLuca f745be449d Always hide remove button if no value is selected (#744)
In some cases, the remove item X button is not hidden when there is no
selection made from the dropdown. This is not as usable, since there's
no item to clear, hence an effective noop.

The condition I saw seeing this issue arise is in single selects with
a placeholder value, a selection has been made, and then cleared: the
button HTML remains.

To fix, add some styles to hide the button if the select doesn't have a
value selected, in this case keying off of it's parents `data-value`
property.

fixes #684
2019-11-12 12:29:34 +00:00
Konstantin Vyatkin 8775bacdd9 improve whole-page performance by scoping events handlers (#740)
* scope onMouseDown event capture

* supercedes #710

* make isIE11 a const

* scope keydown

* scope mouseover

* fix removeEventListener for keyup
2019-11-12 09:47:41 +00:00
Oleg Dmitrochenko fb2310cb56 Indent fixed in "choices__list--dropdown" (#750)
Indent fixed in "choices__list--dropdown". Added "box-sizing: border-box;".
2019-11-12 09:03:04 +00:00
Konstantin Vyatkin 68322d9528 Upgrade Cypress to 3.6 and use cache in Github Actions (#748)
* try to cache cypress cache

* try to fix

* try cache hit

* Upgrade Cypress to 3.6

* remove uneeded prefix
2019-11-08 13:24:57 +00:00
Josh Johnson d04031e02f
Fix id types (#743)
* Set ids to be numbers

* Split out _setLoading into start/stop methods

* Build
2019-11-08 09:19:18 +00:00
Konstantin Vyatkin 7dcc155b8f remove safari test, update snapshots for new macOS, use dependency caching (#745)
* remove safari test

* add node modules caching

* update macos snapshots

* try to fix caching

* try like this

* cache .npm

* adjust cache keys
2019-11-08 07:48:29 +00:00
Josh Johnson b5b593a62f
Resolve bug 473 (#739)
* Fix #473

* Add tests

* Tweak cypress tests

* Build
2019-11-07 08:50:19 +00:00
Konstantin Vyatkin 81c44ba8f2 Enable test on Safari (#737)
* Enable test on Safari

* fix platform name

* update base Safari snapshot
2019-11-04 13:17:45 +00:00
Josh Johnson f30b976424
Resolve bug 533 (#736)
* Add placeholder options to demo page

* Use constant types in components

* Refactor adding predefined groups/items/choices

* Add 'highlighted' flag to Item type

* Fix dispatch param type

* Build

* Add jsdoc comments to utils

* Remove unused file

* Add default values to js doc comments

* Use Redux Action type

* Housekeeping

* Increase utils coverage

* Apply suggestions from code review

* Add _getTemplate unit tests

* Resolve #533

* Add tests
2019-11-03 18:12:47 +00:00
Josh Johnson ab22347d7b
Code refactoring (#735)
* Add placeholder options to demo page

* Use constant types in components

* Refactor adding predefined groups/items/choices

* Add 'highlighted' flag to Item type

* Fix dispatch param type

* Build

* Add jsdoc comments to utils

* Remove unused file

* Add default values to js doc comments

* Use Redux Action type

* Housekeeping

* Increase utils coverage

* Apply suggestions from code review

* Add _getTemplate unit tests
2019-11-03 17:45:16 +00:00
Josh Johnson e6882f3e4b
Add missing type definitions + rename sortFn (#734)
* Add wrapped element getters + fix some types

* Remove comment

* Add missing config options to types

* Add types to constants

* Rename sortFn to sorter

* Update PR template

* Add refactor to PR template

* Add passed element types to constants

* Add js doc comments to actions

* Add "returns" to js doc comments

* Add missing choice prop to type

* Add types to store.js

* Add jsdoc comments to components

* Ignore strict null checks

* Move loading action into misc.js

* Further type def additions

* Rename itemCompare to valueCompare

* Update badges

* Rename scrollToChoice to scrollToChildElement
2019-11-03 13:18:16 +00:00
Josh Johnson 452c8fa666 Fix release drafter 2019-11-02 14:03:27 +00:00
Josh Johnson a0fe05f926
Fix #727 (#731)
* Housekeeping

* Resolve placeholder bug + hide from choice list

* Restructure test folder

* Update cypress test to assert one placeholder

* Fix breaking e2e test

* Remove ability to pass placeholder via config for select boxes

* Add further e2e tests covering placeholders

* Add unit tests for _generatePlaceholderValue

* Display placeholder choice for select one

* Add further e2e test to assert on placeholder ordering

* Add labels to exclude from draft releases

* Add failure case to e2e test workflow

* Resolve broken e2e test

* Update puppeteer snapshot baseline
2019-11-02 13:49:33 +00:00
Konstantin Vyatkin 939a73b762 fix setChoices flow (#730)
* fix setChoices flow

* ignore Promise as it gate checked

* re-run cypress
2019-11-02 12:58:18 +00:00
Konstantin Vyatkin 68f6b8e398 [bug] Override Prettier settings for Demo page (#733)
* add prettier override

* run prettier
2019-11-02 11:19:09 +00:00
Konstantin Vyatkin dddba5b35b [TEST] Automatic screenshots comparing and error checking in IE11, Firefox and Chrome (#715)
* taking screenshots

* let's try

* save artifacts

* better exceptiosn

* try to install geskodriver

* fix edge name

* add check for safari

* check os

* try this

* again

* fix syntax

* try this

* try firefox on windows

* and again

* handle error

* and again

* try older macos

* add firefox screenshot

* switch back env

* switch back env

* add IE screenshot

* try sudo for safari

* try not install nuget

* try more

* more

* try this

* install firefox

* add chrome

* increase threshold

* add firefox-darwin

* push

* fixing

* let's go

* increase threeshold

* again

* try safari tp

* tap cask versions

* fix conditions

* try like this

* last run

* increase threshold

* reenable macos firefox

* last try for safari

* rename screenshots to snapshots

* check console

* console workarounds

* fix safari misspleings

* logging is not supported by everyone

* maximize and set rect

* errors only for Chrome

* remove safari for now

* try to decrease threshold

* cleanup

* increase threeshold

* sleep more and increase threeshold

* add pupeeter

* handle errors

* build

* add prettier end of line

* add gitattributes

* add png to binary

* more attributest

* limit run

* run on chages to snapshots

* hey!

* make artifacts named as snapshots

* just for fun: we don't need express here

* update pupeeter snapshot

* no audit

* don't wait for quit?

* try more IE capabilities

* add wait timeout

* use server.js
2019-11-02 11:18:19 +00:00
Konstantin Vyatkin 5afe8b5a7f speed up getAdjacentEl (#726)
* use element accessors

* don't change params
2019-10-31 17:49:27 +00:00
Josh Johnson 9e11db8181
Add documentation label + headings (#729) 2019-10-31 17:40:02 +00:00
Josh Johnson 00e53f76ee
Update GitHub action workflows (#728)
* Deploy on published release

* Run build and test on merge to master

* Update release drafter template

* Update title of releases

* Testing cypress fix

* Pass group to --group flag
2019-10-31 17:28:12 +00:00
Konstantin Vyatkin 5051bf1b10 Fix lint (#723)
* adjust eslint config

* run prettier

* limit cypress run

* add all cypress files
2019-10-31 12:11:46 +00:00
Konstantin Vyatkin 034191c78a use CSS queries (#718)
* use matchMedia

* use last-of-type

* better type check

* simplify distanceFromTopWindow

* use visibility

* update JSDoc
2019-10-30 17:28:15 +00:00
Josh Johnson c03fcf5d03
Store config in file (#722) 2019-10-30 13:19:34 +00:00
Josh Johnson eb17194ff3
Add release drafter (#720)
* Add release management github action

* Simplify PR template

* Add chore to PR template

* Simplify labels

* Add housekeeping label

* Add refactor label
2019-10-30 13:10:52 +00:00
Josh Johnson 0e44a916e3
Fix constructor (#693)
* breaking test

* Remove ablity to pass multiple elements + tests

* Update readme

* Update README.md

* 🔖 Version 8.0.0

* Remove type definition hack

* Update coverage command

* Add some missing list tests

* Remove .only

* Update demo page to loop over elements

* Update constructor to set initialised flag if already active

* Make templates private

* Throw type error once if element is invalid

* Fix list children bug

* Re-add generic examples to index.html

* Housekeeping

* Use typeof instead of isType where applicable

* Remove isElement

* Add test for isIE11
2019-10-29 21:19:56 +00:00
Josh Johnson 88f63faa0b
Update code styling rules (#713)
* Enforce curly braces around conditionals

* Install sort class members + update rules

* Satisfy linting changes

* Add todo

* Add tests for clearChoices

* Update eslint-plugin-prettier to latest

* Resolve conflicts

* Fix linting errors
2019-10-29 18:26:11 +00:00
Konstantin Vyatkin 172366d6fa [Tooling] Expand browsers target while keeping Polyfills under control (#709)
* expand browsers target

* add eslint-plugin-compat

* sort polyfils

* adjust readme

* add polyfills sync check action

* only build js

* trim

* add Element.prototype.closest

* add closest to demo links

* fix ignore
2019-10-29 18:19:19 +00:00
Konstantin Vyatkin e3cc6eaf1b [MAJOR] Remove .ajax and allow async function for .setChoices (#701)
* WIP: remove ajax

* copy #700

* remove ajax, add fetchChoices

* extend setChoices

* update README
2019-10-29 18:12:32 +00:00
Konstantin Vyatkin 1f5192b4ad remove delegateEvents (#703) 2019-10-29 17:46:10 +00:00
Konstantin Vyatkin 2e004015d5 fix preventPaste (#707)
* what is preventPaste?

* fix preventPaste
2019-10-29 17:35:20 +00:00
Konstantin Vyatkin b080bcda7d rename addItemFilterFn (#699) 2019-10-29 17:29:31 +00:00
Konstantin Vyatkin 2a03d9be12 don't reemplement localeCompare (#695) 2019-10-29 17:09:49 +00:00
Tadeusz Wawszczak 2b8acc5f37 add clearChoices typings (#717) 2019-10-29 17:07:22 +00:00
Konstantin Vyatkin 9504cfcec5 [MAJOR] expose defaults and original Template rendering functions (#708)
* expose original Template rendering functions

* add to types

* add moduleResolution

* use `defaults`
2019-10-29 15:13:00 +00:00
Konstantin Vyatkin 1c751472b2 [Tooling] Transpile tests targeting Node, not browser (#700)
* transplite tests for higher target

* fix test

* add to lint-stagged too
2019-10-29 14:05:37 +00:00
Konstantin Vyatkin b48395ce36 fix dir (#711) 2019-10-29 14:02:24 +00:00
Konstantin Vyatkin a2485392a5 don't reimplement native closest (#696) 2019-10-28 20:26:19 +00:00
Josh Johnson 50fae125ed
Resolve on save vscode conflict (#714) 2019-10-28 20:26:03 +00:00
Josh Johnson 264a0cb486 Build 2019-10-28 19:53:24 +00:00
Konstantin Vyatkin 92d5e49fb6 [Tooling] VSCode Debug configurations and project settings (#705)
* configure tasks

* configure VSCode debugging

* adjust VSCode project settings

* fix bdd

* fix cypress path on macos/linux

* enforce checkJs

* make buildAndWatch default build task

* recommend and configure mocha-sidebar

* tune settings
2019-10-28 19:43:21 +00:00
Konstantin Vyatkin 64407174e3 closes #587 (#704) 2019-10-28 19:33:27 +00:00
Konstantin Vyatkin dbd15d7823 don't calculate pixel width (#694) 2019-10-28 19:27:10 +00:00
Konstantin Vyatkin 99f945bc03 raf is supported natively by JSDOM (#706) 2019-10-27 20:18:59 +00:00
Konstantin Vyatkin 312569a734 make hidden important (#702) 2019-10-27 20:17:30 +00:00
Konstantin Vyatkin 15d54c7d34 Remove classnames and use createElement (#687)
* enable restricted syntax in tests

* add Options to global

* crearte native elements

* remove unused helper

* fix/improve typings

* add JSDoc typings

* remove if/else
2019-10-25 15:43:28 +01:00
Konstantin Vyatkin ef2c70fb7a use default parameters (#698)
* use default parameters

* Fix argument name in README
2019-10-25 13:21:38 +01:00