Commit graph

1279 commits

Author SHA1 Message Date
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
Konstantin Vyatkin 69582349bb remove redundant CSS (#697)
* remove redundant CSS

* fix error with lack of test for false

* destruct dataset

* fix typo
2019-10-25 13:09:27 +01:00
Konstantin Vyatkin bef6743c3b set window target for minified build (#685)
* set `globalObject` option

* commit builded assets

* set window target for minified build
2019-10-24 18:21:40 +01:00
Konstantin Vyatkin 472e0dff39 [Tooling] use lint-stagged and unleash full Prettier (#692)
* switch to lint-stagged

* separate prettier config into external file

* recommend and configure VSCode extensions
2019-10-24 18:13:06 +01:00
Konstantin Vyatkin 7887c05249 [MAJOR] use attribute hidden (#691)
* use attribute hidden

* commit something to re-run tests
2019-10-24 18:09:44 +01:00
Josh Johnson 9bb0c628b2
Add deploy to gh pages action (#690) 2019-10-24 17:20:57 +01:00
Konstantin Vyatkin a35c8b9009 Fixing typings (again 🤷🏼‍♂️) + test for them (#682)
* add index notation

* add types check
2019-10-24 12:02:34 +01:00
Konstantin Vyatkin 1dbab0f29e upgrade Cypress to 3.5 (#686) 2019-10-24 07:50:00 +01:00
Konstantin Vyatkin e83f40956b fix typings (#681)
* fix typings

* allow array in constructor
2019-10-23 19:11:22 +01:00
Josh Johnson dc7cf42e90
Ignore branches that are not master (#678)
* Ignore branches that are not master

* List branches and ignored branches

* Remove tags check from npm publish instead

* 🔖 Version 7.1.5
2019-10-23 11:01:05 +01:00
Josh Johnson 4c6acb5de2
Further ci tweaks (#677)
* Align codecov actions

* Update post version command to include tag

* 🔖 Version 7.1.4
2019-10-23 10:27:53 +01:00
Josh Johnson 7e38f83b9e
Further ci tweaks (#676)
* Align codecov actions

* Remove preversion

* Remove npm conditional

* 🔖 Version 7.1.3
2019-10-23 10:00:14 +01:00
Josh Johnson 71e64e0f52
Further CI tweaks + vulnerability fix (#675)
* Update workflow job names

* Update csso-cli

* Add conditional to publish-npm

* 🔖 Version 7.1.2
2019-10-23 09:32:25 +01:00
Konstantin Vyatkin 4b9dd1efe3 Remove unused devDependencies (#673)
* remove `opn`

* remove `whatwg-fetch`

* remove `wrapper-webpack-plugin` in favor of built-in plugin
2019-10-23 08:45:49 +01:00