Major
#27590
Exporting documentation from the application to the workspace creates unnecessary changes
When the documentation is exported from the application to the workspace, it creates unnecessary changes from the version from the repository.
Background
These changes are in the value of the HTML attribute data-custom. This attribute is used to store whether the label of a link has been customized to a tl:TLObject, or is the same as the default label of the TLObject. This allows the system to automatically adjust the labels of the links when the label of the TLObjects changes.
Analysis
When an application is started for the first time, it imports the documentation (from the workspace). If the documentation is exported afterwards, it directly contains changes in this attribute. The reason is that when a new value is saved, the labels of the links are checked to see if they match the label of the TLObject they point to. The import, of course, also performs a save of these values. However, during the import the TLObject may not exist yet, or only in other languages. Therefore the wrong label is calculated and the comparison results in the wrong value. This results in these changes, which become visible during the export.
Solution
Fixing this would make the code for this attribute even more complex. At the same time, the automatic update of the labels is not sufficient anyway, because the label of the link must also be adjusted to the grammatical position in the sentence. Therefore, the links to a TLObject have to be checked after a change of its label anyway. Therefore, it is not worth the complexity created by this feature. Therefore it is removed.
Test
- Viewing and editing the documentation works.
- Links to TLObjects work and can be created.
- After exporting the documentation, no matter in which application and from which state, there are no changes to data-custom attributes. (But possibly other changes that have nothing to do with data-custom attributes).