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

Lectures: Allow hiding of multiple PDF pages at once #10432

Open
wants to merge 14 commits into
base: feature/lectures/hide-pdf-pages
Choose a base branch
from

Conversation

eceeeren
Copy link
Contributor

@eceeeren eceeeren commented Mar 2, 2025

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 (e.g. using paging).
  • I strictly followed the principle of data economy for all client-server REST calls.
  • 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 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

After the final presentation of Master's Thesis "Dynamic Lecture Content Management in Artemis", some requirements have been collected from the Instructors of Artemis. Some of these feedbacks included:

  1. Hiding and showing multiple PDF pages at once
  2. Making checkboxes bigger
  3. Allowing only PDF files for "Append PDF" button
  4. Grouping "Cancel" button with "Save button"
  5. Disabling 'Save' button when saving
  6. Adding an alert before cancelling the editing operation
  7. Adding "loading spinner" in the middle to showcasing the loading of the PDF
  8. Adding an alert in the middle when PDF is not available

Description

All of the described changes in the description are implemented on the Client level.

Steps for Testing

Prerequisites:

  • 1 Instructor
  1. Log in to Artemis
  2. Navigate to Course Administration
  3. Navigate to Lecture Units and add a file attachment
  4. Click 'View' button
  5. Confirm that you can see the loading spinner when the PDF is loading
  6. Click 'Cancel' and confirm that you stay on the page when you click 'Cancel' again
  7. Click 'Cancel' again and observe that you go back to the previous page when you click 'Confirm'
  8. Click 'View' again and check if checkbox size is sufficient
  9. Click on different checkboxes and click 'Hide Pages', confirm that these pages are hidden
  10. Click on different checkboxes and click 'Show Pages', confirm that these pages are shown again
  11. Click 'Append PDF' and confirm that you can only select PDF files
  12. Click 'Save' button and confirm that the button is disabled when it is saving
  13. Click on 'Download' button, confirm that your changes are applied
  14. If there is already a file that you uploaded before and doesn't exist anymore, you can check for 'PDF is not available' warning

Review Progress

Code Review

  • Code Review 1
  • Code Review 2

Manual Tests

  • Test 1
  • Test 2

Test Coverage

Class/File Line Coverage Confirmation (assert/expect)
pdf-preview.component.spec.ts 95%
pdf-preview-thumbnail-grid.component.spec.ts 89%

Screenshots

1. Hiding and showing multiple PDF pages

Screenshot 2025-03-04 at 00 59 50

2. Cancelling confirmation alert

Screenshot 2025-03-04 at 01 00 42

3. Loading spinner for loading pdf

Screenshot 2025-03-04 at 01 02 44

4. No PDF availale warning

Screenshot 2025-03-04 at 01 03 05

@eceeeren eceeeren requested a review from a team as a code owner March 2, 2025 02:00
@github-actions github-actions bot added the client Pull requests that update TypeScript code. (Added Automatically!) label Mar 2, 2025
@eceeeren eceeeren marked this pull request as draft March 2, 2025 02:01
@MaximilianAnzinger MaximilianAnzinger changed the title Lectures: Add multiple page hiding support Lectures: Allow hiding of multiple pages at once Mar 2, 2025
@helios-aet helios-aet bot temporarily deployed to artemis-test6.artemis.cit.tum.de March 2, 2025 15:32 Inactive
@eceeeren eceeeren changed the title Lectures: Allow hiding of multiple pages at once Lectures: Allow hiding of multiple PDF pages at once Mar 2, 2025
@helios-aet helios-aet bot temporarily deployed to artemis-test6.artemis.cit.tum.de March 3, 2025 22:31 Inactive
@github-actions github-actions bot added the tests label Mar 3, 2025
@eceeeren eceeeren force-pushed the feature/lectures/hide-multiple-pdf-pages branch from 1611aa7 to 16050c2 Compare March 3, 2025 23:14
@eceeeren eceeeren marked this pull request as ready for review March 4, 2025 00:26
@helios-aet helios-aet bot temporarily deployed to artemis-test4.artemis.cit.tum.de March 7, 2025 15:21 Inactive
@helios-aet helios-aet bot temporarily deployed to artemis-test1.artemis.cit.tum.de March 8, 2025 21:03 Inactive
@helios-aet helios-aet bot temporarily deployed to artemis-test2.artemis.cit.tum.de March 8, 2025 21:45 Inactive
@helios-aet helios-aet bot temporarily deployed to artemis-test6.artemis.cit.tum.de March 9, 2025 18:43 Inactive
@helios-aet helios-aet bot temporarily deployed to artemis-test2.artemis.cit.tum.de March 9, 2025 19:40 Inactive
@dmytropolityka
Copy link
Contributor

dmytropolityka commented Mar 10, 2025

image
I get this when I try to upload a non-pdf file. Choosing "All files" in the upload dialog is still possible. Is that expected?

@dmytropolityka
Copy link
Contributor

Everything else works as described besides that.

@helios-aet helios-aet bot temporarily deployed to artemis-test5.artemis.cit.tum.de March 12, 2025 22:01 Inactive
Copy link
Contributor

@dmytropolityka dmytropolityka left a comment

Choose a reason for hiding this comment

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

Tested on ts5. Works as expected now.

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!) tests
Projects
Status: Work In Progress
Development

Successfully merging this pull request may close these issues.

2 participants