[jquery.fancytree] Add dnd & glyph extensions; widen icon, replaceWith, node members#75088
Open
daberni wants to merge 1 commit into
Open
[jquery.fancytree] Add dnd & glyph extensions; widen icon, replaceWith, node members#75088daberni wants to merge 1 commit into
daberni wants to merge 1 commit into
Conversation
…h, node members - Add the legacy jQuery-UI `dnd` extension: Extensions.DragAndDrop, the DragAndDropEventData callback context, and a HitMode type (these callbacks were previously untyped; only `dnd5` was declared). - Add the `glyph` extension: Extensions.Glyph. - Widen FancytreeOptions.icon / NodeData.icon to also accept a callback (consistent with the other dynamic options and the runtime evalOption). - Widen FancytreeNode#replaceWith() to accept SourceData. - Add documented FancytreeNode members selected / iconTooltip / type, and widen icon to `boolean | string`. - Add Fancytree#cancelDrag() and FancytreeStatic#setSpanIcon(). - Make FancytreeNode#moveTo() `mode` optional (runtime defaults to "child"). - NodeData#data: replace `Object` with `Record<string, unknown>`. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Contributor
|
@daberni Thank you for submitting this PR! This is a live comment that I will keep updated. 1 package in this PRCode ReviewsBecause you edited one package and updated the tests (👏), I can help you merge this PR once someone else signs off on it. You can test the changes of this PR in the Playground. Status
Once every item on this list is checked, I'll ask you for permission to merge and publish the changes. Diagnostic Information: What the bot saw about this PR{
"type": "info",
"now": "-",
"pr_number": 75088,
"author": "daberni",
"headCommitOid": "db15c9d38d2717691c58d04b507b517e392cb45d",
"mergeBaseOid": "ca65e20b1c0aba452e9be1407798945801c758f5",
"lastPushDate": "2026-06-07T16:08:25.000Z",
"lastActivityDate": "2026-06-07T16:22:00.000Z",
"hasMergeConflict": false,
"isFirstContribution": false,
"tooManyFiles": false,
"hugeChange": false,
"tooManyCommits": false,
"tooManyReviews": false,
"popularityLevel": "Well-liked by everyone",
"pkgInfo": [
{
"name": "jquery.fancytree",
"kind": "edit",
"files": [
{
"path": "types/jquery.fancytree/index.d.ts",
"kind": "definition"
},
{
"path": "types/jquery.fancytree/jquery.fancytree-tests.ts",
"kind": "test"
}
],
"owners": [
"alphaleonis",
"itsmattius",
"niikoo",
"Nitecube",
"hosni"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Well-liked by everyone"
}
],
"reviews": [],
"mainBotCommentID": 4643241380,
"ciResult": "pass"
} |
Contributor
|
🔔 @alphaleonis @itsmattius @niikoo @Nitecube @hosni — please review this PR in the next few days. Be sure to explicitly select |
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.
Adds the still-missing pieces of the fancytree 2.38 API surface and tightens a few existing members. Every change was checked against the bundled
jquery.fancytree-all.js2.38.0 runtime.Added
dndextension (Extensions.DragAndDrop) +DragAndDropEventDatacallback context +HitModetype. Previously onlydnd5was declared, so the jQuery-UI-baseddndcallbacks (dragStart/dragEnter/dragDrop/…) were untyped.glyphextension (Extensions.Glyph).Fancytree#cancelDrag()andFancytreeStatic#setSpanIcon().FancytreeNodemembers:selected,iconTooltip,type.Widened / fixed
FancytreeOptions.icon/NodeData.iconnow also accept a callback (matchesevalOptionand the existing dynamic options such ascheckbox/unselectable);FancytreeNode.icon→boolean | string.FancytreeNode#replaceWith()acceptsSourceData(it forwardssourcetonodeLoadChildren, e.g. an ajax{ url }descriptor).FancytreeNode#moveTo()modeis now optional (the runtime defaultsundefined/"over"to"child").NodeData.data:Object→Record<string, unknown>.Tests in
jquery.fancytree-tests.tsexercise each addition.tsc(strict) anddprintpass locally; opening as draft while the fulldtslint/pnpm testrun is verified.