File tree Expand file tree Collapse file tree 6 files changed +45
-22
lines changed
src/views/conflicts-resolution Expand file tree Collapse file tree 6 files changed +45
-22
lines changed Original file line number Diff line number Diff line change @@ -175,7 +175,6 @@ const ActionsGutter: React.FC<ActionsGutterProps> = ({
175175 style = { {
176176 width : "100%" ,
177177 height : "100%" ,
178- overflow : "hidden" ,
179178 position : "relative" ,
180179 backgroundColor : "var(--background-secondary)" ,
181180 } }
Original file line number Diff line number Diff line change @@ -36,13 +36,11 @@ const DiffView: React.FC<DiffViewProps> = ({
3636 return (
3737 < div
3838 style = { {
39- width : "100%" ,
4039 height : "100%" ,
4140 display : "flex" ,
42- overflow : "hidden" ,
4341 } }
4442 >
45- < div style = { { flex : 1 , overflow : "hidden" } } >
43+ < div style = { { flex : 1 } } >
4644 < EditorPane
4745 content = { remoteText }
4846 highlightPluginSpec = { {
@@ -142,7 +140,7 @@ const DiffView: React.FC<DiffViewProps> = ({
142140 } }
143141 />
144142 </ div >
145- < div style = { { flex : 1 , overflow : "hidden" } } >
143+ < div style = { { flex : 1 } } >
146144 < EditorPane
147145 content = { localText }
148146 highlightPluginSpec = { {
Original file line number Diff line number Diff line change @@ -46,9 +46,9 @@ const SplitView = ({
4646 < React . StrictMode >
4747 < div
4848 style = { {
49- height : "100%" ,
5049 display : "flex" ,
5150 flexDirection : "column" ,
51+ height : "100%" ,
5252 justifyContent : "center" ,
5353 } }
5454 >
@@ -88,21 +88,28 @@ const SplitView = ({
8888 currentFile = { currentFile ?. filePath || "" }
8989 setCurrentFileIndex = { setCurrentFileIndex }
9090 />
91- < DiffView
92- remoteText = { currentFile ?. remoteContent || "" }
93- localText = { currentFile ?. localContent || "" }
94- onRemoteTextChange = { ( content : string ) => {
95- const tempFiles = [ ...files ] ;
96- tempFiles [ currentFileIndex ] . remoteContent = content ;
97- setFiles ( tempFiles ) ;
98- } }
99- onLocalTextChange = { ( content : string ) => {
100- const tempFiles = [ ...files ] ;
101- tempFiles [ currentFileIndex ] . localContent = content ;
102- setFiles ( tempFiles ) ;
91+ < div
92+ style = { {
93+ overflow : "auto" ,
94+ flex : 1 ,
10395 } }
104- onConflictResolved = { onConflictResolved }
105- />
96+ >
97+ < DiffView
98+ remoteText = { currentFile ?. remoteContent || "" }
99+ localText = { currentFile ?. localContent || "" }
100+ onRemoteTextChange = { ( content : string ) => {
101+ const tempFiles = [ ...files ] ;
102+ tempFiles [ currentFileIndex ] . remoteContent = content ;
103+ setFiles ( tempFiles ) ;
104+ } }
105+ onLocalTextChange = { ( content : string ) => {
106+ const tempFiles = [ ...files ] ;
107+ tempFiles [ currentFileIndex ] . localContent = content ;
108+ setFiles ( tempFiles ) ;
109+ } }
110+ onConflictResolved = { onConflictResolved }
111+ />
112+ </ div >
106113 </ >
107114 ) }
108115 </ div >
Original file line number Diff line number Diff line change @@ -183,7 +183,15 @@ const DiffView: React.FC<DiffViewProps> = ({
183183 } , [ initialRemoteText , initialLocalText ] ) ;
184184
185185 return (
186- < div style = { { width : "100%" , height : "100%" , overflow : "hidden" } } >
186+ < div
187+ style = { {
188+ width : "100%" ,
189+ height : "100%" ,
190+ display : "flex" ,
191+ flexDirection : "column" ,
192+ overflow : "hidden" ,
193+ } }
194+ >
187195 < CodeMirror
188196 value = { doc }
189197 height = "100%"
Original file line number Diff line number Diff line change @@ -42,6 +42,8 @@ const UnifiedView = ({
4242 paddingTop : "var(--size-4-4)" ,
4343 paddingBottom : "var(--size-4-4)" ,
4444 borderBottom : "1px solid var(--background-modifier-border)" ,
45+ display : "flex" ,
46+ flexDirection : "column" ,
4547 } }
4648 >
4749 < div
@@ -67,7 +69,14 @@ const UnifiedView = ({
6769
6870 return (
6971 < React . StrictMode >
70- < div >
72+ < div
73+ style = { {
74+ height : "100%" ,
75+ display : "flex" ,
76+ flexDirection : "column" ,
77+ overflow : "auto" ,
78+ } }
79+ >
7180 { files . length === 0 ? (
7281 < div
7382 style = { {
Original file line number Diff line number Diff line change 44
55.padless-conflicts-view-container {
66 padding : 0 ;
7+ height : 100% ;
8+ width : 100% ;
79}
You can’t perform that action at this time.
0 commit comments