-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
116 additions
and
23 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import * as vscode from 'vscode'; | ||
import { VirtualFileSystem } from '../core/remoteFileSystemProvider'; | ||
import { SocketIOAPI } from '../api/socketio'; | ||
import { DocumentRangesSchema } from '../api/extendedBase'; | ||
|
||
const reviewOpenCommentDecorationOption: vscode.DecorationRenderOptions = { | ||
// backgroundColor: 'rgba(243, 177, 17, 0.3)', | ||
backgroundColor: new vscode.ThemeColor('editor.hoverHighlightBackground'), | ||
gutterIconPath: 'resources/gutter-comment-unresolved.svg', | ||
}; | ||
|
||
const reviewResolvedCommentDecorationOption: vscode.DecorationRenderOptions = { | ||
gutterIconPath: 'resources/gutter-pass.svg', | ||
}; | ||
|
||
const reviewInsertChangeDecorationOption: vscode.DecorationRenderOptions = { | ||
// color: 'rgba(44, 142, 48, 0.3)', | ||
backgroundColor: new vscode.ThemeColor('diffEditor.insertedTextBackground'), | ||
gutterIconPath: 'resources/gutter-edit.svg', | ||
}; | ||
|
||
const reviewDeleteChangeDecorationOption: vscode.DecorationRenderOptions = { | ||
// color: 'rgba(197, 6, 11, 1.0)', | ||
fontStyle: 'text-decoration: line-through;', | ||
backgroundColor: new vscode.ThemeColor('diffEditor.removedTextBackground'), | ||
gutterIconPath: 'resources/gutter-edit.svg', | ||
}; | ||
|
||
function fixGutterIconAbsolutePaths(context: vscode.ExtensionContext) { | ||
for (const option of [ | ||
reviewOpenCommentDecorationOption, | ||
reviewResolvedCommentDecorationOption, | ||
reviewInsertChangeDecorationOption, | ||
reviewDeleteChangeDecorationOption | ||
]) { | ||
if (option.gutterIconPath) { | ||
option.gutterIconPath = context.asAbsolutePath(option.gutterIconPath as string); | ||
} | ||
} | ||
} | ||
|
||
export class ReviewPanelProvider { | ||
private reviewRecords?: {[docId:string]: DocumentRangesSchema}; | ||
|
||
constructor( | ||
private readonly vfs: VirtualFileSystem, | ||
private readonly context: vscode.ExtensionContext, | ||
private readonly socket: SocketIOAPI, | ||
) { | ||
// init review records | ||
} | ||
|
||
private updateReviewDecorations() { | ||
|
||
} | ||
|
||
get triggers() { | ||
return [ | ||
|
||
]; | ||
} | ||
} |
This file contains 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