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

Development: Move rotate icon css to global style #8646

Merged
merged 2 commits into from
May 22, 2024

Conversation

rstief
Copy link
Contributor

@rstief rstief commented May 21, 2024

Ideally test on ts3 so you can check the css still works for standardized competencies

Checklist

General

Client

Motivation and Context

There are a few styles used for rotating arrows (rotate-icon, rotate and chevron-position) that are repeated in many style files.

Description

This PR moves these styles to the global scss file. It also fixes an UI bug for the communication card (see screenshot below)

image

Steps for Testing

  • 1 Admin
  • 1 Course with exam
  • Ideally use ts3 and the provided links :)

Verify Exams:
1.Log in to Artemis
2. On ts3: View Summary
3. See that the collapsible arrows in the UI work
(alternatively conduct a test run of an exam yourself and verify the summary afterwards)

Verify Sidebar:
6. Go to Course (Student View) -> Exercises
7. See that the collapsible arrows in the sidebar for exercises still work

Verify Standardized Competencies
8. Go to Server Administration -> Feature Toggles -> Enable StandardizedCompetencies
9. Go to Server Administration -> StandardizedCompetencies
10. See that the collapsible arrows still work (left side)
11. Go to Course Management -> Competencies -> Import -> Import Standardized Competencies
12. See that the collapsible arrows still work (left side)

Testserver States

Note

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






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

Code Review

  • Code Review 1
  • Code Review 2

Manual Tests

  • Test 1
  • Test 2

Test Coverage

unchanged

@rstief rstief requested a review from a team as a code owner May 21, 2024 22:29
Copy link

coderabbitai bot commented May 21, 2024

Walkthrough

The recent update primarily focuses on refining the styling and HTML structure of various components within the application. Key modifications include the removal of the icon-container class from multiple HTML elements, the consolidation of CSS imports in TypeScript files, and the removal or adjustment of several CSS classes related to icon rotation and positioning. These changes aim to enhance the visual consistency and maintainability of the codebase.

Changes

File Path Change Summary
.../admin-import-standardized-competencies.component.html Removed icon-container class from a div element.
.../admin-import-standardized-competencies.component.ts Removed styleUrls property from @Component decorator.
.../competency-recommendation-detail.component.html Modified HTML template by removing icon-container class from a div element.
.../competency-recommendation-detail.component.scss Removed styles for .chevron-position and .rotate-icon classes; adjusted .card class styling.
.../collapsible-card.component.ts Consolidated styleUrls array into a single line in @Component decorator.
.../course-overview.scss Removed styles for .chevron-position, .rotate-icon, and .rotated classes.
.../discussion-section.component.scss Added border-radius property to card element styling.
.../header-course.component.scss Removed .rotate-icon class and added .rotate180 class for 180-degree rotation.
.../sidebar-accordion.component.html Removed icon-container class from a div element.
.../sidebar-accordion.component.scss Removed .rotate-icon class; retained .bg-module class styling.
.../knowledge-area-tree.component.html Removed icon-container class from a div element within a nested tree node.
.../knowledge-area-tree.component.scss Removed styles for chevron positioning and icon rotation; adjusted tree indentation padding.
.../global.scss Added styles for rotating chevron icons, including .rotate-icon, .rotated, and .chevron-position classes.

Recent Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between ee5274e and d39e2fc.
Files selected for processing (13)
  • src/main/webapp/app/admin/standardized-competencies/import/admin-import-standardized-competencies.component.html (1 hunks)
  • src/main/webapp/app/admin/standardized-competencies/import/admin-import-standardized-competencies.component.ts (1 hunks)
  • src/main/webapp/app/course/competencies/generate-competencies/competency-recommendation-detail.component.html (1 hunks)
  • src/main/webapp/app/course/competencies/generate-competencies/competency-recommendation-detail.component.scss (1 hunks)
  • src/main/webapp/app/exam/participate/summary/collapsible-card.component.ts (1 hunks)
  • src/main/webapp/app/overview/course-overview.scss (1 hunks)
  • src/main/webapp/app/overview/discussion-section/discussion-section.component.scss (1 hunks)
  • src/main/webapp/app/overview/header-course.component.scss (1 hunks)
  • src/main/webapp/app/shared/sidebar/sidebar-accordion/sidebar-accordion.component.html (1 hunks)
  • src/main/webapp/app/shared/sidebar/sidebar-accordion/sidebar-accordion.component.scss (1 hunks)
  • src/main/webapp/app/shared/standardized-competencies/knowledge-area-tree.component.html (1 hunks)
  • src/main/webapp/app/shared/standardized-competencies/knowledge-area-tree.component.scss (1 hunks)
  • src/main/webapp/content/scss/global.scss (1 hunks)
Files skipped from review due to trivial changes (12)
  • src/main/webapp/app/admin/standardized-competencies/import/admin-import-standardized-competencies.component.html
  • src/main/webapp/app/admin/standardized-competencies/import/admin-import-standardized-competencies.component.ts
  • src/main/webapp/app/course/competencies/generate-competencies/competency-recommendation-detail.component.scss
  • src/main/webapp/app/exam/participate/summary/collapsible-card.component.ts
  • src/main/webapp/app/overview/course-overview.scss
  • src/main/webapp/app/overview/discussion-section/discussion-section.component.scss
  • src/main/webapp/app/overview/header-course.component.scss
  • src/main/webapp/app/shared/sidebar/sidebar-accordion/sidebar-accordion.component.html
  • src/main/webapp/app/shared/sidebar/sidebar-accordion/sidebar-accordion.component.scss
  • src/main/webapp/app/shared/standardized-competencies/knowledge-area-tree.component.html
  • src/main/webapp/app/shared/standardized-competencies/knowledge-area-tree.component.scss
  • src/main/webapp/content/scss/global.scss
Additional Context Used
Path-based Instructions (1)
src/main/webapp/app/course/competencies/generate-competencies/competency-recommendation-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.

Additional comments not posted (2)
src/main/webapp/app/course/competencies/generate-competencies/competency-recommendation-detail.component.html (2)

4-4: The removal of the icon-container class aligns with the PR's goal to centralize icon styles. Ensure that the global styles provide the necessary styling previously offered by this class.


4-4: The use of the new Angular syntax @if is correctly implemented throughout the file. This modernizes the codebase and aligns with the latest Angular best practices.

Also applies to: 18-18, 26-26, 34-34, 42-42, 50-50


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 May 21, 2024
Copy link

⚠️ Unable to deploy to test servers ⚠️

The docker build needs to run through before deploying.

@github-actions github-actions bot added the deployment-error Added by deployment workflows if an error occured label May 21, 2024
@rstief rstief removed the deployment-error Added by deployment workflows if an error occured label May 21, 2024
Copy link
Contributor

@edkaya edkaya left a comment

Choose a reason for hiding this comment

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

code lgtm

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.

Thanks for reducing the code duplication 👍

Approving the code

Copy link
Contributor

@marlon-luca-bu marlon-luca-bu left a comment

Choose a reason for hiding this comment

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

Code LGTM 👍

@matthiaslehnertum matthiaslehnertum self-requested a review May 22, 2024 07:14
Copy link
Contributor

@matthiaslehnertum matthiaslehnertum 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 intended!

Copy link
Contributor

@Jan-Thurner Jan-Thurner 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
Collaborator

@MaximilianAnzinger MaximilianAnzinger 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

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.

Code LGTM

@krusche krusche added this to the 7.1.0 milestone May 22, 2024
@krusche krusche merged commit d29a52b into develop May 22, 2024
65 of 74 checks passed
@krusche krusche deleted the chore/development/add-global-rotate-icon-style branch May 22, 2024 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore client Pull requests that update TypeScript code. (Added Automatically!)
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

9 participants