Artemis icon indicating copy to clipboard operation
Artemis copied to clipboard

`Communication`: Show author's role in course on posting header

Open canberkanar opened this issue 2 years ago • 4 comments

Checklist

General

Server

  • [x] I followed the coding and design guidelines.
  • [x] I added multiple integration tests (Spring) related to the features (with a high test coverage).
  • [x] I implemented the changes with a good performance and prevented too many database calls.
  • [x] I documented the Java code using JavaDoc style.

Client

  • [x] I followed the coding and design guidelines and ensured that the layout is responsive.
  • [x] 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.
  • [x] I added multiple integration tests (Jest) related to the features (with a high test coverage), while following the test guidelines.
  • [x] I documented the TypeScript code using JSDoc style.
  • [x] I added multiple screenshots/screencasts of my UI changes.
  • [x] I translated all newly inserted strings into English and German.

Motivation and Context

Currently, many communication tools like Zulip allow setting authorities to users. This allows others to easily understand the author's role and assess their trustworthiness. Having this feature would be beneficial in Artemis.

Description

We add an icon in front of the author name in all Postings with a corresponding tooltip. The icon reveals the user's highest authority for that course and provides information about that user's role within its' tooltip. You are very welcome to suggest changes to these explanations and especially their German translations. :)

Steps for Testing

Prerequisites:

  • 1 Instructor
  • 1 Student
  • 1 Tutor
  • 1 Editor
  • 1 Course with Postings enabled
  1. Log in to Artemis
  2. Navigate to Course Communication
  3. Make sure that the corresponding icon with the appropriate tooltip is displayed before the author name for each Posting. Editors and Tutors are assigned the "Tutor" icon.

Review Progress

Code Review

  • [x] Review 1
  • [x] Review 2

Manual Tests

  • [x] Test 1
  • [x] Test 2

Test Coverage

Class/File Branch Line
PostService.java 81% 98%
posting-header.directive.ts 92.3% 100%

Screenshots

image https://user-images.githubusercontent.com/67344158/181029286-56e8d9d3-4e85-40ec-b16e-7a39c55fec47.mp4

canberkanar avatar Jul 25 '22 18:07 canberkanar

tested on ts2: When creating a new post, the icons are not correctly shown in the preview (they are all user icons - but the icon of the Admin Test Account should of course be the instructor icon): users

And if I create a new post with an tutor account, first it is also displayed with an user account. Once I refresh the page, it shows the correct icon.

Nice catch! Thanks 👍🏻

canberkanar avatar Jul 26 '22 18:07 canberkanar

Code looks good, thanks for integrating the review.

Thank you very much for your feedback, it helped a lot!

canberkanar avatar Jul 27 '22 10:07 canberkanar

I agree with @JohannesStoehr regarding user vs. student. Our documentation also talks about students (whereas a user is anyone with an account).

Term was updated, thanks 👍🏻

canberkanar avatar Jul 28 '22 15:07 canberkanar

Code looks good.

One thing you could think about is changing the name of "user" to "student", which would be a bit more fitting in my opinion

It makes sense to me as well, so I have updated the term :)

canberkanar avatar Jul 28 '22 15:07 canberkanar