This issue has been created
 
 
XWiki Platform / cid:jira-generated-image-avatar-b44d1daf-114c-4cb4-a3df-795a822db829 XWIKI-25689 Open

Share the move up and move down reordering logic of the class editor with Live Data

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-b0d4a7e4-9478-411e-932b-0d7897c478f9 Charpentier Lucas created this issue on 06/Nov/26 14:58
 
Summary: Share the move up and move down reordering logic of the class editor with Live Data
Issue Type: cid:jira-generated-image-avatar-b44d1daf-114c-4cb4-a3df-795a822db829 Improvement
Affects Versions: 18.9.0
Assignee: Unassigned
Components: Edit, Live Data
Created: 06/Nov/26 14:58
Priority: cid:jira-generated-image-static-major-89c9a18b-069f-4cd8-8734-882d396e5feb Major
Reporter: Charpentier Lucas
Description:

XWIKI-24755 adds move up and move down buttons to the class editor, so that XClass properties can be reordered without dragging. They are implemented by the xwiki-reorder-controls widget, a jQuery module served from the skin.

Live Data has the same need, for its column headers and for the column and sort panels, but it cannot use that widget: it is written in Vue, bundled from xwiki-platform-node, and it can neither load skin files nor rely on jQuery DOM moves. Without a shared implementation, Live Data would have to duplicate the logic, and the two editors would drift apart.

Proposal

  • Extract the framework-agnostic parts into a small xwiki-platform-node package:
    • the move and boundary logic;
    • the arrow key mapping;
    • the live region announcing the new position to screen readers.
  • Turn the current jQuery code into the class editor adapter of that package.
  • Add a Vue adapter for Live Data later on.

Until then, the widget of XWIKI-24755 stays internal and is not advertised as a reusable API.

This was raised in the review of https://github.com/xwiki/xwiki-platform/pull/6267.