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

Programming exercises: Fix padding issue in task display #10151

Merged

Conversation

PaRangger
Copy link
Contributor

@PaRangger PaRangger commented Jan 14, 2025

Checklist

General

Client

  • 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 screenshots/screencasts of my UI changes.

Motivation and Context

Currently, when editing a programming exercise using the online editor, the task display looks buggy (the border touches the icons, and the background color is different):

Bildschirmfoto 2025-01-14 um 12 41 58

Additionally, the task display for not executed tests looks different to the one for tests that have no result. These should look the same (the circle is black and is bigger than it should be, look at "Screenshots" for how it is supposed to look like).

Description

I removed the border and changed the background color of the task display so that it blends in better with the rest of the components.

Steps for Testing

Prerequisites:

  • This needs to be tested on a Server with the code lifecycle enabled (e.g. TS2 or TS3)
  • 1 Instructor
  • 1 Programming Exercise (on TS3 you can go to Paul Ranggers Test Course, there is one set up)
  1. Log in to Artemis
  2. Go to Course Management
  3. Go to course
  4. Go to Exercises
  5. Go to the programming exercise
  6. Click "Edit in editor"
  7. On the right side, click "Preview" in the "Problem Statement" section
  8. Verify that the task display looks properly spaced now
  9. You can switch between "Solution", "Template" and "Assignment" next to the title on the top left to see other cases (Success & Failure)

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

Manual Tests

  • Test 1
  • Test 2

Screenshots

Bildschirmfoto 2025-01-14 um 12 29 23

Summary by CodeRabbit

  • Style
    • Updated styling for programming exercise instruction headers
    • Modified button state styling in step wizard component

@PaRangger PaRangger self-assigned this Jan 14, 2025
@github-actions github-actions bot added the client Pull requests that update TypeScript code. (Added Automatically!) label Jan 14, 2025
@PaRangger PaRangger added small programming Pull requests that affect the corresponding module deploy:artemis-test3 labels Jan 14, 2025
@PaRangger PaRangger changed the title Programming Exercises: Fix padding issue in task display Programming exercises: Fix padding issue in task display Jan 14, 2025
@PaRangger PaRangger temporarily deployed to artemis-test3.artemis.cit.tum.de January 15, 2025 09:26 — with GitHub Actions Inactive
@PaRangger PaRangger marked this pull request as ready for review January 15, 2025 09:34
@PaRangger PaRangger requested a review from a team as a code owner January 15, 2025 09:34
Copy link

coderabbitai bot commented Jan 15, 2025

Walkthrough

The pull request involves modifications to two SCSS files related to programming exercise instructions. The changes primarily affect the styling of headers and buttons in the instruction step wizard. In the programming-exercise-editable-instruction.scss file, the background color and border properties of the .card-second-header class have been updated. In the programming-exercise-instruction-step-wizard.scss file, a new class selector for button styling has been added to handle the "not executed" state.

Changes

File Change Summary
src/main/webapp/app/exercises/programming/manage/instructions-editor/programming-exercise-editable-instruction.scss Modified .card-second-header class background color and removed border-bottom
src/main/webapp/app/exercises/programming/shared/instructions-render/step-wizard/programming-exercise-instruction-step-wizard.scss Added & &--not-executed.btn to existing button styling selector

Possibly related PRs

Suggested labels

bugfix, tests

Suggested reviewers

  • Feras797
  • DominikRemo
  • coolchock
  • krusche
  • sawys777

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

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/main/webapp/app/exercises/programming/shared/instructions-render/step-wizard/programming-exercise-instruction-step-wizard.scss (1)

82-83: LGTM! Good use of SCSS nesting and consistent naming.

The changes effectively address the UI consistency issue by properly grouping similar states together. The use of SCSS nesting and consistent naming conventions makes the code maintainable.

Consider extracting common values into variables.

For better maintainability, consider extracting the font size 0.4rem into a variable, similar to how $step-font-size is used.

 $step-font-size: 0.6rem;
+$step-icon-size: 0.4rem;
 $step-button-size: 21px;
 
 // ... later in the file
     & &--no-result.btn,
     .btn.not-done,
     & &--not-executed.btn {
         color: $gray-600;
-        font-size: 0.4rem;
+        font-size: $step-icon-size;
     }
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between e0cda16 and 404a43f.

📒 Files selected for processing (2)
  • src/main/webapp/app/exercises/programming/manage/instructions-editor/programming-exercise-editable-instruction.scss (1 hunks)
  • src/main/webapp/app/exercises/programming/shared/instructions-render/step-wizard/programming-exercise-instruction-step-wizard.scss (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • src/main/webapp/app/exercises/programming/manage/instructions-editor/programming-exercise-editable-instruction.scss
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Codacy Static Code Analysis

Copy link

@Feras797 Feras797 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, the preview is now properly spaced.
image

Copy link

@ItsaaaMeMario ItsaaaMeMario 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, works as expected.
grafik

Copy link

@vinceclifford vinceclifford 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, works as expected.

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.

code

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. Works as described

image

@github-actions github-actions bot removed the programming Pull requests that affect the corresponding module label Jan 16, 2025
@krusche krusche added this to the 7.9.0 milestone Jan 17, 2025
@krusche krusche merged commit 5941797 into develop Jan 17, 2025
21 of 26 checks passed
@krusche krusche deleted the bugfix/programming-exercises/fix-task-display-in-code-editor branch January 17, 2025 14:35
@krusche krusche added the maintainer-approved The feature maintainer has approved the PR label Jan 17, 2025
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!) maintainer-approved The feature maintainer has approved the PR ready to merge small
Projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

7 participants