Skip to content

Communication: Add conversation and author selection to search bar #10661

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

Open
wants to merge 38 commits into
base: develop
Choose a base branch
from

Conversation

FelberMartin
Copy link
Contributor

@FelberMartin FelberMartin commented Apr 10, 2025

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 (e.g. using paging).
  • I strictly followed the principle of data economy for all client-server REST calls.
  • 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 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

With #10601 we adapted the messages endpoint to allow for searching messages with a specific author or in specific channels. This PR introduces the frontend changes to make this new functionality available in the web UI.

Description

  • In the search bar you can search for messages by an author with typing "by: ..." and selecting the author
  • We removed the filterToOwn checkbox. Instead you can search for "by:me" or "by:" with your username
  • Search within a conversation by typing "in: ..." or by clicking the search icon within a chat

Steps for Testing

Prerequisites:

  • 1 Student
  1. Log in to Artemis
  2. Go to the communication section of a course
  3. Play around with the new filter options by typing "by: ..." and "in: ..." and using the checkboxes in the search results
  4. See that everything works and looks as expected
  5. Go to any chat and click the search icon in the top right -> See that "in:" automatically gets filled into the global search and the search bar is focussed

Testserver States

You can manage test servers using Helios. Check environment statuses in the environment list. To deploy to a test server, go to the CI/CD page, find your PR or branch, and trigger the deployment.

Review Progress

Code Review

  • Code Review 1
  • Code Review 2

Manual Tests

  • Test 1
  • Test 2

Screenshots

image
image

Test Coverage

Client

Class/File Line Coverage Confirmation (assert/expect)
course-wide-search.component.ts 94.64%
conversation-header.component.ts 95.91%
conversation-messages.component.ts 94.07%
metis.util.ts 100%
metis.service.ts 90.33%
post.service.ts 78.43%
conversation-global-search.component.ts 82.18%
course-conversations.component.ts 92.22%
discussion-section.component.ts 93.98%

Summary by CodeRabbit

  • New Features

    • Introduced a global search component for conversations and users with advanced filtering by conversation and author.
    • Added UI controls for course-wide filtering and multi-criteria selection in conversation search.
    • Expanded localization with new search-related strings in English and German.
  • Refactor

    • Removed the deprecated "filter to own" feature, replacing it with explicit author selection for post filtering.
    • Updated filtering logic and configuration to support multiple selected conversations and authors.
    • Simplified search bar UI by removing redundant controls and deprecated search input handling.
    • Renamed event emitter in conversation header for clearer interaction handling.
    • Replaced previous course-wide search input with the new global search component in conversation views.
    • Updated post filtering to use author ID lists instead of a boolean own filter.
  • Bug Fixes

    • Enhanced filtering accuracy by excluding announcement channels from unresolved post queries.
  • Style

    • Added new styles for the global search component.
  • Tests

    • Updated tests to remove deprecated filters and cover new search and filtering behaviors.
    • Added tests for the global search component’s filtering, selection, and keyboard navigation.
  • Documentation

    • Enhanced localization and tooltips for search features.

@FelberMartin FelberMartin self-assigned this Apr 10, 2025
@github-project-automation github-project-automation bot moved this to Work In Progress in Artemis Development Apr 10, 2025
@github-actions github-actions bot added server Pull requests that update Java code. (Added Automatically!) client Pull requests that update TypeScript code. (Added Automatically!) communication Pull requests that affect the corresponding module labels Apr 10, 2025
@helios-aet helios-aet bot temporarily deployed to artemis-test5.artemis.cit.tum.de April 17, 2025 15:19 Inactive
PaRangger
PaRangger previously approved these changes Apr 17, 2025
Copy link
Contributor

@PaRangger PaRangger 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, works great! One thing i noticed was that when you search for yourself it does not show the indicator that the search result is part of the answer messages. I don't think that's a big issue though, since the user can likely remember they answered a certain question.

Bildschirmfoto 2025-04-17 um 17 27 47

@helios-aet helios-aet bot temporarily deployed to artemis-test2.artemis.cit.tum.de April 17, 2025 18:52 Inactive
@helios-aet helios-aet bot temporarily deployed to artemis-test3.artemis.cit.tum.de April 18, 2025 10:02 Inactive
@github-actions github-actions bot added the plagiarism Pull requests that affect the corresponding module label Apr 18, 2025
@helios-aet helios-aet bot temporarily deployed to artemis-test3.artemis.cit.tum.de April 18, 2025 10:23 Inactive
Copy link

End-to-End (E2E) Test Results Summary

TestsPassed ☑️Skipped ⚠️Failed ❌️Time ⏱
End-to-End (E2E) Test Report201 ran196 passed3 skipped2 failed53m 3s 99ms
TestResultTime ⏱
End-to-End (E2E) Test Report
e2e/course/CourseMessages.spec.ts
ts.Course messages › Channel messages › Write/edit/delete message in channel › Student should be able to edit message in channel❌ failure28s 43ms
e2e/exercise/programming/ProgrammingExerciseStaticCodeAnalysis.spec.ts
ts.Static code analysis tests › Configures SCA grading and makes a successful submission with SCA errors❌ failure1m 46s 534ms

@helios-aet helios-aet bot temporarily deployed to artemis-test6.artemis.cit.tum.de April 18, 2025 12:20 Inactive
@helios-aet helios-aet bot temporarily deployed to artemis-test5.artemis.cit.tum.de April 19, 2025 07:12 Inactive
eylulnc
eylulnc previously approved these changes Apr 19, 2025
Copy link
Contributor

@eylulnc eylulnc left a comment

Choose a reason for hiding this comment

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

Tested in TS5, works as expected. ✅
Screenshot 2025-04-19 at 09 23 14

HawKhiem
HawKhiem previously approved these changes Apr 19, 2025
Copy link

@HawKhiem HawKhiem 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. Works as expected

image

image

Copy link

End-to-End (E2E) Test Results Summary

TestsPassed ☑️Skipped ⚠️Failed ❌️Time ⏱
End-to-End (E2E) Test Report201 ran196 passed3 skipped2 failed48m 46s 801ms
TestResultTime ⏱
End-to-End (E2E) Test Report
e2e/course/CourseMessages.spec.ts
ts.Course messages › Channel messages › Write/edit/delete message in channel › Student should be able to edit message in channel❌ failure2m 3s 56ms
e2e/exercise/programming/ProgrammingExerciseStaticCodeAnalysis.spec.ts
ts.Static code analysis tests › Configures SCA grading and makes a successful submission with SCA errors❌ failure1m 45s 676ms

@FelberMartin FelberMartin dismissed stale reviews from PaRangger, eylulnc, and HawKhiem via c04dda7 April 24, 2025 08:23
@FelberMartin
Copy link
Contributor Author

FelberMartin commented Apr 24, 2025

One thing i noticed was that when you search for yourself it does not show the indicator that the search result is part of the answer messages. I don't think that's a big issue though, since the user can likely remember they answered a certain question.

Hi Paul, thank you for your review and pointing out this inconsistency! I included a small fix for this now :D

Copy link

End-to-End (E2E) Test Results Summary

TestsPassed ☑️Skipped ⚠️Failed ❌️Time ⏱
End-to-End (E2E) Test Report201 ran196 passed3 skipped2 failed51m 39s 165ms
TestResultTime ⏱
End-to-End (E2E) Test Report
e2e/course/CourseMessages.spec.ts
ts.Course messages › Channel messages › Write/edit/delete message in channel › Student should be able to edit message in channel❌ failure2m 3s 41ms
e2e/exercise/programming/ProgrammingExerciseStaticCodeAnalysis.spec.ts
ts.Static code analysis tests › Configures SCA grading and makes a successful submission with SCA errors❌ failure1m 44s 833ms

@helios-aet helios-aet bot temporarily deployed to artemis-test5.artemis.cit.tum.de April 24, 2025 09:11 Inactive
PaRangger
PaRangger previously approved these changes Apr 24, 2025
Copy link
Contributor

@PaRangger PaRangger left a comment

Choose a reason for hiding this comment

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

Retested on TS5, works great! Thanks for implementing the feedback! ✅

eylulnc
eylulnc previously approved these changes Apr 24, 2025
Copy link
Contributor

@eylulnc eylulnc left a comment

Choose a reason for hiding this comment

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

Retested on TS5, works as described.

@helios-aet helios-aet bot temporarily deployed to artemis-test1.artemis.cit.tum.de April 25, 2025 09:32 Inactive
HawKhiem
HawKhiem previously approved these changes Apr 25, 2025
Copy link

@HawKhiem HawKhiem left a comment

Choose a reason for hiding this comment

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

Retested on TS1. Reapprove

…arch-bar

# Conflicts:
#	src/main/webapp/app/communication/shared/course-conversations/course-conversations.component.html
@FelberMartin FelberMartin dismissed stale reviews from HawKhiem, eylulnc, and PaRangger via a9362be April 26, 2025 11:07
Copy link

End-to-End (E2E) Test Results Summary

TestsPassed ☑️Skipped ⚠️Failed ❌️Time ⏱
End-to-End (E2E) Test Report201 ran196 passed3 skipped2 failed51m 28s 562ms
TestResultTime ⏱
End-to-End (E2E) Test Report
e2e/course/CourseMessages.spec.ts
ts.Course messages › Channel messages › Write/edit/delete message in channel › Student should be able to edit message in channel❌ failure2m 3s 302ms
e2e/exercise/programming/ProgrammingExerciseStaticCodeAnalysis.spec.ts
ts.Static code analysis tests › Configures SCA grading and makes a successful submission with SCA errors❌ failure1m 43s 984ms

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!) communication Pull requests that affect the corresponding module plagiarism Pull requests that affect the corresponding module ready for review server Pull requests that update Java code. (Added Automatically!) tests
Projects
Status: Ready For Review
Status: Todo
Development

Successfully merging this pull request may close these issues.

5 participants