Content
View differences
Updated by Henriette Darge over 2 years ago
# Current situation
We have many different implementations of autocompleters. All of them behave differently and allow different inputs.
### Pain
* Different implementations are hard to maintain/extend
* Different Inputs (name, type, functionality etc) making them hard to use in the code
* Different behaviour results in incosistencies in the UI
# Proposed solution
* One `op-autocompleter` component which is the only component allowed to call `ngSelect`.
* Thus it is easier to react to changes in `ngSelect` or (maybe) replace it in the future
* It One `base-autocompleter` component which defines all allowed inputs and basic functions
* Specific autocompleters for each component (e.g. `user-autocompleter`, `project-autocompleter`, `work-package-autocompleter`, etc)
* They inherit from the `base-autocompleter` and only define additional functions needed for their specific use case
* As In the template, they use the `op-autocompleter.html`
* If needed, they provide custom `op-autocompleter` providing (if needed) additional templates as separate components which can be applied by for the `applyTemplate` method of the `op-autocompleter`
## List of autocompleters to check (and transfer)
* [x] user-autocompleter
* [x] member-autocompleter
* [x] project-autocomplater
* [ ] work-package-autocompleter
* [ ] create-autocompleter
* [ ] te-autocompleter
* [ ] version-autocompleter
* [ ] draggable-autocompleter
* [ ] colors-autocompleter
* [ ] relations-autocompleter
* [ ] board-inline-add-autocompleter
* [ ] Places where `ng-select` is called directly (without a dedicated component around it)
## Out of scope
* due to complexity and plans to rework it soon: Search ngSelect depending on their use case
We have many different implementations of autocompleters. All of them behave differently and allow different inputs.
### Pain
* Different implementations are hard to maintain/extend
* Different Inputs (name, type, functionality etc) making them hard to use in the code
* Different behaviour results in incosistencies in the UI
# Proposed solution
* One `op-autocompleter` component which is the only component allowed to call `ngSelect`.
* Thus it is easier to react to changes in `ngSelect` or (maybe) replace it in the future
* Specific autocompleters for each component (e.g. `user-autocompleter`, `project-autocompleter`, `work-package-autocompleter`, etc)
* They inherit from the `base-autocompleter` and only define additional functions needed for their specific use case
* As
* If needed, they provide custom
## List of autocompleters to check (and transfer)
* [x] user-autocompleter
* [x] member-autocompleter
* [x] project-autocomplater
* [ ] work-package-autocompleter
* [ ] create-autocompleter
* [ ] te-autocompleter
* [ ] version-autocompleter
* [ ] draggable-autocompleter
* [ ] colors-autocompleter
* [ ] relations-autocompleter
* [ ] board-inline-add-autocompleter
* [ ] Places where `ng-select` is called directly (without a dedicated component around it)
## Out of scope
* due to complexity and plans to rework it soon: Search