Skip to content

Conversation

jophals
Copy link
Contributor

@jophals jophals commented Apr 16, 2025

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]).

  • I have removed all code style changes that are not necessary (e.g. changing blanks across the whole file that don’t need to be changed, adding empty lines in parts other than your own code)
  • I am not making any changes to files that don’t have any effect (e.g. imports added that don’t need to be added)
  • I do not have any sysout statements in my code or commented out code that isn’t needed anymore
  • I am not reformatting any files in the wrong format or without cause.
  • I am not changing file encoding or line endings to something else than UTF-8, LF
  • My pull request does not show an insane amount of files being changed although my ticket only requires a few files being changed
  • I have added Javadoc/documentation where appropriate
  • I have added test cases where appropriate
  • I have explained any part of my code/implementation decisions that is not be self-explanatory

Please provide a brief description of your ticket

(you can copy the ticket if it hasn't changed)

Modifications to default images for space, module, and external links
It seems like right now, only certain file types can be used (e.g. png, maybe jpeg, gif?), when uploading a new default image in the settings page, the user should only be able to upload accepted file types

it needs to be possible to use svgs

after an image has been uploaded, instead of showing the filename, it should show the filename and a thumbnail of the image

The button “Change Default XXX Link Image” should just be an icon with a hover text

It should be possible to disable the default image to go back to the original icon (so when it’s disabled, it uses the little walking man icon, if it’s enabled it uses the uploaded image).

All these apply to all three default images.

VSPC-275

Anything else the reviewer needs to know?

@diging-jenkins
Copy link

Can one of the admins verify this patch?

1 similar comment
@diging-jenkins
Copy link

Can one of the admins verify this patch?

@jophals jophals requested a review from jdamerow April 16, 2025 00:07
@jophals jophals self-assigned this Apr 16, 2025
@jdamerow
Copy link
Member

jdamerow commented Jun 4, 2025

Resolve conflicts please

@jdamerow jdamerow closed this Jun 4, 2025
@jophals jophals reopened this Jun 5, 2025
@jdamerow
Copy link
Member

Make it so, Jenkins.

Tika tika = new Tika();
System.out.println("HERE2");
String contentType = tika.detect(image);
System.out.println("CONTENT TYPE: " + contentType);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tststs

return "redirect:/staff/exhibit/config";
} else {
setter.accept(exhibition, defaultImage);
exhibition = (Exhibition) exhibitionManager.storeExhibition(exhibition);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is exhibition cast here?

exhibition = (Exhibition) exhibitionManager.storeExhibition(exhibition);
attributes.addAttribute("exhibitId", exhibition.getId());
attributes.addAttribute("alertType", "success");
attributes.addAttribute("message", "Successfully Saved!");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Successfully saved!"

attributes.addAttribute("showAlert", "true");
} else {
deleteDefautImageMethod.run();
exhibition = (Exhibition) exhibitionManager.storeExhibition(exhibition);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here, no casting necessary

return ResponseEntity.badRequest().body(errorMessage);
} else {
disableDefautImageMethod.run();
exhibition = (Exhibition) exhibitionManager.storeExhibition(exhibition);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

neither casting nor assigning the return value to a variable seems necessary

@jdamerow jdamerow closed this Jun 17, 2025
@jophals jophals reopened this Jun 20, 2025
jophals and others added 2 commits June 20, 2025 14:48
cancel button not disabling after default images are deleted, fixed
casting of Exhibition type in controller, added javadoc for default
image delete endpoint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants