π - Migrate demo application to standalone components
nsbarsukov opened this issue Β· comments
Nikita Barsukov commented
Why is it important ?
We have many examples when it is not obvious which modules are required to fully reproduce the example.
For instance, open this example:
https://taiga-ui.dev/next/components/input#sizes
If developer tries to reproduce it, it will not completely work.
Why ? Because, TuiInputModule
is not the only required module.
It also requires TuiTextfieldControllerModule
and TuiHintModule
.
If we migrate the whole demo application to standalone, we can solve this problem (developer can see all required modules inside TypeScript
tab).
Algorithm
- Take any folder from https://github.com/taiga-family/taiga-ui/tree/main/projects/demo/src/modules/components
- Check if it does not already contains standalone components
- Migrate all examples to standalone (double check that standalone example imports ONLY REQUIERED modules, no any redundant imports)
- Migrate host component of this documentation page (add
export default
) - Update routing file
- Commit and push you branch (don't include many documentation pages in single PR; 1 PR per documentation page!)
Hints:
- You can use https://angular.io/guide/standalone-migration script. It has
--path
flag, if you find it useful. My own experience showed that it does not save so much time.