Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Render file patches with a decorated Editor #1512

Merged
merged 402 commits into from
Oct 25, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
402 commits
Select commit Hold shift + click to select a range
c4f8449
Back file patch selections with editor selection
smashwilson Aug 29, 2018
bef4e2f
Filter non-change rows from the selection before calling prop callback
smashwilson Aug 29, 2018
f2803f0
FilePatchHeader provides the raw DOM event
smashwilson Aug 29, 2018
8c7e7b7
Show the loading spinner while the repository itself is loading
smashwilson Aug 29, 2018
2b0179f
Consider a hunk "selected" if its range is enclosed by a selection
smashwilson Aug 29, 2018
7eae566
Reword that FIXME :eyes:
smashwilson Aug 29, 2018
619e841
Update patch generation logic
smashwilson Aug 30, 2018
489b17f
Brighten selected changes
smashwilson Aug 30, 2018
b53d145
Improve the error message from a failed autobind()
smashwilson Aug 31, 2018
cb76f80
core:confirm can call toggleRows directly
smashwilson Aug 31, 2018
50de48e
Select the next changed row by index when the patch changes
smashwilson Sep 4, 2018
a1820c1
Forward to Patch::getNextSelectionRange() from FilePatch
smashwilson Sep 4, 2018
49c7d53
Advance the selected editor range when a new FilePatch arrives
smashwilson Sep 4, 2018
a141eef
Pass previous selectedRows set, not current one
smashwilson Sep 4, 2018
5603dff
Suppress Selection change events while setting editor text
smashwilson Sep 4, 2018
505ef96
Don't reset selectedRows in FilePatchController
smashwilson Sep 4, 2018
a4db197
toggleRows() is a no-op with no changes selected
smashwilson Sep 4, 2018
7c070a7
Go go gadget off-by-one error
smashwilson Sep 4, 2018
cfd1db2
Allow AtomTextEditor to manage selection events
smashwilson Sep 4, 2018
18663ee
Remove unused variable
smashwilson Sep 4, 2018
10c0f44
Oh, right. This is here so that markers don't render on row 0
smashwilson Sep 4, 2018
bba38bf
Access a patch's first change range row
smashwilson Sep 4, 2018
7aff780
Select the first row of the first change on mount
smashwilson Sep 4, 2018
1f44b4a
:hocho: .old.js files
smashwilson Sep 5, 2018
4a7c4f9
Span IndexedRowRanges to the final column of the row
smashwilson Sep 5, 2018
4f33f31
Region test coverage
smashwilson Sep 5, 2018
a8857c0
Preserve end columns in Hunk methods
smashwilson Sep 5, 2018
2caafaa
Don't assert against hunk row range columns
smashwilson Sep 5, 2018
79d8662
Patch coverage
smashwilson Sep 5, 2018
c6b7eb8
FilePatch coverage
smashwilson Sep 5, 2018
2ca4b53
Build FilePatches with row ranges that end at the end of the final row
smashwilson Sep 5, 2018
95e9a35
FilePatchItem coverage
smashwilson Sep 5, 2018
f301562
FilePatchController coverage
smashwilson Sep 5, 2018
646ebf4
Remove unused hunk navigation commands (for now)
smashwilson Sep 5, 2018
66bae49
Use the real FilePatch builder
smashwilson Sep 5, 2018
34d222d
Remove the unused hunk selection methods (for now)
smashwilson Sep 6, 2018
ec4ab28
:hocho: that case we could never actually get to
smashwilson Sep 6, 2018
e0bd870
Turns out Range.fromObject() normalizes start and end already
smashwilson Sep 6, 2018
0fb0a5d
Handle eliminating the last row of a selection with ctrl-click
smashwilson Sep 6, 2018
46897ee
lastSelectionRange is always start-before-end
smashwilson Sep 6, 2018
42c8c67
Pad newLine labels without a hunk
smashwilson Sep 6, 2018
8b47f45
Coverage-ignore branches that are platform-specific
smashwilson Sep 6, 2018
f5cb601
Coverate for FilePatchView
smashwilson Sep 6, 2018
f4d5697
Band-aids to get the CommitView tests passing
smashwilson Sep 6, 2018
b43be3a
:fire: more unused code
smashwilson Sep 6, 2018
6af10df
Coverage for HunkHeaderView
smashwilson Sep 6, 2018
bc1f023
ETOOMANYREFS
smashwilson Sep 6, 2018
e8bea90
PASS YOU COWARDS
smashwilson Sep 6, 2018
d993c3b
:shirt:
smashwilson Sep 6, 2018
89e693f
Disable symlink tests on Windows
smashwilson Sep 7, 2018
a1a531e
Mode changes aren't a thing on Windows either
smashwilson Sep 7, 2018
51b921f
Track selection mode in FilePatchController
smashwilson Sep 7, 2018
370ce17
Let's see if bumping node helps?
smashwilson Sep 7, 2018
909f9e5
WIP
smashwilson Sep 10, 2018
ab80df6
Merge branch 'aw/file-patch-editor' of github.com:atom/github into aw…
smashwilson Sep 10, 2018
579b703
:fire: console.logs
smashwilson Sep 10, 2018
242fa35
Merge remote-tracking branch 'origin/master' into HEAD
smashwilson Sep 10, 2018
27a3ed5
Merge branch 'other' into aw/file-patch-editor
smashwilson Sep 10, 2018
a619e7e
Rewrite AtomTextEditor, now with test coverage :stars:
smashwilson Sep 11, 2018
8f981fc
:fire: dot only
smashwilson Sep 11, 2018
abcc686
Store Patch text as a TextBuffer
smashwilson Sep 11, 2018
61d49ce
Store Ranges directly within Regions
smashwilson Sep 11, 2018
b64568d
Move intersectRowsIn() to Region
smashwilson Sep 11, 2018
e204ef2
Adjust Hunk to store Ranges instead of IndexedRowRanges
smashwilson Sep 11, 2018
7179d06
Range :point_right: Marker in Regions
smashwilson Sep 12, 2018
401da21
Store buffer markers in hunk regions
smashwilson Sep 13, 2018
64122f3
Organize patch markers into layers
smashwilson Sep 13, 2018
000e1c2
Update FilePatch tests, phew
smashwilson Sep 13, 2018
9d24815
Create markers on correct layers in builder
smashwilson Sep 13, 2018
31f57a6
Remove unused code
smashwilson Sep 13, 2018
bb8c038
Adopt a Buffer from a previous Patch
smashwilson Sep 14, 2018
708ae89
Typo fix and test coverage for Patch
smashwilson Sep 14, 2018
426a177
:shirt: Remove unused imports
smashwilson Sep 14, 2018
efd24cb
Buffer adoption at the FilePatch layer
smashwilson Sep 14, 2018
997036a
Implement getHunkAt() on Patch and FilePatch
smashwilson Sep 14, 2018
3523871
Externally managed Markers and MarkerLayers
smashwilson Sep 14, 2018
bfcfca2
Separate update and creation props
smashwilson Sep 14, 2018
1c66ca9
FilePatchView tests are green again
smashwilson Sep 14, 2018
491f4c4
Adopt the buffer from the previous FilePatch
smashwilson Sep 14, 2018
9275448
Shuffle some lifecycle methods around
smashwilson Sep 14, 2018
803f588
buildTextEditor() isn't happy, go back to new TextEditor()
smashwilson Sep 17, 2018
733000e
Give the AtomTextEditor wrapper <div> a CSS class
smashwilson Sep 17, 2018
3a2cb7d
Gutters are sometimes disposed after their containing TextEditors
smashwilson Sep 17, 2018
e4ddb96
Marker and MarkerLayer IDs are strings
smashwilson Sep 17, 2018
4544e19
The commit message editor uses a TextBuffer managed by CommitController
smashwilson Sep 17, 2018
989362f
Use distinct objects for each null Patch
smashwilson Sep 17, 2018
090fe64
Use Patch.createNull() and FilePatch.createNull() instead of singletons
smashwilson Sep 17, 2018
1ed20aa
Soft-wrap patch editor
smashwilson Sep 17, 2018
d787102
Move BufferBuilder to the end of the file
smashwilson Sep 17, 2018
f668c01
Remove unused onChangeMessage callback
smashwilson Sep 17, 2018
6c718fb
Retain TextBuffers owned by a Patch
smashwilson Sep 17, 2018
dcbfe5e
Pass explicit arguments to this.props.toggleRows()
smashwilson Sep 17, 2018
6c2e679
Default nextSelectionMode to line unless explicitly locked to 'hunk'
smashwilson Sep 17, 2018
faf9513
Perform buffer adoption in the controller's didUpdate method
smashwilson Sep 17, 2018
695c958
Okay, actually do it in the FilePatchView I guess
smashwilson Sep 17, 2018
ae7eb0f
Invert Patches onto a new buffer
smashwilson Sep 18, 2018
141f0ab
NullPatch needs a getHunkAt method
smashwilson Sep 18, 2018
808d49f
Update Markers in componentDidUpdate()
smashwilson Sep 18, 2018
b624736
Use a .isEqual() method to compare sync cache results when available
smashwilson Sep 18, 2018
79c657c
isEqual() for FilePatch, File, Patch, Hunk, and Region
smashwilson Sep 18, 2018
98e2310
Adopt buffers in getSnapshotBeforeUpdate()
smashwilson Sep 18, 2018
427233f
No need to set the cursor position
smashwilson Sep 18, 2018
df56d6a
Propagate AtomTextEditor changes to Gutter tests
smashwilson Sep 18, 2018
44cd941
Find the atom-text-editor element in a much messier way
smashwilson Sep 18, 2018
1f2d211
Compare FilePatches with .isEqual() instead of assert.deepEqual()
smashwilson Sep 18, 2018
658145a
Re-sync commit message buffer to Repository storage on update
smashwilson Sep 18, 2018
7a4db7c
Correctly include a final blank line in a Region
smashwilson Sep 18, 2018
5d93069
Payload is not present in older Atom releases
smashwilson Sep 18, 2018
031be6e
Update another CommitController test to use the messageBuffer
smashwilson Sep 18, 2018
13d9995
Revert the speculative Node upgrade on AppVeyor
smashwilson Sep 18, 2018
593da38
ctrl- keybindings for non-macOS
smashwilson Sep 18, 2018
96c9cf9
Prepare 0.19.1-0 release
smashwilson Sep 18, 2018
88f23c4
Pass the correct row set as an argument to discardRows()
smashwilson Sep 18, 2018
aa15212
Increase the minimum Atom version
smashwilson Sep 18, 2018
05e2de8
Report stdin to the console when git diagnostics are enabled
smashwilson Sep 18, 2018
9c3143b
Correctly handle empty lines within a Region
smashwilson Sep 19, 2018
798d159
:fire: unnecessary comment
smashwilson Sep 19, 2018
6ac1d25
Turn Hunk::toStringIn() to a one-liner
smashwilson Sep 19, 2018
118f001
Regions append a line ending to the buffer's end
smashwilson Sep 19, 2018
83da6bd
Turn Patch::toStringIn() to a one-liner
smashwilson Sep 19, 2018
69978ea
Test patches containing blank lines
smashwilson Sep 19, 2018
8a2e43a
Handle FilePatchView updates that remove the last hunk
smashwilson Sep 19, 2018
be89483
Prepare 0.19.1-1 release
smashwilson Sep 19, 2018
4e1728f
Don't attempt to decorate destroyed Markers or Editors
smashwilson Sep 19, 2018
5779972
Style hunk header
simurai Sep 20, 2018
ea73f33
Tweak selection colors
simurai Sep 20, 2018
e1ddbce
:fire: Delete unused styles
simurai Sep 20, 2018
9ac9a81
Toggle selection mode with a hotkey again
smashwilson Sep 20, 2018
199f85d
Rename Decoration's "marker" props to "markable"
smashwilson Sep 20, 2018
2a2ce41
Rename markerSub to markableSub for consistency
smashwilson Sep 20, 2018
6f13580
Accept external MarkerLayers or DisplayMarkerLayers rather than ID
smashwilson Sep 20, 2018
66acfed
Pass the layer itself to the MarkerLayer component rather than its ID
smashwilson Sep 20, 2018
6e9ddd4
Make diff colors semi-transparent
simurai Sep 21, 2018
854bb8a
Center line-numbers
simurai Sep 21, 2018
1a4fd78
Make header look seamless
simurai Sep 21, 2018
0c578f9
Add a class to the root element in hunk selection mode
smashwilson Sep 20, 2018
5382a58
Select next and previous hunk with keyboard commands
smashwilson Sep 21, 2018
35ada9d
Decorate entire selected rows
smashwilson Sep 21, 2018
41a2cc8
More Decoration armor
smashwilson Sep 21, 2018
d0d5a6e
Clarify toggle button label subject
smashwilson Sep 21, 2018
1602a18
Prepare 0.19.1-2 release
smashwilson Sep 21, 2018
c4bcfe1
Merge branch 'master' of github.com:atom/github into aw/file-patch-ed…
smashwilson Sep 21, 2018
45b46f0
Turns out Selection::getBufferRowRange() omits the final row
smashwilson Sep 21, 2018
355b210
Merge branch 'master' of github.com:atom/github into aw/file-patch-ed…
smashwilson Sep 27, 2018
c9a0f4b
Rename <Decoration> prop from "markable" to "decorable"
smashwilson Sep 27, 2018
eec2dd2
Editor reference is unused on getSnapshotBeforeUpdate
smashwilson Sep 27, 2018
0517598
Let the garbage collector handle buffer release
smashwilson Sep 27, 2018
f582b2d
Use underscore-plus for keystroke humanize functions
smashwilson Sep 27, 2018
2c9cfe0
<Keystroke> element to render keystrokes
smashwilson Sep 27, 2018
0d25de0
Use a RefHolder for a Keystroke's target
smashwilson Sep 27, 2018
83aa206
... "Keystoke" ???
smashwilson Sep 27, 2018
1e575ed
Pass Keymaps through the FilePatch components
smashwilson Sep 27, 2018
1c41dda
Render the keystroke
smashwilson Sep 27, 2018
539769b
Pass keymaps in to the RootController
smashwilson Sep 27, 2018
ecce849
Pass the root element as a keystroke target
smashwilson Sep 27, 2018
3ec7cb6
Call the target ref a refTarget
smashwilson Sep 27, 2018
72ed0f4
Use the editor element to look up keybindings
smashwilson Sep 27, 2018
a1c9714
Some inexpert styling
smashwilson Sep 27, 2018
04294bb
Prepare 0.19.1-3 release
smashwilson Sep 27, 2018
9911ed8
Merge branch 'master' of github.com:atom/github into aw/file-patch-ed…
smashwilson Oct 1, 2018
518910d
Reintroduce the "discard-selected-lines" command handler
smashwilson Oct 3, 2018
8e3fd1b
Default to hunk selection mode
smashwilson Oct 3, 2018
ad51de4
"marker" prop was renamed to "decorable"
smashwilson Oct 3, 2018
4c344b5
Selection mode defaults to "hunk" now
smashwilson Oct 3, 2018
bfddaea
Declare "keymaps"
smashwilson Oct 3, 2018
70ab07f
The first hunk is selected on mount
smashwilson Oct 3, 2018
5a3d191
Isolate the failing test
smashwilson Oct 3, 2018
a9ba303
Does it only fail under stress?
smashwilson Oct 3, 2018
72360e1
Pass keymaps to GitHubPackages created for integration tests
smashwilson Oct 3, 2018
c9fabfe
???
smashwilson Oct 3, 2018
f681033
console.logs for the console.log throne
smashwilson Oct 3, 2018
14d2bed
Unify Mocha reporter configuration
smashwilson Oct 3, 2018
3b8fe7a
Oops, no "s" there
smashwilson Oct 3, 2018
9581681
Using .strictEquals() on Editors turns out poorly
smashwilson Oct 3, 2018
c2049c1
Don't rely on document.activeElement and atomEnv.workspace being in sync
smashwilson Oct 3, 2018
efc40eb
:fire: stderr output
smashwilson Oct 3, 2018
5dc113a
:shirt: :shirt: :shirt:
smashwilson Oct 3, 2018
2db0e8c
Prepare 0.19.1-4 release
smashwilson Oct 3, 2018
2ca3799
Prepare 0.19.1-5 release
smashwilson Oct 4, 2018
5055785
Drill them props
smashwilson Oct 4, 2018
3998878
Add a config setting to toggle the diff icon gutter
smashwilson Oct 4, 2018
2774dc8
Unit test for diff icon gutter behavior
smashwilson Oct 4, 2018
784b190
Render and decorate a gutter for diff icons
smashwilson Oct 4, 2018
4b03503
CSS fumblings to add + and - glyphs to the diff icon gutter
smashwilson Oct 4, 2018
a13fcb4
:dancer: Context menu shuffle :dancer:
smashwilson Oct 4, 2018
8eb1f82
Remove "View (Un)staged Changes" entries from FilePatchItem context menu
smashwilson Oct 4, 2018
e8a51eb
Remove tabIndex from root div to allow TextEditor to inherit focus
smashwilson Oct 4, 2018
107170d
Drill, drill, drill them props
smashwilson Oct 4, 2018
b91287f
Controller method for file surfacing
smashwilson Oct 4, 2018
a5076c5
Register surfacing command
smashwilson Oct 4, 2018
27ec6bb
Merge branch 'master' of github.com:atom/github into aw/file-patch-ed…
smashwilson Oct 4, 2018
156ca3c
Prepare 0.19.1-6 release
smashwilson Oct 4, 2018
59b4b45
Merge remote-tracking branch 'origin/master' into aw/file-patch-editor
smashwilson Oct 15, 2018
96d3969
Register missing commands
smashwilson Oct 16, 2018
c785d24
More command shuffling
smashwilson Oct 16, 2018
7a7f93b
withSelectionMode() is not used for unstaged/staged
smashwilson Oct 16, 2018
a389f6f
Pass hasUndoHistory from repo data
smashwilson Oct 16, 2018
6264611
Unify didDiscardSelection and discardSelectionFromCommand
smashwilson Oct 16, 2018
ec6c96b
Cover the new instrumentation callbacks
smashwilson Oct 16, 2018
5c784ae
Unused code
smashwilson Oct 16, 2018
c239435
Update test/models/patch/file-patch.test.js
kuychaco Oct 17, 2018
bd7fb59
Update test/models/patch/file-patch.test.js
kuychaco Oct 17, 2018
81c36cf
Update test/models/patch/file-patch.test.js
kuychaco Oct 17, 2018
8e7e39f
Remove autobind call for deleted method
smashwilson Oct 17, 2018
43de24a
Port #1667 on top of the rewrite
smashwilson Oct 17, 2018
d6dfc4b
Assert patch old and new files more strictly
smashwilson Oct 18, 2018
63045ba
Correct (maybe) unstage patch generation
smashwilson Oct 18, 2018
ac5e3cc
Skeleton for integration tests against patches
smashwilson Oct 18, 2018
74f7aa8
Wait for the correct FilePatchItem to open and load
smashwilson Oct 18, 2018
b81c5bc
Ensure the editor does not contain *more* rows than expected
smashwilson Oct 18, 2018
9e38dc1
Assert the staged side of that patch too
smashwilson Oct 18, 2018
3166bbb
No point in awaiting that
smashwilson Oct 18, 2018
a0f0694
Stage a file completely
smashwilson Oct 18, 2018
c7a62c1
getPatchEditor() and patchContent() are more specific
smashwilson Oct 18, 2018
01fa8bf
Test for discarding lines
smashwilson Oct 18, 2018
ce63d24
Unstaged file action tests
smashwilson Oct 18, 2018
95554b6
Stub other cases to cover
smashwilson Oct 18, 2018
7731d52
Merge remote-tracking branch 'origin/master' into aw/file-patch-editor
smashwilson Oct 23, 2018
04ffaee
:fire: dot only
smashwilson Oct 23, 2018
3f0a595
0.22.1-0
smashwilson Oct 23, 2018
8aabc93
Multi-line file repo had unstaged changes that were never used
smashwilson Oct 23, 2018
f109d08
Remove unused Mocha test argument to integration helper
smashwilson Oct 23, 2018
4d3ab87
Integration tests for operations on removed files
smashwilson Oct 23, 2018
91e75ab
Restore some missing tests in the FilePatch model
smashwilson Oct 23, 2018
d0b6dee
Some iteration on setting old|newFile and status in generated patches
smashwilson Oct 23, 2018
d23817c
dot only party
smashwilson Oct 23, 2018
709ed0a
Unify unstage patch generation
smashwilson Oct 24, 2018
8a8b2fd
Remove unused method getFirstChangeRange()
smashwilson Oct 24, 2018
b32066b
Simplify unstage patch generation
smashwilson Oct 24, 2018
dd7fa4f
Patch is in line selection mode after line discard
smashwilson Oct 24, 2018
7371346
Bump up timeouts for these tests
smashwilson Oct 24, 2018
865ca04
Timeout tweaks
smashwilson Oct 25, 2018
8c1a5b9
Separate getPatchItem() helper
smashwilson Oct 25, 2018
3fc012c
Tests about symlink changes
smashwilson Oct 25, 2018
f10c10c
Update assertion to match changed fixture
smashwilson Oct 25, 2018
58d6078
Modified patch integration tests, mostly for completeness
smashwilson Oct 25, 2018
7b9d855
Ensure project watcher has a chance to get started
smashwilson Oct 25, 2018
32804d4
Don't debounce the selectedItems call in mouseup
smashwilson Oct 25, 2018
0a719ca
Wait for the watchers in the GitHub package object to start instead
smashwilson Oct 25, 2018
eed04f3
Slightly clearer timeout error messages
smashwilson Oct 25, 2018
0837366
Clarify test name
smashwilson Oct 25, 2018
100dcb4
Merge remote-tracking branch 'origin/master' into aw/file-patch-editor
smashwilson Oct 25, 2018
708d388
Rename integration test suites
smashwilson Oct 25, 2018
8b1ad3e
Mark that checkout PR test as flaky
smashwilson Oct 25, 2018
131fafb
Invalidate remotes when the config changes
smashwilson Oct 25, 2018
f9e3e77
Skip symlink tests on Windows
smashwilson Oct 25, 2018
b345f87
Manually trigger filesystem changes for the WorkspaceChangeObserver
smashwilson Oct 25, 2018
a2f01c8
Ensure the patch editor is not unexpectedly soft-wrapped
smashwilson Oct 25, 2018
8f5842d
Clarify patchContent failure message
smashwilson Oct 25, 2018
b2ef7ba
console.error doesn't show up in headless tests, console.log does
smashwilson Oct 25, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
- UNTIL_TIMEOUT: "30000"
- CIRCLE_BUILD_IMAGE: osx
- ATOM_CHANNEL: stable
- TEST_JUNIT_XML_PATH: test-results/mocha/test-results.xml
beta:
<<: *defaults
environment:
Expand All @@ -51,6 +52,7 @@ jobs:
- UNTIL_TIMEOUT: "30000"
- CIRCLE_BUILD_IMAGE: osx
- ATOM_CHANNEL: beta
- TEST_JUNIT_XML_PATH: test-results/mocha/test-results.xml
dev:
<<: *defaults
environment:
Expand All @@ -64,6 +66,8 @@ jobs:
- UNTIL_TIMEOUT: "30000"
- CIRCLE_BUILD_IMAGE: osx
- ATOM_CHANNEL: dev
- TEST_JUNIT_XML_PATH: test-results/mocha/test-results.xml

snapshot:
<<: *defaults
environment:
Expand Down
Loading