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

Tutorial groups: Fix the contrast in the tutorial group rows in the dark mode #8494

Merged
merged 8 commits into from
May 2, 2024

Conversation

edkaya
Copy link
Contributor

@edkaya edkaya commented Apr 28, 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

When the tutors attempt to display all the tutorial groups, they face an issue with poor readability of the links in the corresponding rows due to low contrast in dark mode. This problem arises because the rows are highlighted in a cyan/blue color, making the clickable links (the titles of the tutorials) barely visible.

Description

The same color and contrast used to highlight elements in the left sidebar are also applied to the rows of the tutorial groups for tutors (Discussed with Ramona). By doing this, we maintain consistency in the coloring scheme and avoid hardcoded colors in the client. Additionally, we have removed the hovering effect when users hover over a row, as the row itself is not clickable, which was confusing for users. We keep the hovering effect for the clickable link (title of the tutorial).

Steps for Testing

Prerequisites:

  • 2 Students
  • 2 Tutorial Groups
  1. Log in to Artemis
  2. Navigate to Course Management
  3. Select a Course
  4. Navigate to Tutorials
  5. Create a new Tutorial Group
  6. Select the first student (Student X) as a tutor
  7. Create another new Tutorial Group
  8. Select the second student (Student Y) as a tutor
  9. Log in to Artemis again as Student X
  10. Navigate to Course
  11. Click on Tutorials and show all Tutorial Groups
  12. Verify that the row for the group that you are tutor for has the same contrast as the sidebar
  13. Verify that the name of the tutorial is now easy to read in dark and light mode
  14. Verify that there is no any hovering effect for the row, but for the name of the tutorial

Testserver States

Note

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






Review Progress

Code Review

  • Code Review 1
  • Code Review 2

Manual Tests

  • Test 1
  • Test 2

Screenshots

  • Before the fix:
    68747470733a2f2f6779617a6f2e636f6d2f37363233623235363063343661656139323530373533323438313634373866332f726177
    68747470733a2f2f6779617a6f2e636f6d2f34303461353032353234613763373734303161613132633137393339303661322f726177
  • After the fix:
Screenshot 2024-04-28 at 15 12 09 Screenshot 2024-04-28 at 15 11 58

Summary by CodeRabbit

  • Style
    • Updated styling for tutor and non-tutor roles in the tutorial groups table.
  • New Features
    • Enhanced the tutorial groups table by conditionally applying classes based on the user's tutor status.

@edkaya edkaya requested a review from a team as a code owner April 28, 2024 13:16
@edkaya edkaya linked an issue Apr 28, 2024 that may be closed by this pull request
Copy link

coderabbitai bot commented Apr 28, 2024

Walkthrough

The recent updates involve enhancing the visual representation and interactivity of the tutorial groups table in a web application. New styling rules have been added to differentiate between users who are tutors and those who are not. The HTML template now dynamically applies these styles based on the user's tutor status, improving the user experience by visually distinguishing user roles within tutorial groups.

Changes

File Path Change Summary
.../tutorial-group-row/tutorial-group-row.component.scss Added styling rules for .is-user-tutor and .is-user-not-tutor classes.
.../tutorial-groups-table/tutorial-groups-table.component.html Added conditional classes based on tutorialGroup.isUserTutor in the HTML template.

Possibly related issues

  • Dark-mode issue on tutorial groups overviews #8427: The dark-mode issue on tutorial groups overviews might benefit from the improved visual differentiation of user roles in the tutorial groups table, potentially addressing the contrast and readability concerns raised in the issue.

Recent Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 29ddc40 and fdde9c1.
Files selected for processing (1)
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-groups-table/tutorial-group-row/tutorial-group-row.component.scss (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-groups-table/tutorial-group-row/tutorial-group-row.component.scss

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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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.

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 as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

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.

@github-actions github-actions bot added the client Pull requests that update TypeScript code. (Added Automatically!) label Apr 28, 2024
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

Out of diff range and nitpick comments (1)
src/main/webapp/app/course/tutorial-groups/shared/tutorial-groups-table/tutorial-groups-table.component.html (1)

Line range hint 37-37: The use of @if for conditional rendering based on mifOfDifferentLanguages is correctly implemented. However, there seems to be a typographical error in the variable name mifOfDifferentLanguages. It should likely be mixOfDifferentLanguages.

- [mifOfDifferentLanguages]="mifOfDifferentLanguages"
+ [mixOfDifferentLanguages]="mixOfDifferentLanguages"

coderabbitai[bot]
coderabbitai bot previously approved these changes Apr 28, 2024
@JohannesStoehr
Copy link
Contributor

This is also a dark mode issue related to tutorial groups. Do you want to fix this in this PR as well? #6448

@edkaya
Copy link
Contributor Author

edkaya commented Apr 28, 2024

This is also a dark mode issue related to tutorial groups. Do you want to fix this in this PR as well? #6448

Yes, thanks for pointing it out. I can fix that as well.

@edkaya
Copy link
Contributor Author

edkaya commented Apr 29, 2024

This is also a dark mode issue related to tutorial groups. Do you want to fix this in this PR as well? #6448

Yes, thanks for pointing it out. I can fix that as well.

After today's dev meeting, I talked to Ramona about this issue and she thought that since it is not super urgent to fix this, I will fix and create another PR for this towards the end of this week. Is it okay for you?

Copy link
Contributor

@egekurt123 egekurt123 left a comment

Choose a reason for hiding this comment

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

Manually tested on TS4, works as expected

Copy link
Contributor

@sarpsahinalp sarpsahinalp left a comment

Choose a reason for hiding this comment

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

lgtm

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.

Code looks good - good improvement 👍

Copy link
Contributor

@rabeatwork rabeatwork left a comment

Choose a reason for hiding this comment

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

Maintainer approved

@krusche krusche added this to the 7.0.3 milestone May 2, 2024
@krusche krusche merged commit 6b319d6 into develop May 2, 2024
26 of 28 checks passed
@krusche krusche deleted the bugfix/tutorial-groups/dark-mode-row-contrast branch May 2, 2024 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix client Pull requests that update TypeScript code. (Added Automatically!) ready to merge user interface
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Dark-mode issue on tutorial groups overviews
7 participants