Repository navigation
feat(dnd): drag-list and drag-multiple on the host api; host ui gaps - #128
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
D-ELEMENTS-HOST-GAPS (reference-site acceptance). Companion: no-js-dev/nojs-server#73 (the server half of
drag-list).What changes
Each gap was reproduced three times on a compiled site before the fix.
drag-list/drag-multipleon the host API. These were the last two host stubs.drag-listnow declares alistcontract member (NoJS-Server ADR-021 amendment 2026-11-20b). The server renders the rows and compiles reorder, insert and remove into actions. On the host, the mechanics decorate the server-rendered rows, drop the loop markers, report indices throughhost.exec, and apply the settle class after the re-render.src/dnd/element.jssplitsdrag-listinto a core backend and a host backend, and core behavior is unchanged.drag-multiplekeeps its selection on the client. The$dragofdropis declaredsealed: { multiple: true, maxItems: 100 }.popoverreturns early on[dropdown-menu]. Core showed the same bug outside loop rows: theelements-overlaysgoldens hadnojs-popoveron the menu.nojs-dd-menu-<n>, the lowest free number in the document, throughfreeIdin_backend.js. Core re-creates loop rows on every render, while the host initializes them once, so a running counter drifted between the two.aria-controls/aria-labelledby) from the first render, on both backends. The core backend used to leave the links out until the first navigation. The Next button on compiled sites is fixed on the server side (control state and markers on morphed subtree owners).Also fixed: table sort keeps sorted rows before a loop's end marker (
tbody.appendChildmoved them after it).Visible changes on core pages
aria-controls/aria-labelledbyat load.nojs-dd-menu-0).nojs-popover/data-popover-id.The reference-site goldens for j3-board, j6a-team and j6c-wizard need a re-capture.
Tests
validation-formstest flaked once under full load; it passes 3 of 3 in isolation and in a full rerun.drag-list(decoration, markers, move/insert/remove payloads, copy,drop-disabled/drop-max/drag-disabled, settle) and the hostdrag-multiple. They also cover dropdown ids, popover exclusion, stepper linkage, the table markers and the dnd label.Not done / follow-ups
drag-listbehavior on compiled sites (docs only; no directive changes).