stable
Clone or download
part of: story #16645 have searchable (multi) select boxes with (static binding, no dependencies) Mustache was creating more problems than it solved. Now it's gone, here are the benefits: - calls to Element.querySelector has been drastically reduced - no need to check that the result of my selection is instanceof Element anymore - we create the base components of the list-picker once, then pass them to the classes that need it -> complexity reduced - A small refactoring was possible, so i moved the creation of the base components in a dedicated class. - This class can be now used to write unit tests of classes and functions manipulating these elements. I also made sure that the base components of the list picker have the same name in each class, so we know which element we are manipulating. And last, but not least, the dropdown width is not assigned manually anymore, it is all done using CSS. -- No functional change expected Change-Id: I0209dca2de05235edd9c1f2ce89bdca7e64e78ab
Modified Files
Name | ||||
---|---|---|---|---|
M | src/scripts/list-picker/package-lock.json | +0 | −11 | Go to diff View file |
M | src/scripts/list-picker/package.json | +2 | −5 | Go to diff View file |
M | src/scripts/list-picker/src/helpers/DropdownContentRenderer.test.ts | +12 | −8 | Go to diff View file |
M | src/scripts/list-picker/src/helpers/DropdownContentRenderer.ts | +5 | −16 | Go to diff View file |
M | src/scripts/list-picker/src/helpers/DropdownToggler.test.ts | +14 | −9 | Go to diff View file |
M | src/scripts/list-picker/src/helpers/DropdownToggler.ts | +9 | −18 | Go to diff View file |
M | src/scripts/list-picker/src/helpers/EventManager.test.ts | +19 | −12 | Go to diff View file |
M | src/scripts/list-picker/src/helpers/EventManager.ts | +6 | −8 | Go to diff View file |
M | src/scripts/list-picker/src/helpers/SelectionManager.test.ts | +34 | −27 | Go to diff View file |
M | src/scripts/list-picker/src/helpers/SelectionManager.ts | +12 | −16 | Go to diff View file |
M | src/scripts/list-picker/src/helpers/__snapshots__/DropdownContentRenderer.test.ts.snap | +4 | −4 | Go to diff View file |
D | src/scripts/list-picker/src/list-picker.test.ts | +0 | −63 | Go to diff View file |
M | src/scripts/list-picker/src/list-picker.ts | +20 | −79 | Go to diff View file |
A | src/scripts/list-picker/src/renderers/BaseComponentRenderer.test.ts | +84 | −0 | Go to diff View file |
A | src/scripts/list-picker/src/renderers/BaseComponentRenderer.ts | +101 | −0 | Go to diff View file |
M | src/scripts/list-picker/src/type.d.ts | +9 | −0 | Go to diff View file |
M | src/scripts/list-picker/themes/BurningParrot/style.scss | +7 | −0 | Go to diff View file |