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

General: Add buttons to the avatar in the course edit view and move image cropper into a modal #8143

Merged
merged 44 commits into from
Apr 22, 2024

Conversation

eceeeren
Copy link
Contributor

@eceeeren eceeeren commented Mar 5, 2024

Checklist

General

Client

  • Important: I implemented the changes with a very good performance, prevented too many (unnecessary) REST calls and made sure the UI is responsive, even with large data.
  • I strictly followed the client coding and design guidelines.
  • Following the theming guidelines, I specified colors only in the theming variable files and checked that the changes look consistent in both the light and the dark theme.
  • I added multiple integration tests (Jest) related to the features (with a high test coverage), while following the test guidelines.
  • I added authorities to all new routes and checked the course groups for displaying navigation elements (links, buttons).
  • I documented the TypeScript code using JSDoc style.
  • I added multiple screenshots/screencasts of my UI changes.
  • I translated all newly inserted strings into English and German.

Motivation and Context

Closes #7524

Description

Steps for Testing

Prerequisites:

  • 1 Instructor

To test it while creating a new course:

  1. Log in to Artemis
  2. Navigate to Course Management
  3. Click "Create new course"
  4. Click on "Click to add" placeholder and verify that it opens a file uploader
  5. Verify that you can see "Crop your image" modal
  6. Crop your image and click save, verify that you can see that the image is cropped and set as course icon
  7. Test the delete button on the icon by clicking "Trash icon", the icon should be removed
  8. Test the edit button on the icon by clicking "Pen icon", the file uploader should be opened again
  9. Click "Save" to save the new icon
  10. Observe that you can see the new icon on the course detail page

To test it while editing a course:

  1. Log in to Artemis
  2. Navigate to Course Management
  3. Select the course you have created
  4. Click on "Pen icon" to change your image
  5. Click on "Trash icon" to change your image
  6. Verify that you can see "Crop your image" modal
  7. Remove the image and click "Save"
  8. Observe that you can see the new icon/no icon on the course detail page

Testing the Dark Mode:

  1. Repeat the steps above with Dark Mode enabled
  2. Observe that there are no inconsistencies with the colouring

Testing German Version:

  1. Repeat the steps above with German Version enabled
  2. Verify that Image Placeholder text changes to "Zum Hinzufügen klicken"

Testserver States

Note

These badges show the state of the test servers.
Green = Currently available, Red = Currently locked







Review Progress

Performance Review

  • I (as a reviewer) confirm that the client changes (in particular related to REST calls and UI responsiveness) are implemented with a very good performance
  • I (as a reviewer) confirm that the server changes (in particular related to database calls) are implemented with a very good performance

Code Review

  • Code Review 1
  • Code Review 2

Manual Tests

  • Test 1
  • Test 2

Test Coverage

Screenshots

Image Placeholder in English
Screenshot 2024-04-19 at 13 25 07

Image Placeholder in German
Screenshot 2024-04-19 at 13 25 17

Image Cropper Modal in Light Mode
Screenshot 2024-04-05 at 11 33 46

Image Cropper Modal in Dark Mode
Screenshot 2024-04-05 at 11 34 08

Image Removing and Editing Buttons
Screenshot 2024-04-19 at 13 25 39
Screenshot 2024-04-19 at 13 25 53

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features

    • Introduced an image cropping feature for course images, enhancing user interaction by allowing image adjustments directly within the course management interface.
    • Added new interface elements and hints in both German and English to guide users in image cropping.
  • Style

    • Improved visual styling and alignment for course management buttons and icons.
    • Enhanced UI elements with new colors, positioning, and shadows to improve user experience.
  • Documentation

    • Updated language files to include new terms and hints related to the image cropping feature.

@eceeeren eceeeren self-assigned this Mar 5, 2024
@github-actions github-actions bot added the client Pull requests that update TypeScript code. (Added Automatically!) label Mar 5, 2024
@artemis-bot artemis-bot added this to In progress in Artemis Development Mar 5, 2024
@eceeeren eceeeren linked an issue Mar 5, 2024 that may be closed by this pull request
@github-actions github-actions bot added the tests label Mar 22, 2024
beyzaaltuntas
beyzaaltuntas previously approved these changes Apr 22, 2024
Copy link
Contributor

@beyzaaltuntas beyzaaltuntas left a comment

Choose a reason for hiding this comment

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

Tested manually on ts-3, working as expected.

Copy link
Contributor

@rstief rstief left a comment

Choose a reason for hiding this comment

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

Looks good overall, some small comments on styling and tests

Copy link
Contributor

@JohannesWt JohannesWt left a comment

Choose a reason for hiding this comment

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

Just translations

src/main/webapp/i18n/de/course.json Show resolved Hide resolved
src/main/webapp/i18n/en/course.json Show resolved Hide resolved
coderabbitai[bot]
coderabbitai bot previously approved these changes Apr 22, 2024
Copy link
Contributor

@JohannesWt JohannesWt left a comment

Choose a reason for hiding this comment

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

Showed in testing session -> everything works. My former comments have also been resolved.

Copy link
Contributor

@rstief rstief left a comment

Choose a reason for hiding this comment

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

Code looks good 👍 Thanks for changing the styling to classes!

@bassner bassner added this to the 7.0.2 milestone Apr 22, 2024
@bassner bassner temporarily deployed to artemis-test1.artemis.cit.tum.de April 22, 2024 15:35 — with GitHub Actions Inactive
Copy link
Member

@bassner bassner left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@bassner bassner changed the title General: Open upload picture dialog for course when clicking img General: Add buttons to the avatar in the course edit view and move image cropper into a modal Apr 22, 2024
@bassner bassner modified the milestones: 7.0.2, 7.0.1 Apr 22, 2024
@bassner bassner merged commit 391171c into develop Apr 22, 2024
44 of 50 checks passed
@bassner bassner deleted the feature/dialog-for-uploading-picture branch April 22, 2024 15:52
@krusche krusche modified the milestones: 7.0.1, 7.0.2 Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client Pull requests that update TypeScript code. (Added Automatically!) ready for review tests too-long-open !!! This is an antipattern, we should aim for small PRs that are only open for a short time !!! user interface
Projects
Archived in project
Artemis Development
  
In progress
Development

Successfully merging this pull request may close these issues.

General: Open upload picture dialog for course when clicking img
9 participants