-
Notifications
You must be signed in to change notification settings - Fork 3
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
story/VSPC-242 #345
base: develop
Are you sure you want to change the base?
story/VSPC-242 #345
Conversation
I reopened the PR and thought that the query was working. It's actually breaking the code in the current state that I've pushed. Can you help me with the JPA named queries? The error seems to be "No property findbySlide found for type ExternalLinkSlide" |
Nevermind! I forgot to capitalize the "B", whoops |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- there are a bunch of files showing up as changed that actually have not been changed (just unnecessary new line changes, imports, etc)
- there are still link display classes that are not needed and some unnecessary inheritance
@@ -0,0 +1,12 @@ | |||
package edu.asu.diging.vspace.core.model; | |||
|
|||
public interface ILinkSlide<T extends IVSpaceElement> extends IVSpaceElement { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we'll introduce anymore links at this point, so this seems overly complicated. Just and external link class for slides is enough
|
||
IVSImage getImage(); | ||
|
||
void setImage(IVSImage image); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what are these images for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i believe that these are for the ImageBlocks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but why would that be needed here?
|
||
import edu.asu.diging.vspace.core.model.IExternalLinkSlide; | ||
|
||
public interface ISlideExternalLinkDisplay extends ILinkDisplay { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not needed
import edu.asu.diging.vspace.core.model.impl.ExternalLinkSlide; | ||
|
||
@Entity | ||
public class SlideExternalLinkDisplay extends LinkDisplay implements ISlideExternalLinkDisplay { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not needed
} | ||
|
||
@Override | ||
public ExternalLinkValue getTarget() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not needed. external links have a string field with the url they opint to. that's it.
@@ -486,6 +491,7 @@ | |||
linkDisplay.css('transform', 'rotate('+link.rotation+'deg)'); | |||
linkDisplay.css('fill', 'grey'); | |||
linkDisplay.css('color', 'rgba(128,128,128,1)'); | |||
console.log('LINK DISPLAY: ', linkDisplay); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
@@ -463,7 +467,8 @@ | |||
}) | |||
externalLinks.forEach(function(link,index){ | |||
if(link!=null){ | |||
var posX = parseInt($("#space").css('margin-left')) + $("#space").position().left; | |||
var posX = parseInt($("#space").css('margin-left')) + $("#space").position().left; | |||
console.log('posX: ', parseInt($("#space").css('margin-left')), $("#space").position()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it doesn't seem necessary for this file to change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still this
|
||
.imgDiv { | ||
display: inline-block; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are all of these css changes needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
$(imageblock[0]).mouseenter(onMouseEnter).mouseleave(onMouseLeave).dblclick(onDoubleClick); | ||
} | ||
// Reset data-attribute to get current selected image ID | ||
$("#uploadImage").data('value', ''); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there shouldn't be any image changes needed for this ticket
slide.html errors, and deleted unnecessary classes
vspace/src/main/java/edu/asu/diging/vspace/core/model/impl/ExternalLinkSlide.java
Show resolved
Hide resolved
|
||
@OneToOne(targetEntity = VSImage.class) | ||
@NotFound(action = NotFoundAction.IGNORE) | ||
private IVSImage image; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should not be needed. slides don't have images
@@ -2,6 +2,7 @@ | |||
|
|||
import edu.asu.diging.vspace.core.exception.ImageCouldNotBeStoredException; | |||
import edu.asu.diging.vspace.core.exception.LinkDoesNotExistsException; | |||
import edu.asu.diging.vspace.core.exception.SlideDoesNotExistException; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this needed in this class?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
@@ -33,4 +33,7 @@ public interface ISlideManager { | |||
List<Sequence> getSlideSequences(String slideId, String moduleId); | |||
|
|||
Page<ISlide> findByNameOrDescription(Pageable requestedPage,String searchText); | |||
|
|||
void storeSlideDisplay(ISlide slide, IVSImage image); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is this for? should not be needed for this ticket.
@Override | ||
protected IExternalLinkDisplay createDisplayLink(IExternalLink link) { | ||
return null; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is this all about? this file should not need to be changed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
$('#addChoice').show(); | ||
$('#choiceSpace').show(); | ||
[/] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is all this added for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix this file so it's clear what has been changed. Right now i can't tell.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this still
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this file being changed?
import edu.asu.diging.vspace.core.model.display.ISlideExternalLinkDisplay; | ||
|
||
@RunWith(MockitoJUnitRunner.class) | ||
public class SlideExternalLinkDisplayFactoryTest { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There shouldn't be a ExternalLinkDisplayFactory anymore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
slideImage.setWidth(1300); | ||
slide.setImage(slideImage); | ||
|
||
ISlideDisplay displayAttributes = new SlideDisplay(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there should be no such class
|
||
public List<IExternalLinkSlide> findBySlide_Id(String slideId); | ||
|
||
public void deleteByExternalLink(IExternalLinkSlide link); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just deleteByExternalLink
. I don't think we need this method.
@@ -2,6 +2,7 @@ | |||
|
|||
import edu.asu.diging.vspace.core.exception.ImageCouldNotBeStoredException; | |||
import edu.asu.diging.vspace.core.exception.LinkDoesNotExistsException; | |||
import edu.asu.diging.vspace.core.exception.SlideDoesNotExistException; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
@Override | ||
protected IExternalLinkDisplay createDisplayLink(IExternalLink link) { | ||
return null; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
} | ||
|
||
@Override | ||
public void removeFromLinkList(ISlide slide, IExternalLinkSlide link) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this really need a method? when you want to remove a link, you can just do it directly without calling this extra method.
} | ||
|
||
@Override | ||
public void addToLinkList(ISlide slide, IExternalLinkSlide link) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this really need a method? when you want to add a link, you can just do it directly without calling this extra method.
@@ -135,6 +136,7 @@ public String slide(Model model, @PathVariable("slideId") String slideId, @PathV | |||
model.addAttribute("currentNumOfSlide", slideIndex + 1); | |||
model.addAttribute("spaceId", spaceId); | |||
model.addAttribute("spaceName", spaceManager.getSpace(spaceId).getName()); | |||
model.addAttribute("slideExternalLinkList", slideExternalLinkManager.getLinks(slideId)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
@@ -16,6 +16,7 @@ | |||
import com.fasterxml.jackson.databind.node.ObjectNode; | |||
|
|||
import edu.asu.diging.vspace.core.exception.ImageCouldNotBeStoredException; | |||
import edu.asu.diging.vspace.core.exception.SlideDoesNotExistException; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
@@ -41,4 +45,10 @@ public ResponseEntity<String> deleteExternalLink(@PathVariable("id") String spac | |||
externalLinkManager.deleteLink(linkId); | |||
return new ResponseEntity<String>(HttpStatus.OK); | |||
} | |||
|
|||
@RequestMapping(value = "/staff/module/{id}/slide/{slideId}/externallink/{linkId}", method = RequestMethod.DELETE) | |||
public ResponseEntity<String> deleteSlideExternalLink(@PathVariable("id") String moduleId, @PathVariable("slideId") String slideId, @PathVariable("linkId") String linkId) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
|
||
} | ||
|
||
public ResponseEntity<String> checkIfSlideExists(ISlideManager slideManager, String id) throws IOException{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this extra method seems unnecessary
import edu.asu.diging.vspace.core.model.display.ISlideExternalLinkDisplay; | ||
|
||
@RunWith(MockitoJUnitRunner.class) | ||
public class SlideExternalLinkDisplayFactoryTest { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
DeleteLinkController (see comment)
…aces-2.0 into story/VSPC-242 "divergent local and repo branches"
i had do to multiple merges to fix conflicts and diverging |
@@ -13,7 +13,7 @@ | |||
import edu.asu.diging.vspace.core.services.ISpaceLinkManager; | |||
|
|||
@Controller | |||
public class DeleteLinkController { | |||
public class DeleteSpaceLinkController { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's not correct, is it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean? I renamed it DeleteSpaceLinkController
because it was housing methods for deleting module slide links and space links and you didn't want to mix them. So now there's DeleteSpaceLinkController
and DeleteSlideLinkController
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you want me to just keep the name as DeleteLinkController
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, this class does not just delete spacelinks, so the name is misleading.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh okay, got it. I named it that because they all originate from '/staff/space'. But I see what you mean
@@ -78,6 +79,7 @@ public ResponseEntity<Map<String,Object>> showSpaceLinks(@PathVariable String id | |||
Map<String,Object> responseData = new HashMap<String,Object>(); | |||
responseData.put("spaceLinks", spaceLinkManager.getLinkDisplays(id)); | |||
responseData.put("externalLinks", externalLinkManager.getLinkDisplays(id)); | |||
System.out.println("EXTERNAL LINKS 2: " + externalLinkManager.getLinkDisplays(id)); | |||
responseData.put("moduleLinks", moduleLinkManager.getLinkDisplays(id)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove sysouts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this still
controllers, cleaned up some unused code in slide.html, and removed comments/print statements
…aces-2.0 into story/VSPC-242 Merging due to mismatch with remote branch
Guidelines for Pull Requests
If you haven't yet read our code review guidelines, please do so, You can find them here.
Please confirm the following by adding an x for each item (turn
[ ]
into[x]
).Please provide a brief description of your ticket
(you can copy the ticket if it hasn't changed)
Users should be able to include external links on their slides, which will be visible on the public page.
Anything else the reviewer needs to know?
This is my first Java PR!