-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#38 prepare file conflict details functionality
- Loading branch information
Showing
13 changed files
with
155 additions
and
36 deletions.
There are no files selected for viewing
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
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
13 changes: 0 additions & 13 deletions
13
...visualizations/team-awareness/components/ConflictDetailsModal/FileDetailes/FileDetails.js
This file was deleted.
Oops, something went wrong.
Empty file.
35 changes: 35 additions & 0 deletions
35
.../visualizations/team-awareness/components/ConflictDetailsModal/FileDetails/FileDetails.js
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,35 @@ | ||
import React from 'react'; | ||
import * as styles from './FileDetails.scss'; | ||
import { LOADING_ICON } from '../Icons'; | ||
|
||
export default class FileDetails extends React.Component { | ||
constructor(props) { | ||
super(props); | ||
this.styles = Object.assign({}, styles); | ||
} | ||
|
||
render() { | ||
const { isFileDetailsProcessing, fileDetails: { selectedConflict } } = this.props; | ||
const { conflictStakeholder, otherStakeholder } = selectedConflict; | ||
|
||
console.log(this.props); | ||
|
||
if (isFileDetailsProcessing) { | ||
return ( | ||
<div className={this.styles.loadingWrapper}> | ||
<div className={this.styles.loadingIcon}> | ||
{LOADING_ICON} | ||
</div> | ||
<div>Loading file conflict details</div> | ||
</div> | ||
); | ||
} | ||
return ( | ||
<div> | ||
<div> | ||
Conflict between branches <a>{conflictStakeholder.branch}</a> and <a>{otherStakeholder.branch}</a> | ||
</div> | ||
</div> | ||
); | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
...isualizations/team-awareness/components/ConflictDetailsModal/FileDetails/FileDetails.scss
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,8 @@ | ||
.loadingIcon { | ||
height: 15px; | ||
width: 15px; | ||
} | ||
.loadingWrapper { | ||
display: flex; | ||
flex-direction: row; | ||
} |
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
22 changes: 22 additions & 0 deletions
22
ui/src/visualizations/team-awareness/sagas/conflictDetailsOperation.js
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,22 @@ | ||
import { receiveTeamAwarenessFileConflictDetails } from './index'; | ||
import { put, select } from 'redux-saga/effects'; | ||
import { getState } from '../util/util'; | ||
|
||
function* processFileConflictDetails() { | ||
const appState = yield select(); | ||
yield put(receiveTeamAwarenessFileConflictDetails(yield analyseFileConflictDetails(appState))); | ||
} | ||
|
||
const analyseFileConflictDetails = async appState => { | ||
const { data: { data: { fileDetails } } } = getState(appState); | ||
|
||
// TODO: Process file details conflict | ||
// Fetch two files from github | ||
// Load them via AST library | ||
// Compare them | ||
// Give feedback according to the AST data | ||
|
||
return { fileDetails }; | ||
}; | ||
|
||
export { processFileConflictDetails }; |
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