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: Support opening instructor actions in new tab #9966

Conversation

laxerhd
Copy link
Contributor

@laxerhd laxerhd commented Dec 7, 2024

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

Not being able to open the Instructor actions in new tabs is frustrating and
does not follow the expected behavior of the dropdown item buttons.
Closes #9935.

Description

I changed the <button> to an anchor tag <a> to achieve a middle click and a right click on the dropdown elements.

Steps for Testing

Prerequisites:

  • 1 Instructor
  • 1 Course
  • 1 Programming Exercise
  1. Log in to Artemis
  2. Navigate to Course -> Exercise
  3. Click on Instructor actions
  4. Middle/Right click the dropdown items like View, Scores, etc.

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

instructor-actions-dropdown.mp4

Summary by CodeRabbit

  • Bug Fixes
    • Updated instructor actions dropdown buttons to anchor elements for improved accessibility and consistency.
  • Style
    • Minor formatting adjustments made to the component's HTML structure.

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

coderabbitai bot commented Dec 7, 2024

Walkthrough

The changes in this pull request primarily involve modifications to the HTML template of the course-exercise-details.component.html. The main alteration is the replacement of button elements with anchor (<a>) elements for instructor actions, specifically changing the closing tag from </button> to </a>. The overall structure and functionality of the component remain unchanged, with no new features introduced. Minor formatting adjustments were also made, but these do not impact the component's logic or behavior.

Changes

File Path Change Summary
src/main/webapp/app/overview/exercise-details/course-exercise-details.component.html Replaced button elements with anchor elements for instructor actions, maintaining attributes like routerLink. Minor formatting adjustments made.

Assessment against linked issues

Objective Addressed Explanation
Open tutor actions such as "view,score,participations,grading" in a new tab (#9935) The changes do not implement the ability to open actions in a new tab.

Possibly related PRs

Suggested labels

ready to merge, bugfix

Suggested reviewers

  • Hialus
  • JohannesStoehr
  • florian-glombik
  • sarpsahinalp

Tip

CodeRabbit's docstrings feature is now available as part of our Early Access Program! Simply use the command @coderabbitai generate docstrings to have CodeRabbit automatically generate docstrings for your pull request. This feature will be included in our Pro Plan when released.


📜 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 ed56cb5 and 860afb4.

📒 Files selected for processing (1)
  • src/main/webapp/app/overview/exercise-details/course-exercise-details.component.html (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/main/webapp/app/overview/exercise-details/course-exercise-details.component.html

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

🧹 Outside diff range and nitpick comments (1)
src/main/webapp/app/overview/exercise-details/course-exercise-details.component.html (1)

18-23: Add accessibility attributes to anchor tags.

The conversion from button to anchor tag successfully enables new tab functionality as requested. However, let's enhance accessibility:

Apply these improvements to the anchor tags:

-<a class="btn" [routerLink]="instructorActionItem.routerLink" ngbDropdownItem>
+<a class="btn" [routerLink]="instructorActionItem.routerLink" [href]="instructorActionItem.routerLink" role="button" ngbDropdownItem>

This change:

  • Adds href attribute for proper accessibility
  • Adds role="button" to maintain button semantics while using anchor tag
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 0005603 and ed56cb5.

📒 Files selected for processing (1)
  • src/main/webapp/app/overview/exercise-details/course-exercise-details.component.html (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
src/main/webapp/app/overview/exercise-details/course-exercise-details.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 (1)
src/main/webapp/app/overview/exercise-details/course-exercise-details.component.html (1)

Line range hint 1-1: Implementation aligns with requirements and guidelines.

The template correctly uses the new Angular control flow syntax (@if, @for) as specified in the coding guidelines, and the button-to-anchor conversion successfully implements the requested functionality for opening items in new tabs.

@laxerhd laxerhd changed the title Programming exercise: Swap button with achor tag for dropdown items Programming exercise: Support opening Instructor actions in new tab Dec 7, 2024
Copy link

There hasn't been any activity on this pull request recently. Therefore, this pull request has been automatically marked as stale and will be closed if no further activity occurs within seven days. Thank you for your contributions.

@github-actions github-actions bot added the stale label Dec 15, 2024
@laxerhd
Copy link
Contributor Author

laxerhd commented Dec 15, 2024

Please unstale.

@laxerhd laxerhd force-pushed the chore/programming-exercises/instructor-actions-new-tab branch from ed56cb5 to 860afb4 Compare December 15, 2024 12:43
@laxerhd laxerhd requested a review from a team as a code owner December 15, 2024 12:43
@maximiliansoelch maximiliansoelch changed the title Programming exercise: Support opening Instructor actions in new tab General: Support opening instructor actions in new tab Dec 16, 2024
@maximiliansoelch maximiliansoelch added exercise Pull requests that affect the corresponding module and removed stale labels Dec 16, 2024
@github-actions github-actions bot removed the exercise Pull requests that affect the corresponding module label Dec 16, 2024
@krusche krusche added this to the 7.8.0 milestone Dec 22, 2024
@krusche krusche merged commit 0d95a31 into ls1intum:develop Dec 22, 2024
15 of 17 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!)
Projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

Open tutor actions such as "view,score,participations,grading" in a new tab
3 participants