mirror of
https://github.com/silvanocerza/github-gitless-sync.git
synced 2026-07-22 05:41:36 +00:00
Fix conflict view not being scrollable
This commit is contained in:
parent
59f951f2b8
commit
b6eb9ed62d
6 changed files with 45 additions and 22 deletions
|
|
@ -175,7 +175,6 @@ const ActionsGutter: React.FC<ActionsGutterProps> = ({
|
||||||
style={{
|
style={{
|
||||||
width: "100%",
|
width: "100%",
|
||||||
height: "100%",
|
height: "100%",
|
||||||
overflow: "hidden",
|
|
||||||
position: "relative",
|
position: "relative",
|
||||||
backgroundColor: "var(--background-secondary)",
|
backgroundColor: "var(--background-secondary)",
|
||||||
}}
|
}}
|
||||||
|
|
|
||||||
|
|
@ -36,13 +36,11 @@ const DiffView: React.FC<DiffViewProps> = ({
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
width: "100%",
|
|
||||||
height: "100%",
|
height: "100%",
|
||||||
display: "flex",
|
display: "flex",
|
||||||
overflow: "hidden",
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div style={{ flex: 1, overflow: "hidden" }}>
|
<div style={{ flex: 1 }}>
|
||||||
<EditorPane
|
<EditorPane
|
||||||
content={remoteText}
|
content={remoteText}
|
||||||
highlightPluginSpec={{
|
highlightPluginSpec={{
|
||||||
|
|
@ -142,7 +140,7 @@ const DiffView: React.FC<DiffViewProps> = ({
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div style={{ flex: 1, overflow: "hidden" }}>
|
<div style={{ flex: 1 }}>
|
||||||
<EditorPane
|
<EditorPane
|
||||||
content={localText}
|
content={localText}
|
||||||
highlightPluginSpec={{
|
highlightPluginSpec={{
|
||||||
|
|
|
||||||
|
|
@ -46,9 +46,9 @@ const SplitView = ({
|
||||||
<React.StrictMode>
|
<React.StrictMode>
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
height: "100%",
|
|
||||||
display: "flex",
|
display: "flex",
|
||||||
flexDirection: "column",
|
flexDirection: "column",
|
||||||
|
height: "100%",
|
||||||
justifyContent: "center",
|
justifyContent: "center",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|
@ -88,21 +88,28 @@ const SplitView = ({
|
||||||
currentFile={currentFile?.filePath || ""}
|
currentFile={currentFile?.filePath || ""}
|
||||||
setCurrentFileIndex={setCurrentFileIndex}
|
setCurrentFileIndex={setCurrentFileIndex}
|
||||||
/>
|
/>
|
||||||
<DiffView
|
<div
|
||||||
remoteText={currentFile?.remoteContent || ""}
|
style={{
|
||||||
localText={currentFile?.localContent || ""}
|
overflow: "auto",
|
||||||
onRemoteTextChange={(content: string) => {
|
flex: 1,
|
||||||
const tempFiles = [...files];
|
|
||||||
tempFiles[currentFileIndex].remoteContent = content;
|
|
||||||
setFiles(tempFiles);
|
|
||||||
}}
|
}}
|
||||||
onLocalTextChange={(content: string) => {
|
>
|
||||||
const tempFiles = [...files];
|
<DiffView
|
||||||
tempFiles[currentFileIndex].localContent = content;
|
remoteText={currentFile?.remoteContent || ""}
|
||||||
setFiles(tempFiles);
|
localText={currentFile?.localContent || ""}
|
||||||
}}
|
onRemoteTextChange={(content: string) => {
|
||||||
onConflictResolved={onConflictResolved}
|
const tempFiles = [...files];
|
||||||
/>
|
tempFiles[currentFileIndex].remoteContent = content;
|
||||||
|
setFiles(tempFiles);
|
||||||
|
}}
|
||||||
|
onLocalTextChange={(content: string) => {
|
||||||
|
const tempFiles = [...files];
|
||||||
|
tempFiles[currentFileIndex].localContent = content;
|
||||||
|
setFiles(tempFiles);
|
||||||
|
}}
|
||||||
|
onConflictResolved={onConflictResolved}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -183,7 +183,15 @@ const DiffView: React.FC<DiffViewProps> = ({
|
||||||
}, [initialRemoteText, initialLocalText]);
|
}, [initialRemoteText, initialLocalText]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={{ width: "100%", height: "100%", overflow: "hidden" }}>
|
<div
|
||||||
|
style={{
|
||||||
|
width: "100%",
|
||||||
|
height: "100%",
|
||||||
|
display: "flex",
|
||||||
|
flexDirection: "column",
|
||||||
|
overflow: "hidden",
|
||||||
|
}}
|
||||||
|
>
|
||||||
<CodeMirror
|
<CodeMirror
|
||||||
value={doc}
|
value={doc}
|
||||||
height="100%"
|
height="100%"
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,8 @@ const UnifiedView = ({
|
||||||
paddingTop: "var(--size-4-4)",
|
paddingTop: "var(--size-4-4)",
|
||||||
paddingBottom: "var(--size-4-4)",
|
paddingBottom: "var(--size-4-4)",
|
||||||
borderBottom: "1px solid var(--background-modifier-border)",
|
borderBottom: "1px solid var(--background-modifier-border)",
|
||||||
|
display: "flex",
|
||||||
|
flexDirection: "column",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
|
@ -67,7 +69,14 @@ const UnifiedView = ({
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<React.StrictMode>
|
<React.StrictMode>
|
||||||
<div>
|
<div
|
||||||
|
style={{
|
||||||
|
height: "100%",
|
||||||
|
display: "flex",
|
||||||
|
flexDirection: "column",
|
||||||
|
overflow: "auto",
|
||||||
|
}}
|
||||||
|
>
|
||||||
{files.length === 0 ? (
|
{files.length === 0 ? (
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
|
|
|
||||||
|
|
@ -4,4 +4,6 @@
|
||||||
|
|
||||||
.padless-conflicts-view-container {
|
.padless-conflicts-view-container {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue