Hey Creators!
We are excited to announce the new version of Studio Script Editor’s Diff Tool which will be rolling out to 100% of users in the coming days!
We rebuilt the Diff Tool based on the Script Editor so it offers a much better user experience that is consistent with the rest of Studio’s Script Editor. The new Diff Tool now supports text selection, copying and pasting code, and more!
The Diff Tool can be invoked from the Compare Package Versions dialog, View Script History, and Drafts Widget.
Features
Text Selection
Keyboard Shortcuts
-
Copy: Ctrl + C (Windows/Linux) / Cmd + C (macOS)
-
Select all: Ctrl + A / Cmd + A
-
Zoom in: Ctrl + + / Cmd + +
-
Zoom out: Ctrl + - / Cmd + -
-
Reset zoom: Ctrl + 0 / Cmd +0
Code Expansion
Users can click on the arrow icon to expand folded sections, revealing the code 10 lines at a time.
Note: Once expanded, sections cannot be recollapsed.
Batched Diffing
In Drafts Mode, compare changes across multiple documents, with each diff opening in a new tab.
Prev/Next Hunk
Users should be able to navigate between the hunks using the prev/next hunk actions from the ribbon bar
Visual Line Indicators
Visual indicators such as +/-, line numbers, up/down arrows (for expandable code), and … (for non-expandable code) show where lines have been added, modified, or removed.
When code is collapsed, the new diff tool displays modified lines with three lines of context on each side and a hunk header formatted as @@ -a,b +c,d @@. Here, a and c are the start lines in the original and new file, respectively, while b and d indicate the number of lines changed.
Please let us know if you have any questions! The team will be closely monitoring for any potential issues throughout the release process and beyond.
We are extremely excited to see how this will improve the scripting experience for you!
Many thanks to @BobaTops, @notchickennnnn, @montximontxi, and @idevride for making this possible.
Happy scripting!