<ng-template pageTab>
<tui-doc-example
*ngFor="let example of examples; let index = index"
[component]="index + 1 | tuiComponent"
[content]="index + 1 | tuiExample
[heading]="example"
[id]="example | tuiKebab"
/>
</ng-template>
Problem:
When adding new examples, a folder with the index n + 1 is created. There is no way to insert an example in the middle, between the other examples, without swapping and renaming the new example folder with some other one examples folder.
For example, the 13th example are being created and you need to make it 8th in the list. The only way to do this now is to swap places with the current 8th example. But the example that was in 8th place does not belong in last. Now you need to change it again with someone before and so on all the time.
Such manipulations are inconvenient and end up with a dirty github changes in PR and it becomes difficult to review. Such PR, for example, #9114
Proposed solution:
Add the ability to declaratively set the order of examples in the main file. It can be implemented in the form of creating a key for each example and associating this key with an array in the main example index.ts file to control the order
Description
Problem: When adding new examples, a folder with the index n + 1 is created. There is no way to insert an example in the middle, between the other examples, without swapping and renaming the new example folder with some other one examples folder.
For example, the 13th example are being created and you need to make it 8th in the list. The only way to do this now is to swap places with the current 8th example. But the example that was in 8th place does not belong in last. Now you need to change it again with someone before and so on all the time.
Such manipulations are inconvenient and end up with a dirty github changes in PR and it becomes difficult to review. Such PR, for example, #9114
Proposed solution: Add the ability to declaratively set the order of examples in the main file. It can be implemented in the form of creating a key for each example and associating this key with an array in the main example
index.ts
file to control the order