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

Integrated code lifecycle: Show result progress bar in exam overview and exercise details pages #10048

Merged

Conversation

BBesrour
Copy link
Member

@BBesrour BBesrour commented Dec 18, 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 (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 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.

Changes affecting Programming Exercises

  • High priority: I tested all changes and their related features with all corresponding user types on a test server configured with the integrated lifecycle setup (LocalVC and LocalCI).

Motivation and Context

We want to show the progress bar in the exercise details view and exam overview page (see screenshots)

Steps for Testing

Prerequisites:

  • 1 Instructor
  • 2 Students
  • 1 Programming Exercise with Complaints enabled
  1. Create programming exercise
  2. Make sure that the result component show a progress bar and that it's intuitive.
  3. Optional: try pushing to the test repository (using edit in Editor) and check the result component (for template and solution build plans)

Exam Mode Testing

Prerequisites:

  • 1 Instructor
  • 1 Student
  1. Log in to Artemis
  2. participate in exam as student
  3. push to a programming exercise
  4. navigate to the overview page
  5. check the result component is correct and intuitive

Testserver States

Note

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







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 even for very large courses with more than 2000 students.
  • I (as a reviewer) confirm that the server changes (in particular related to database calls) are implemented with a very good performance even for very large courses with more than 2000 students.

Code Review

  • Code Review 1
  • Code Review 2

Manual Tests

  • Test 1
  • Test 2

Exam Mode Test

  • Test 1
  • Test 2

Performance Tests

  • Test 1
  • Test 2

Screenshots

image
image

Summary by CodeRabbit

  • New Features

    • Added a progress bar to the programming test status and exercise overview pages for enhanced visual feedback during loading states.
  • Style

    • Updated the styling of the progress bar component for improved presentation.

@BBesrour BBesrour requested a review from a team as a code owner December 18, 2024 16:04
@github-actions github-actions bot added the client Pull requests that update TypeScript code. (Added Automatically!) label Dec 18, 2024
Copy link

coderabbitai bot commented Dec 18, 2024

Walkthrough

The pull request introduces modifications to two HTML template files, adding a [showProgressBar]="true" attribute to the <jhi-updating-result> component in both the programming test status detail and exam exercise overview pages. This change appears to enhance the user interface by displaying a progress bar during updating processes for programming exercises and test statuses. The modifications are focused on improving visual feedback during loading states.

Changes

File Change Summary
src/main/webapp/app/detail-overview-list/components/programming-test-status-detail/programming-test-status-detail.component.html Added [showProgressBar]="true" to <jhi-updating-result> component
src/main/webapp/app/exam/participate/exercises/exercise-overview-page/exam-exercise-overview-page.component.html Added [showProgressBar]="true" to <jhi-updating-result> component and updated class attribute to class="me-2 d-block"

Possibly related PRs

Suggested labels

tests, client, ready to merge, component:Programming, component:Exam Mode

Suggested reviewers

  • SimonEntholzer
  • krusche
  • HawKhiem
  • rabeatwork
  • az108

📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d10a20c and d7fb993.

📒 Files selected for processing (2)
  • src/main/webapp/app/detail-overview-list/components/programming-test-status-detail/programming-test-status-detail.component.html (1 hunks)
  • src/main/webapp/app/exam/participate/exercises/exercise-overview-page/exam-exercise-overview-page.component.html (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
src/main/webapp/app/detail-overview-list/components/programming-test-status-detail/programming-test-status-detail.component.html (1)

Pattern src/main/webapp/**/*.html: @if and @for are new and valid Angular syntax replacing *ngIf and *ngFor. They should always be used over the old style.

src/main/webapp/app/exam/participate/exercises/exercise-overview-page/exam-exercise-overview-page.component.html (1)

Pattern src/main/webapp/**/*.html: @if and @for are new and valid Angular syntax replacing *ngIf and *ngFor. They should always be used over the old style.

🔇 Additional comments (2)
src/main/webapp/app/detail-overview-list/components/programming-test-status-detail/programming-test-status-detail.component.html (1)

10-10: LGTM! Progress bar addition aligns with PR objectives.

The addition of [showProgressBar]="true" enhances user feedback during result updates.

Let's verify the component accepts this property:

✅ Verification successful

Property exists and is properly defined in the component

The showProgressBar property is correctly defined as an @Input() property in the UpdatingResultComponent:

@Input() showProgressBar = false;
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify jhi-updating-result component accepts showProgressBar property
# Search for the component definition to confirm the property exists

ast-grep --pattern 'class UpdatingResultComponent {
  $$$
  @Input() showProgressBar: boolean;
  $$$
}'

Length of output: 229


Script:

#!/bin/bash
# Let's try a different approach to find the component definition
# First, let's locate the updating-result component file
fd "updating-result.component.ts"

# Then let's use ripgrep to search for Input decorators and showProgressBar
rg "@Input\(\)" -A 5 -B 5

Length of output: 65703


Script:

#!/bin/bash
# Let's search for the UpdatingResult component definition and its properties
rg -l "UpdatingResult" --type ts

# Then let's examine the component file content
cat src/main/webapp/app/exercises/shared/result/updating-result.component.ts

Length of output: 12783

src/main/webapp/app/exam/participate/exercises/exercise-overview-page/exam-exercise-overview-page.component.html (1)

69-70: LGTM! Progress bar and display improvements.

The changes enhance the UI by:

  1. Adding progress bar feedback during updates
  2. Fixing display behavior with d-block class

Let's verify there are no conflicting display styles:

✅ Verification successful

Adding showProgressBar and d-block class is safe and appropriate

The changes are verified to be safe because:

  1. No conflicting display styles exist in the component's SCSS file
  2. The jhi-updating-result component is properly contained within a conditional block
  3. The d-block class addition helps ensure consistent display behavior without conflicts
  4. The component's template structure shows the progress bar will integrate well with existing layout
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for any conflicting display styles
# Search for other display-related styles applied to jhi-updating-result

rg -g '*.scss' -g '*.css' 'jhi-updating-result'

Length of output: 47


Script:

#!/bin/bash
# Let's check the component's template and styles more broadly
# 1. Find the component's style file
fd "exam-exercise-overview-page.component.(scss|css)$"

# 2. Check for any display-related styles in the parent directories
fd ".(scss|css)$" src/main/webapp/app/exam/participate/exercises/

# 3. Check the component's class to understand the context better
rg -A 5 "class ExamExerciseOverviewPageComponent" 

Length of output: 1931


Script:

#!/bin/bash
# Let's check the content of the component's style file and the template
cat "src/main/webapp/app/exam/participate/exercises/exercise-overview-page/exam-exercise-overview-page.scss"

# Also check the template for any other display-related classes around this component
rg -A 3 -B 3 "jhi-updating-result" src/main/webapp/app/exam/participate/exercises/exercise-overview-page/exam-exercise-overview-page.component.html

Length of output: 897


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@florian-glombik florian-glombik left a comment

Choose a reason for hiding this comment

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

Code changes look reasonable

@BBesrour BBesrour changed the title Integrated Code lifecycle: Show result progressbar in exam overview and exercise details pages Integrated code lifecycle: Show result progressbar in exam overview and exercise details pages Dec 18, 2024
Copy link
Contributor

@cremertim cremertim left a comment

Choose a reason for hiding this comment

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

code

Copy link
Contributor

@SimonEntholzer SimonEntholzer left a comment

Choose a reason for hiding this comment

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

Works as expected on Ts1, also for exams:
image

Nitpick would be to center the text when the progress bar is displayed

Copy link
Contributor

@coolchock coolchock 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 ts1, works as described 👍

Copy link

@HawKhiem HawKhiem 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 TS3. Everything works as expected

Screenshot 2024-12-18 210838
Screenshot 2024-12-18 212317

@BBesrour BBesrour added this to the 7.8.0 milestone Dec 18, 2024
@krusche krusche changed the title Integrated code lifecycle: Show result progressbar in exam overview and exercise details pages Integrated code lifecycle: Show result progress bar in exam overview and exercise details pages Dec 20, 2024
@krusche krusche merged commit e46ca22 into develop Dec 20, 2024
75 of 97 checks passed
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 to merge
Projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

7 participants