Repository navigation
Clear the file name pasteboard deprecation warnings - #589
Merged
Merged
Conversation
goneng
force-pushed
the
clear-pasteboard-type-warnings
branch
2 times, most recently
from
August 24, 2026 11:15
5b4806f to
8a95c77
Compare
goneng
marked this pull request as ready for review
August 24, 2026 11:41
goneng
force-pushed
the
clear-pasteboard-type-warnings
branch
from
August 24, 2026 11:42
8a95c77 to
5fa302d
Compare
Take the dropped files from the pasteboard through the file URL API that replaced the file name property list. - Read the drop as file URLs rather than as a list of path strings - Skip a URL that carries no path, rather than inserting nothing The view rewrites dropped paths to be relative to the working directory, and that needs only the paths, so reading them as URLs leaves what ends up in the message unchanged.
Put each dragged file on the pasteboard as its own file URL item, the shape that replaced the single file name property list. - Hand the table one pasteboard writer per row, which is where a drag of several files gets its several items - Name the internal row payload after the bundle, since an item drops a type that is not a uniform type identifier - Carry that row on the same item, so a drag between the two tables reads the rows back off the items it was handed The tables exchange rows through a private type, which the older pasteboard API accepted under any name. Carried on an item it needs a real identifier, and is dropped without one, silently and without failing the drag.
goneng
force-pushed
the
clear-pasteboard-type-warnings
branch
from
August 24, 2026 11:54
5fa302d to
4ebf8af
Compare
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.
Hand the dragged and dropped files over as file URLs, the shape that
replaced the file name property list on the pasteboard.
of several files gets its several items
a type that is not a uniform type identifier
reads the rows back off the items it was handed
The tables exchange rows through a private type, which the older
pasteboard API accepted under any name. Carried on an item it needs a
real identifier, and is dropped without one, silently and without
failing the drag.
This clears four of the seven pasteboard warnings. The three left are
NSFilesPromisePboardTypeinPBQLOutlineView, which needNSFilePromiseProviderand a reworked write path, so they are betteroff on their own.
Dragging a file out to the Finder moves it rather than copying it.
That is long-standing behaviour rather than anything new here, and
#592 addresses it separately.
Test plan:
PBGitCommitFileDragTestscovers the drag from both ends: everydragged file reaches the receiver, each dragged row gets its own
pasteboard item, and the rows stay readable for a drag between the
tables
xcodebuild test -only-testing:GitXTestsis green, 45/45one file and several files between the staged and unstaged lists,
in both directions; dragging several files out to another editor,
which opens all of them; dropping files on the commit message from
inside the repository, which writes relative paths, and from
outside it, which writes absolute ones