Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version control #15

Merged
merged 30 commits into from
May 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
6ec7699
refactor knox.js for clarity
dany-fu Feb 19, 2019
095df03
updated UI so that version history is side by side with design space
dany-fu Feb 19, 2019
3e346ed
add dropdown for checking out an existing branch
dany-fu Feb 19, 2019
70ff017
added UI files for editing version history
dany-fu Feb 19, 2019
cf57b2a
move version history client side functions to own file
dany-fu Feb 20, 2019
d61d3f2
changed commit button
dany-fu Feb 21, 2019
cb88a3c
made search image local
dany-fu Feb 22, 2019
afe40ef
added missing code in DesignSpace functions
dany-fu Feb 22, 2019
2800380
slight refactoring
dany-fu Feb 23, 2019
5dd043d
version history panel now toggles, modeled after google maps
dany-fu Feb 24, 2019
239820e
updated npm packages
dany-fu Feb 24, 2019
0592bda
updated gitignore
dany-fu Feb 24, 2019
e64c72b
make version history toggling better
dany-fu Feb 25, 2019
d74aed5
updated tooltipster
dany-fu Mar 1, 2019
eff4de5
updated sweetalert
dany-fu Mar 3, 2019
3b0d2b7
added interactive tooltips to design space buttons
dany-fu Mar 5, 2019
18f3707
refactoring - consolidate and modularize functions that call Knox API
dany-fu Mar 5, 2019
f263171
redo operator popup and remove deprecated layout modals
dany-fu Mar 5, 2019
3116d79
redo enumerate popup and remove deprecated layout modals
dany-fu Mar 6, 2019
d7e799f
auto open history sidebar when a new design is selected
dany-fu Mar 6, 2019
3ba7d97
limit length of dropdown string
dany-fu Mar 6, 2019
afa6c6b
endpoint bug fixes
dany-fu Mar 6, 2019
fbd38c9
fixed design enumeration SVG bugs
dany-fu Mar 11, 2019
858d31d
truncate name and display tooltip in design enumeration
dany-fu Mar 15, 2019
d74dbdb
fix merge conflicts
dany-fu Mar 29, 2019
29ef2f7
remove visualization of enumeration
dany-fu Apr 10, 2019
85b1ada
Merge branch 'master' into version_control
dany-fu Apr 10, 2019
4d7ad61
reduce size of svg image during rendering
dany-fu Apr 10, 2019
25e4029
trim display ids on UI and enumeration
dany-fu Apr 12, 2019
91ae63c
Merge branch 'master' into version_control
dany-fu May 21, 2019
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ target
*.settings
*.classpath
.DS_Store
**/node_modules
**package-lock.json
5 changes: 5 additions & 0 deletions src/main/java/knox/spring/data/neo4j/domain/Branch.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ public Commit getLatestCommit() {
public String getBranchID() {
return branchID;
}

public void setBranchID(String branchID) {

this.branchID = branchID;
}

public boolean hasLatestCommit() {
return latestCommit != null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -616,8 +616,11 @@ public void deleteBranch(String targetSpaceID, String targetBranchID) {

public void copyHeadBranch(String targetSpaceID, String outputBranchID) {
DesignSpace targetSpace = loadDesignSpace(targetSpaceID);

targetSpace.addBranch(targetSpace.getHeadBranch().copy());

Branch outputBranch = targetSpace.getHeadBranch().copy();
outputBranch.setBranchID(outputBranchID);

targetSpace.addBranch(outputBranch);

saveDesignSpace(targetSpace);
}
Expand All @@ -626,7 +629,9 @@ public void checkoutBranch(String targetSpaceID, String targetBranchID) {
DesignSpace targetSpace = loadDesignSpace(targetSpaceID);

targetSpace.clearNodes();


targetSpace.setHeadBranch(targetSpace.getBranch(targetBranchID));

targetSpace.copyNodeSpace(targetSpace.getHeadSnapshot());

saveDesignSpace(targetSpace);
Expand All @@ -646,12 +651,12 @@ public void commitToHeadBranch(String targetSpaceID) {
commitToBranch(targetSpace, targetSpace.getHeadBranch());
}

public void commitToBranch(DesignSpace targetSpace, Branch targetBranch) {
private void commitToBranch(DesignSpace targetSpace, Branch targetBranch) {
Commit commit = targetSpace.createCommit(targetBranch);
targetBranch.setLatestCommit(commit);
commit.getSnapshot().copyNodeSpace(targetSpace);

commit.createSnapshot().copyNodeSpace(targetSpace);

targetBranch.setLatestCommit(commit);

saveDesignSpace(targetSpace);
}
Expand Down
191 changes: 124 additions & 67 deletions src/main/resources/static/css/knox.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ a {
a:hover,
a:focus {
color: #eb3812;
cursor: pointer
}

h1,
Expand Down Expand Up @@ -547,7 +548,7 @@ section {
}

#search-tb {
background-image: url("http://i47.tinypic.com/r02vbq.png");
background-image: url('../img/search.jpg');
background-repeat: no-repeat;
background-position: left center;
display: inline-block;
Expand Down Expand Up @@ -599,70 +600,6 @@ textarea:focus, input:focus{
background: #EEEEEE;
}

.btn-holder {
text-align: center;
position: absolute;
width: 100%;
bottom: 0;
padding-bottom: 40px;
}

.circle-float-btn {
background-color: white;
width: 70px;
height: 70px;
padding: 10px 16px;
font-size: 18px;
line-height: 1.33;
border-radius: 35px;
display: inline-block;
border: 1px solid #EEEEEE;
box-shadow: 0px 2px 5px #EEEEEE;
-webkit-transition: box-shadow ease-in-out .35s;
-moz-transition: box-shadow ease-in-out .35s;
transition: box-shadow ease-in-out .35s;
margin: 10px;
overflow: hidden;
}

.btn-img {
margin-left: -5px;
margin-top: -1px;
}

#combine-btn img {
opacity: 0.5;
-webkit-transition: box-shadow .35s, opacity ease-in-out .35s;
-moz-transition: box-shadow .35s, opacity ease-in-out .35s;
transition: box-shadow .35s, opacity ease-in-out .35s;
}

#combine-btn:hover img.btn-img {
opacity: 1;
}

#delete-btn img {
opacity: 0.5;
-webkit-transition: box-shadow .35s, opacity ease-in-out .35s;
-moz-transition: box-shadow .35s, opacity ease-in-out .35s;
transition: box-shadow .35s, opacity ease-in-out .35s;
}

#delete-btn:hover img.btn-img {
opacity: 1;
}

#list-btn img {
opacity: 0.5;
-webkit-transition: box-shadow .35s, opacity ease-in-out .35s;
-moz-transition: box-shadow .35s, opacity ease-in-out .35s;
transition: box-shadow .35s, opacity ease-in-out .35s;
}

#list-btn:hover img.btn-img {
opacity: 1;
}

.circle-float-btn:hover {
box-shadow: 0px 4px 5px #CCCCCC;
}
Expand Down Expand Up @@ -702,6 +639,126 @@ textarea:focus, input:focus{
padding: 10px;
}

#swal-svg-box {
overflow: scroll;
/**********************
VERSION HISTORY SIDEBAR
***********************/
#branch-selector{
display: block;
position: absolute;
top: 95px;
left: 120px;
text-align:center;
z-index: 2;
height: 40px;
background-color: white;
border: 1px solid #ccc
}

#vh-sidebar {
display:none;
background: #e5e5e5;
position: absolute;
height: 100%;

/*the left value is what hides the width */
/*if these are changed, must change in knox.js as well*/
left: -380px;
width: 400px;
}

#vh-toggle-button {
position: absolute;
left: 20px; /*this is the offset of the vh-sidebar*/
top: 95px;
display: none; /*hide the button until a design is selected*/
width: 30px;
height: 40px;
background-color: transparent;
outline:none;
border: 2px solid #e5e5e5;
cursor:pointer;
z-index: 2;
}

/*********
TOOLTIP
**********/
.tooltip-templates {
display: none;
}

/************
SWEET ALERT
*************/
.swal-button--confirm {
background-color: #F05F40;
}

.swal-button--confirm:not([disabled]):hover{
background-color: #d35234
}

.swal-button--confirm:active {
background-color: #b85435;
}

.swal-content__input {
border-color: #bbbbbb;
}

.swal-content__input:focus,.swal-content__textarea:focus{
border-color:#999
}

.enumeration-swal .swal-content{
height: 400px
}

/*************
DESIGN SPACE
**************/
#design-space {
height: 100%;
}

#btn-holder {
text-align: center;
position: absolute;
width: 100%;
bottom: 0;
padding-bottom: 40px;
}

.circle-float-btn {
background-color: white;
width: 70px;
height: 70px;
padding: 10px 16px;
font-size: 18px;
line-height: 1.33;
border-radius: 35px;
display: inline-block;
border: 1px solid #EEEEEE;
box-shadow: 0px 2px 5px #EEEEEE;
-webkit-transition: box-shadow ease-in-out .35s;
-moz-transition: box-shadow ease-in-out .35s;
transition: box-shadow ease-in-out .35s;
margin: 10px;
overflow: hidden;
}

.btn-img {
margin-left: -5px;
margin-top: -1px;
}

.circle-float-btn img {
opacity: 0.5;
-webkit-transition: box-shadow .35s, opacity ease-in-out .35s;
-moz-transition: box-shadow .35s, opacity ease-in-out .35s;
transition: box-shadow .35s, opacity ease-in-out .35s;
}

.circle-float-btn:hover img.btn-img {
opacity: 1;
}
8 changes: 8 additions & 0 deletions src/main/resources/static/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@ gulp.task('copy', function() {
gulp.src(['node_modules/scrollreveal/dist/*.js'])
.pipe(gulp.dest('vendor/scrollreveal'))

gulp.src(['node_modules/tooltipster/dist/css/plugins/tooltipster/sideTip/themes/*.css',
'node_modules/tooltipster/dist/css/*.css',
'node_modules/tooltipster/dist/js/*.js'])
.pipe(gulp.dest('vendor/tooltipster'))

gulp.src(['node_modules/sweetalert/dist/*'])
.pipe(gulp.dest('vendor/sweet'))

gulp.src([
'node_modules/font-awesome/**',
'!node_modules/font-awesome/**/*.map',
Expand Down
Binary file added src/main/resources/static/img/save.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/static/img/search.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading