major
minor
major
minor
minor
#26495
Scripting: Referencing objects compactly in drag-and-drop operations
An object in the tree is typically identified during recording by the short breadcrumb “Project > TP 1 > WP 1 > xyz” (com.top_logic.layout.scripting.recorder.ref.TreeLabelPathNaming$TreeLabelPathName)
This is easy for testers to understand and keeps the templates compact and, above all, manageable. It also aligns more closely with the black-box approach, since users cannot see much more than that in the tree.
The scripts for recording drag-and-drop actions, on the other hand, use a significantly more technical white-box approach (com.top_logic.layout.scripting.recorder.ref.TLObjectTreeNaming$TLObjectTreeName). This requires specifying parent-child relationships as well as a nested list of <path><entry> tags. A compact notation in the form of a breadcrumb is not possible here, even though the commands also operate on components. This prevents the effective use of drag-and-drop functions in templates.
Improvement
When recording for drag-and-drop, the compact breadcrumb syntax should also be used (where possible).
Test
Record drag-and-drop, e.g., under
- Technical Demo > Components > Drag & Drop
- Technical Demo > Components > Drag & Drop to
The scripts should be recorded using breadcrumb syntax, if possible, and should be playable.
Code Migration
Replace `TreeGridDragSourceByExpression ` and ` TableGridDragSourceByExpression ` in layout files with ` GridDragSourceByExpression `.
Data Migration
Layouts created in-app must be adjusted as described in the code migration section. The migration script ` Ticket_26495_Removed_GridDragSource_extensions.migration.xml ` handles this when the application boots.