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: Generalize icon in Cancel button for consistency #10244

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

laxerhd
Copy link
Contributor

@laxerhd laxerhd commented Feb 1, 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.
  • I translated all newly inserted strings into English and German.

Motivation and Context

Regarding this PR #10210, I was fixing an issue about the background of some Cancel buttons.
Another contributer also gave a remark about unifying the icons.

Description

For most Cancel buttons, I changed faTimes to faBan.
In very few cases, I have also added   so that the symbol and the text have some distance and can not be separated.
In some cases there were other icon used. I have not changed these.

Steps for Testing

There are multiple places to check, but here is one for example:
Prerequisites:

  • 1 Instructor
  • Course with a lecture
  1. Go to a Course with lectures
  2. Click on Lectures
  3. Click on Manage
  4. Click on Edit
  5. Scroll down till you see Add a new Lecture Unit
  6. Take a look at the unit forms you can add and their cancel button icons

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

Test Coverage

Screenshots

This one still has the old background but with updated icon, background fixed in this PR #10210:
image
If PR #10210 is merged, most Cancel buttons will look like this:
image

Summary by CodeRabbit

  • Style
    • Updated cancel button icons across the application to a new, more intuitive design (faBan replacing faTimes).
    • Enhanced spacing between icons and text on cancel buttons for improved visual alignment.

@laxerhd laxerhd self-assigned this Feb 1, 2025
@laxerhd laxerhd requested a review from a team as a code owner February 1, 2025 14:09
@github-actions github-actions bot added the client Pull requests that update TypeScript code. (Added Automatically!) label Feb 1, 2025
Copy link

coderabbitai bot commented Feb 1, 2025

Walkthrough

This pull request updates the cancel button icon across multiple Angular components. The change replaces the FontAwesome faTimes icon with the faBan icon in various HTML templates and their corresponding TypeScript files. In some templates, minor spacing adjustments are made. No logic, control flow, or functional behavior was modified.

Changes

Files Change Summary
.../course/competencies/forms/{competency,prerequisite}-form.component.html Updated cancel button icon from faTimes to faBan.
.../course/competencies/forms/course-competency-form.component.ts Replaced faTimes import and property with faBan.
.../exercises/quiz/manage/apollon-diagrams/apollon-diagram-create-form.{html,ts} In HTML, added faBan icon alongside cancel text; in TS, imported and declared the new faBan icon.
.../exercises/shared/exercise-update-warning.component.html Inserted a non-breaking space between the icon and the cancel text.
.../lecture/close-edit-lecture-modal.{html,ts} Replaced the cancel icon from faTimes to faBan and added non-breaking space in the HTML template.
.../lecture/lecture-attachments.{html,ts} Updated cancel icon usage from faTimes to faBan with corresponding changes in the TS file.
.../lecture/lecture-unit/lecture-unit-management/attachment-unit-form.{html,ts} Replaced cancel button icon from faTimes to faBan in both the template and TS property.
.../lecture/lecture-unit/lecture-unit-management/create-exercise-unit.{html,ts} Updated the cancel button icon from faTimes to faBan in both the HTML and TS.
.../lecture/lecture-unit/lecture-unit-management/online-unit-form.{html,ts} Replaced the cancel icon from faTimes to faBan in the template and updated the TS import/property accordingly.
.../lecture/lecture-unit/lecture-unit-management/text-unit-form.{html,ts} Changed the cancel icon to faBan in the template and updated the TS declaration.
.../lecture/lecture-unit/lecture-unit-management/video-unit-form.{html,ts} Switched from faTimes to faBan for the cancel action in both the HTML and TS file.
.../lecture/pdf-preview/{pdf-preview.component.html,pdf-preview.component.ts} Replaced the cancel icon with faBan (adding a non-breaking space in the HTML) and updated the icon import/property in TS.

Possibly related PRs

  • Development: Use signals in lecture add attachment form #9656: The changes in the main PR, which involve updating the icon from faTimes to faBan in various components, are related to the retrieved PR as it also includes modifications to the LectureAttachmentsComponent where the faTimes icon is added as a protected property, indicating a direct connection at the code level.
  • Development: Decompose PDF Preview components #9592: The changes in the main PR, which involve updating the icon for the cancel button from faTimes to faBan, are related to the changes in the retrieved PR, as both involve modifications to the icon representation in the PDF preview components, specifically replacing faTimes with faBan in various components.
  • Communication: Improve the user interface #9103: The changes in the main PR, which involve updating the icon for cancel buttons from faTimes to faBan in various components, are related to the modifications in the retrieved PR, as both involve similar updates to icon usage in their respective HTML templates.

Suggested labels

tests, small, ready to merge, code quality, refactoring

Suggested reviewers

  • BBesrour
  • HawKhiem
  • sachmii
  • Feras797
  • JohannesStoehr
  • az108
  • rabeatwork

Tip

🌐 Web search-backed reviews and chat
  • We have enabled web search-based reviews and chat for all users. This feature allows CodeRabbit to access the latest documentation and information on the web.
  • You can disable this feature by setting web_search: false in the knowledge_base settings.
  • Please share any feedback in the Discord discussion.

📜 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 c9acf30 and 2b95a5a.

📒 Files selected for processing (22)
  • src/main/webapp/app/course/competencies/forms/competency/competency-form.component.html (1 hunks)
  • src/main/webapp/app/course/competencies/forms/course-competency-form.component.ts (2 hunks)
  • src/main/webapp/app/course/competencies/forms/prerequisite/prerequisite-form.component.html (1 hunks)
  • src/main/webapp/app/exercises/quiz/manage/apollon-diagrams/apollon-diagram-create-form.component.html (1 hunks)
  • src/main/webapp/app/exercises/quiz/manage/apollon-diagrams/apollon-diagram-create-form.component.ts (2 hunks)
  • src/main/webapp/app/exercises/shared/exercise-update-warning/exercise-update-warning.component.html (1 hunks)
  • src/main/webapp/app/lecture/close-edit-lecture-modal/close-edit-lecture-modal.component.html (1 hunks)
  • src/main/webapp/app/lecture/close-edit-lecture-modal/close-edit-lecture-modal.component.ts (2 hunks)
  • src/main/webapp/app/lecture/lecture-attachments.component.html (1 hunks)
  • src/main/webapp/app/lecture/lecture-attachments.component.ts (2 hunks)
  • src/main/webapp/app/lecture/lecture-unit/lecture-unit-management/attachment-unit-form/attachment-unit-form.component.html (1 hunks)
  • src/main/webapp/app/lecture/lecture-unit/lecture-unit-management/attachment-unit-form/attachment-unit-form.component.ts (2 hunks)
  • src/main/webapp/app/lecture/lecture-unit/lecture-unit-management/create-exercise-unit/create-exercise-unit.component.html (1 hunks)
  • src/main/webapp/app/lecture/lecture-unit/lecture-unit-management/create-exercise-unit/create-exercise-unit.component.ts (2 hunks)
  • src/main/webapp/app/lecture/lecture-unit/lecture-unit-management/online-unit-form/online-unit-form.component.html (1 hunks)
  • src/main/webapp/app/lecture/lecture-unit/lecture-unit-management/online-unit-form/online-unit-form.component.ts (2 hunks)
  • src/main/webapp/app/lecture/lecture-unit/lecture-unit-management/text-unit-form/text-unit-form.component.html (1 hunks)
  • src/main/webapp/app/lecture/lecture-unit/lecture-unit-management/text-unit-form/text-unit-form.component.ts (2 hunks)
  • src/main/webapp/app/lecture/lecture-unit/lecture-unit-management/video-unit-form/video-unit-form.component.html (1 hunks)
  • src/main/webapp/app/lecture/lecture-unit/lecture-unit-management/video-unit-form/video-unit-form.component.ts (2 hunks)
  • src/main/webapp/app/lecture/pdf-preview/pdf-preview.component.html (1 hunks)
  • src/main/webapp/app/lecture/pdf-preview/pdf-preview.component.ts (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (22)
  • src/main/webapp/app/course/competencies/forms/competency/competency-form.component.html
  • src/main/webapp/app/exercises/quiz/manage/apollon-diagrams/apollon-diagram-create-form.component.ts
  • src/main/webapp/app/course/competencies/forms/prerequisite/prerequisite-form.component.html
  • src/main/webapp/app/lecture/lecture-attachments.component.html
  • src/main/webapp/app/lecture/lecture-unit/lecture-unit-management/video-unit-form/video-unit-form.component.html
  • src/main/webapp/app/lecture/lecture-unit/lecture-unit-management/online-unit-form/online-unit-form.component.html
  • src/main/webapp/app/lecture/close-edit-lecture-modal/close-edit-lecture-modal.component.html
  • src/main/webapp/app/exercises/quiz/manage/apollon-diagrams/apollon-diagram-create-form.component.html
  • src/main/webapp/app/lecture/lecture-unit/lecture-unit-management/text-unit-form/text-unit-form.component.html
  • src/main/webapp/app/lecture/lecture-unit/lecture-unit-management/attachment-unit-form/attachment-unit-form.component.html
  • src/main/webapp/app/exercises/shared/exercise-update-warning/exercise-update-warning.component.html
  • src/main/webapp/app/lecture/pdf-preview/pdf-preview.component.html
  • src/main/webapp/app/lecture/lecture-unit/lecture-unit-management/create-exercise-unit/create-exercise-unit.component.ts
  • src/main/webapp/app/lecture/lecture-unit/lecture-unit-management/create-exercise-unit/create-exercise-unit.component.html
  • src/main/webapp/app/lecture/lecture-unit/lecture-unit-management/video-unit-form/video-unit-form.component.ts
  • src/main/webapp/app/lecture/close-edit-lecture-modal/close-edit-lecture-modal.component.ts
  • src/main/webapp/app/course/competencies/forms/course-competency-form.component.ts
  • src/main/webapp/app/lecture/pdf-preview/pdf-preview.component.ts
  • src/main/webapp/app/lecture/lecture-unit/lecture-unit-management/attachment-unit-form/attachment-unit-form.component.ts
  • src/main/webapp/app/lecture/lecture-unit/lecture-unit-management/text-unit-form/text-unit-form.component.ts
  • src/main/webapp/app/lecture/lecture-unit/lecture-unit-management/online-unit-form/online-unit-form.component.ts
  • src/main/webapp/app/lecture/lecture-attachments.component.ts
⏰ Context from checks skipped due to timeout of 90000ms (6)
  • GitHub Check: Call Build Workflow / Build .war artifact
  • GitHub Check: Call Build Workflow / Build and Push Docker Image
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: client-tests
  • GitHub Check: server-tests
  • GitHub Check: Analyse

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.

coderabbitai[bot]
coderabbitai bot previously approved these changes Feb 1, 2025
Cathy0123456789
Cathy0123456789 previously approved these changes Feb 2, 2025
Copy link

@Cathy0123456789 Cathy0123456789 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. All Cancel buttons now have the same icon 👍🏼

@laxerhd laxerhd changed the title General: Swap faTimes with faBan icon in Cancel button for consistency General: Generalize icon in Cancel button for consistency Feb 2, 2025
@laxerhd laxerhd force-pushed the chore/general/unify-cancel-button branch from c9acf30 to 2b95a5a Compare February 4, 2025 15:56
Copy link

@HanyangXu0508 HanyangXu0508 left a comment

Choose a reason for hiding this comment

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

tested locally and worked as expected

@helios-aet helios-aet bot temporarily deployed to artemis-test2.artemis.cit.tum.de February 7, 2025 13:15 Inactive
Copy link

@SindiBuklaji SindiBuklaji 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 described on TS2. 👍

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

Successfully merging this pull request may close these issues.

5 participants