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

Communication: Add course-wide channel option #10052

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

Conversation

asliayk
Copy link
Contributor

@asliayk asliayk commented Dec 19, 2024

Checklist

General

Server

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 integration tests (Jest) related to the features (with a high test coverage), while following the test guidelines.
  • I added multiple screenshots/screencasts of my UI changes.
  • I translated all newly inserted strings into English and German.

Motivation and Context

Description

  • A new option, course scope, has been added to the create channel dialog. Users can now choose between course-wide and selective channels, with the default selection set to selective.
  • The issue with consecutive channel creation has been resolved by adding a channel name check using distinctUntilChanged.

Steps for Testing

Prerequisites:

  • 1 Instructor
  • 1 Course with Communication enabled
  1. Log in to Artemis
  2. Navigate to Communication section of a course
  3. Click on the plus button at the top of the sidebar and select create channel option.
  4. Observe the new Channel Scope option, and select Course-wide to create a channel.
  5. Verify that all course members are automatically added to the newly created channel.
  6. Attempt to create another channel and confirm that the process is successful.

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

Code Review

  • Code Review 1
  • Code Review 2

Manual Tests

  • Test 1
  • Test 2

Test Coverage

Class/File Line Coverage Confirmation (assert/expect)
course-conversations.component.ts 90.76% ✅ ❌
channel-form.component.ts 88.57% ✅ ❌
channels-create-dialog.component.ts 100%

Screenshots

create channel dialog with new option
image

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features

    • Introduced the option to create course-wide channels with a new radio button in the channel creation form.
    • Enhanced the sidebar configuration to manage visibility settings for various channel types.
    • Added support for course-wide channels in the channel creation process.
    • New test case added to verify the creation of public course-wide channels.
  • Bug Fixes

    • Improved logic for channel action emissions to reduce unnecessary updates.
  • Documentation

    • Updated localization files to include new entries for course-wide channels in both German and English.
  • Tests

    • Expanded test coverage for channel creation and management, including new tests for course-wide channel functionality.
    • Added tests to validate the functionality of the new course-wide channel feature.

@asliayk asliayk added tests client Pull requests that update TypeScript code. (Added Automatically!) component:Communication labels Dec 19, 2024
@asliayk asliayk self-assigned this Dec 19, 2024
@github-actions github-actions bot added server Pull requests that update Java code. (Added Automatically!) playwright communication Pull requests that affect the corresponding module labels Dec 19, 2024
@asliayk asliayk temporarily deployed to artemis-test4.artemis.cit.tum.de December 19, 2024 20:52 — with GitHub Actions Inactive
@asliayk asliayk marked this pull request as ready for review December 19, 2024 21:07
@asliayk asliayk requested a review from a team as a code owner December 19, 2024 21:07
Copy link

coderabbitai bot commented Dec 19, 2024

Warning

There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure.

🔧 pmd (7.8.0)
src/main/java/de/tum/cit/aet/artemis/communication/web/conversation/ChannelResource.java

The following rules are missing or misspelled in your ruleset file category/vm/bestpractices.xml: BooleanInstantiation, DontImportJavaLang, DuplicateImports, EmptyFinallyBlock, EmptyIfStmt, EmptyInitializer, EmptyStatementBlock, EmptyStatementNotInLoop, EmptySwitchStatements, EmptySynchronizedBlock, EmptyTryBlock, EmptyWhileStmt, ExcessiveClassLength, ExcessiveMethodLength, ImportFromSamePackage, MissingBreakInSwitch, SimplifyBooleanAssertion. Please check your ruleset configuration.

src/test/java/de/tum/cit/aet/artemis/communication/ChannelIntegrationTest.java

The following rules are missing or misspelled in your ruleset file category/vm/bestpractices.xml: BooleanInstantiation, DontImportJavaLang, DuplicateImports, EmptyFinallyBlock, EmptyIfStmt, EmptyInitializer, EmptyStatementBlock, EmptyStatementNotInLoop, EmptySwitchStatements, EmptySynchronizedBlock, EmptyTryBlock, EmptyWhileStmt, ExcessiveClassLength, ExcessiveMethodLength, ImportFromSamePackage, MissingBreakInSwitch, SimplifyBooleanAssertion. Please check your ruleset configuration.

Walkthrough

This pull request introduces support for course-wide channels in the Artemis communication system. The changes span multiple components across frontend and backend, enabling users to create channels that automatically include all course participants. The implementation adds a new option during channel creation to specify whether a channel should be course-wide, with corresponding updates to form components, localization files, and backend resource handling.

Changes

File Change Summary
src/main/java/de/tum/cit/aet/artemis/communication/web/conversation/ChannelResource.java Added support for setting isCourseWide property during channel creation
src/main/webapp/app/overview/course-conversations/... Updated components to handle course-wide channel creation, including form controls, dialogs, and event handling
src/main/webapp/i18n/de/conversation.json Added German translations for course-wide channel options
src/main/webapp/i18n/en/conversation.json Added English translations for course-wide channel options
Test files Updated test cases to include isCourseWide property and new test scenarios

Assessment against linked issues

Objective Addressed Explanation
Support for Course-wide Group Chats [#10012]
Consecutive Channel Creation [#10049] No direct evidence of fixing the consecutive channel creation issue

Suggested labels

ready to merge

Suggested reviewers

  • HawKhiem
  • FelberMartin
  • SimonEntholzer
  • anian03
  • sachmii

Possibly related PRs


📜 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 ca8f79e and 7b17a69.

📒 Files selected for processing (5)
  • src/main/java/de/tum/cit/aet/artemis/communication/web/conversation/ChannelResource.java (1 hunks)
  • src/main/webapp/app/overview/course-conversations/course-conversations.component.ts (1 hunks)
  • src/main/webapp/i18n/de/conversation.json (2 hunks)
  • src/main/webapp/i18n/en/conversation.json (2 hunks)
  • src/test/java/de/tum/cit/aet/artemis/communication/ChannelIntegrationTest.java (6 hunks)
🚧 Files skipped from review as they are similar to previous changes (5)
  • src/main/java/de/tum/cit/aet/artemis/communication/web/conversation/ChannelResource.java
  • src/main/webapp/i18n/en/conversation.json
  • src/main/webapp/app/overview/course-conversations/course-conversations.component.ts
  • src/main/webapp/i18n/de/conversation.json
  • src/test/java/de/tum/cit/aet/artemis/communication/ChannelIntegrationTest.java

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: 3

🧹 Nitpick comments (6)
src/main/webapp/app/overview/course-conversations/dialogs/channels-create-dialog/channel-form/channel-form.component.ts (1)

56-59: Fix getter method name

The getter method name has a typo: isisCourseWideChannelControl should be isCourseWideChannelControl to maintain consistency with other getter methods.

-    get isisCourseWideChannelControl() {
+    get isCourseWideChannelControl() {
         return this.form.get('isCourseWideChannel');
     }
src/test/javascript/spec/component/overview/course-conversations/dialogs/channels-create-dialog/channel-form/channel-form.component.spec.ts (1)

77-77: Consider testing both true and false states.

The test suite only verifies the false state of isCourseWideChannel. Add test cases for the true state to ensure both scenarios work correctly.

Also applies to: 100-100

src/test/javascript/spec/component/overview/course-conversations/dialogs/channels-create-dialog/channels-create-dialog.component.spec.ts (1)

51-56: Consider enhancing initialization test.

While the test verifies basic initialization, consider adding assertions for default values of all channel properties, including isCourseWideChannel.

src/main/webapp/app/overview/course-conversations/dialogs/channels-create-dialog/channel-form/channel-form.component.html (1)

68-92: Consider UX improvements for course-wide channel selection.

The implementation is technically sound, but consider these UX improvements:

  1. Add a warning or confirmation when selecting course-wide channel, as it affects all course participants
  2. Consider disabling the public/private option when course-wide is selected, as course-wide channels might need to follow specific visibility rules
src/test/playwright/e2e/course/CourseMessages.spec.ts (1)

78-89: LGTM: Good coverage for course-wide channel creation, consider additional test cases.

The test effectively verifies the basic functionality of creating course-wide channels. However, consider adding tests for:

  • Creating private course-wide channels
  • Verifying that all course participants are automatically added
  • Testing permission restrictions (e.g., students shouldn't be able to create course-wide channels)
src/main/java/de/tum/cit/aet/artemis/communication/web/conversation/ChannelResource.java (1)

235-235: Consider adding validation for course-wide channels

To prevent potential misuse, consider adding validation to ensure that course-wide channels cannot also be announcement channels, as this combination might lead to notification spam for all course members.

 channelToCreate.setIsCourseWide(channelDTO.getIsCourseWide());
+if (channelToCreate.getIsCourseWide() && channelToCreate.getIsAnnouncementChannel()) {
+    throw new BadRequestAlertException("Course-wide channels cannot be announcement channels", CHANNEL_ENTITY_NAME, "channelInvalidCombination");
+}
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0d0a9e9 and ca8f79e.

📒 Files selected for processing (14)
  • src/main/java/de/tum/cit/aet/artemis/communication/web/conversation/ChannelResource.java (1 hunks)
  • src/main/webapp/app/overview/course-conversations/course-conversations.component.ts (1 hunks)
  • src/main/webapp/app/overview/course-conversations/dialogs/channels-create-dialog/channel-form/channel-form.component.html (1 hunks)
  • src/main/webapp/app/overview/course-conversations/dialogs/channels-create-dialog/channel-form/channel-form.component.ts (6 hunks)
  • src/main/webapp/app/overview/course-conversations/dialogs/channels-create-dialog/channels-create-dialog.component.html (2 hunks)
  • src/main/webapp/app/overview/course-conversations/dialogs/channels-create-dialog/channels-create-dialog.component.ts (2 hunks)
  • src/main/webapp/i18n/de/conversation.json (2 hunks)
  • src/main/webapp/i18n/en/conversation.json (2 hunks)
  • src/test/java/de/tum/cit/aet/artemis/communication/AbstractConversationTest.java (1 hunks)
  • src/test/java/de/tum/cit/aet/artemis/communication/ChannelIntegrationTest.java (6 hunks)
  • src/test/javascript/spec/component/overview/course-conversations/dialogs/channels-create-dialog/channel-form/channel-form.component.spec.ts (3 hunks)
  • src/test/javascript/spec/component/overview/course-conversations/dialogs/channels-create-dialog/channels-create-dialog.component.spec.ts (5 hunks)
  • src/test/playwright/e2e/course/CourseMessages.spec.ts (1 hunks)
  • src/test/playwright/support/pageobjects/course/CourseMessagesPage.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (11)
src/test/java/de/tum/cit/aet/artemis/communication/AbstractConversationTest.java (1)

Pattern src/test/java/**/*.java: test_naming: descriptive; test_size: small_specific; fixed_data: true; junit5_features: true; assert_use: assertThat; assert_specificity: true; archunit_use: enforce_package_rules; db_query_count_tests: track_performance; util_service_factory_pattern: true; avoid_db_access: true; mock_strategy: static_mocks; context_restart_minimize: true

src/main/webapp/app/overview/course-conversations/dialogs/channels-create-dialog/channels-create-dialog.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.

src/main/webapp/i18n/de/conversation.json (1)

Pattern src/main/webapp/i18n/de/**/*.json: German language translations should be informal (dutzen) and should never be formal (sietzen). So the user should always be addressed with "du/dein" and never with "sie/ihr".

src/main/webapp/app/overview/course-conversations/dialogs/channels-create-dialog/channel-form/channel-form.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.

src/main/webapp/app/overview/course-conversations/course-conversations.component.ts (1)

Pattern src/main/webapp/**/*.ts: angular_style:https://angular.io/guide/styleguide;methods_in_html:false;lazy_loading:true;code_reuse:true;tests:meaningful;types:PascalCase;enums:PascalCase;funcs:camelCase;props:camelCase;no_priv_prefix:true;strings:single_quotes;localize:true;btns:functionality;links:navigation;icons_text:newline;labels:associate;code_style:arrow_funcs,curly_braces,open_braces_same_line,indent_4;memory_leak_prevention:true;routes:naming_schema;chart_framework:ngx-charts;responsive_layout:true

src/main/java/de/tum/cit/aet/artemis/communication/web/conversation/ChannelResource.java (1)

Pattern src/main/java/**/*.java: naming:CamelCase; principles:{single_responsibility,small_methods,no_duplication}; db:{perf_queries,datetime_not_timestamp}; rest:{stateless,singleton,delegate_logic,http_only,minimal_dtos}; dtos:{java_records,no_entities,min_data,single_resp}; di:constructor_injection; kiss:simple_code; file_handling:os_indep_paths; practices:{least_access,avoid_transactions,code_reuse,static_member_ref,prefer_primitives}; sql:{param_annotation,uppercase,avoid_subqueries};java:avoid_star_imports

src/main/webapp/app/overview/course-conversations/dialogs/channels-create-dialog/channel-form/channel-form.component.ts (1)

Pattern src/main/webapp/**/*.ts: angular_style:https://angular.io/guide/styleguide;methods_in_html:false;lazy_loading:true;code_reuse:true;tests:meaningful;types:PascalCase;enums:PascalCase;funcs:camelCase;props:camelCase;no_priv_prefix:true;strings:single_quotes;localize:true;btns:functionality;links:navigation;icons_text:newline;labels:associate;code_style:arrow_funcs,curly_braces,open_braces_same_line,indent_4;memory_leak_prevention:true;routes:naming_schema;chart_framework:ngx-charts;responsive_layout:true

src/test/javascript/spec/component/overview/course-conversations/dialogs/channels-create-dialog/channel-form/channel-form.component.spec.ts (1)

Pattern src/test/javascript/spec/**/*.ts: jest: true; mock: NgMocks; bad_practices: avoid_full_module_import; perf_improvements: mock_irrelevant_deps; service_testing: mock_http_for_logic; no_schema: avoid_NO_ERRORS_SCHEMA; expectation_specificity: true; solutions: {boolean: toBeTrue/False, reference: toBe, existence: toBeNull/NotNull, undefined: toBeUndefined, class_obj: toContainEntries/toEqual, spy_calls: {not_called: not.toHaveBeenCalled, once: toHaveBeenCalledOnce, with_value: toHaveBeenCalledWith|toHaveBeenCalledExactlyOnceWith}}

src/main/webapp/app/overview/course-conversations/dialogs/channels-create-dialog/channels-create-dialog.component.ts (1)

Pattern src/main/webapp/**/*.ts: angular_style:https://angular.io/guide/styleguide;methods_in_html:false;lazy_loading:true;code_reuse:true;tests:meaningful;types:PascalCase;enums:PascalCase;funcs:camelCase;props:camelCase;no_priv_prefix:true;strings:single_quotes;localize:true;btns:functionality;links:navigation;icons_text:newline;labels:associate;code_style:arrow_funcs,curly_braces,open_braces_same_line,indent_4;memory_leak_prevention:true;routes:naming_schema;chart_framework:ngx-charts;responsive_layout:true

src/test/javascript/spec/component/overview/course-conversations/dialogs/channels-create-dialog/channels-create-dialog.component.spec.ts (1)

Pattern src/test/javascript/spec/**/*.ts: jest: true; mock: NgMocks; bad_practices: avoid_full_module_import; perf_improvements: mock_irrelevant_deps; service_testing: mock_http_for_logic; no_schema: avoid_NO_ERRORS_SCHEMA; expectation_specificity: true; solutions: {boolean: toBeTrue/False, reference: toBe, existence: toBeNull/NotNull, undefined: toBeUndefined, class_obj: toContainEntries/toEqual, spy_calls: {not_called: not.toHaveBeenCalled, once: toHaveBeenCalledOnce, with_value: toHaveBeenCalledWith|toHaveBeenCalledExactlyOnceWith}}

src/test/java/de/tum/cit/aet/artemis/communication/ChannelIntegrationTest.java (1)

Pattern src/test/java/**/*.java: test_naming: descriptive; test_size: small_specific; fixed_data: true; junit5_features: true; assert_use: assertThat; assert_specificity: true; archunit_use: enforce_package_rules; db_query_count_tests: track_performance; util_service_factory_pattern: true; avoid_db_access: true; mock_strategy: static_mocks; context_restart_minimize: true

🔇 Additional comments (20)
src/main/webapp/app/overview/course-conversations/dialogs/channels-create-dialog/channels-create-dialog.component.html (2)

7-7: LGTM: Translation key usage for course-wide channel title

The implementation correctly uses the translation pipe and conditional rendering for the course-wide channel title.


21-21: LGTM: Event binding for course-wide channel changes

The event binding follows Angular best practices and maintains consistency with existing channel type change handlers.

src/main/webapp/app/overview/course-conversations/dialogs/channels-create-dialog/channels-create-dialog.component.ts (3)

22-23: LGTM: Property initialization for course-wide channel

The boolean property is correctly initialized with a default value of false.


32-35: LGTM: Event handler implementation

The handler follows the same pattern as other channel property handlers, maintaining consistency.


41-46: LGTM: Channel creation logic update

The implementation correctly handles the course-wide channel property during channel creation.

src/main/webapp/app/overview/course-conversations/dialogs/channels-create-dialog/channel-form/channel-form.component.ts (2)

34-34: Nice use of modern Angular syntax!

The implementation uses the new output() function introduced in recent Angular versions, which is more concise than the traditional EventEmitter.


106-110: LGTM: Reactive form value changes handling

The implementation correctly uses takeUntil for proper cleanup and follows reactive programming patterns.

src/test/javascript/spec/component/overview/course-conversations/dialogs/channels-create-dialog/channels-create-dialog.component.spec.ts (2)

18-21: LGTM! Good use of Angular's new output syntax.

The component correctly implements the new output properties using Angular's modern syntax.


80-85: LGTM! Good test coverage for channel scope changes.

The test properly verifies the behavior of the course-wide channel toggle.

src/main/webapp/app/overview/course-conversations/dialogs/channels-create-dialog/channel-form/channel-form.component.html (2)

86-90: LGTM! Good use of help text.

The help text implementation follows the established pattern and uses proper translation keys.


73-74: Review default selection behavior.

The checked attribute is set on the course-wide option (true), but the form control might initialize with false. This could lead to a mismatch between the visual state and the actual form value.

src/main/webapp/i18n/en/conversation.json (1)

211-211: LGTM! Clear and consistent translations.

The added translations for the course-wide channel feature are well-structured and provide clear explanations to users.

Also applies to: 240-245

src/test/playwright/support/pageobjects/course/CourseMessagesPage.ts (1)

115-120: LGTM! Well-structured implementation.

The new setCourseWideChannel method follows the established patterns:

  • Consistent with other setter methods in the class
  • Clear JSDoc documentation
  • Uses consistent selector pattern
src/test/java/de/tum/cit/aet/artemis/communication/AbstractConversationTest.java (2)

183-183: LGTM: Setting default behavior for course-wide channels.

The addition of setIsCourseWide(false) ensures that channels are not course-wide by default, maintaining backward compatibility and allowing explicit opt-in for course-wide channels.


Line range hint 186-196: LGTM: Well-structured helper method for course-wide channels.

The new createCourseWideChannel method provides a clean, dedicated way to create course-wide channels in tests. The method sets appropriate defaults and follows existing patterns.

src/main/webapp/app/overview/course-conversations/course-conversations.component.ts (2)

Line range hint 65-77: LGTM: Well-structured sidebar visibility defaults.

The DEFAULT_SHOW_ALWAYS constant provides clear, logical defaults for channel visibility in the sidebar, following TypeScript naming conventions and covering all channel categories.


246-246: LGTM: Enhanced duplicate prevention in channel actions.

The addition of prev.channel.name === curr.channel.name to the distinctUntilChanged operator improves performance by preventing duplicate emissions when only the channel name changes.

src/main/java/de/tum/cit/aet/artemis/communication/web/conversation/ChannelResource.java (2)

235-235: LGTM: Course-wide channel property is properly set

The implementation correctly sets the course-wide property from the DTO, maintaining consistency with other channel properties.


Line range hint 1020-1020: LGTM: Proper access control for course-wide channels

The implementation correctly allows access to course-wide channels for all course members, following security best practices.

src/test/java/de/tum/cit/aet/artemis/communication/ChannelIntegrationTest.java (1)

937-937: LGTM: Feedback channels correctly set as non-course-wide

The tests properly verify that feedback channels are not course-wide by default, which is the expected behavior.

Also applies to: 962-962

coderabbitai[bot]
coderabbitai bot previously approved these changes Dec 19, 2024
Copy link

@sachmii sachmii 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 TS4, not sure if this is intended but when selecting "course-wide channel" and "announcement channel" the usual chat icon appears in the sidebar and the # + announcement icon at the top next to the channel title, see image.

Bildschirmfoto 2024-12-20 um 13 11 47

SimonEntholzer
SimonEntholzer previously approved these changes Dec 21, 2024
Copy link
Contributor

@SimonEntholzer SimonEntholzer 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 Ts4, and works as expected. I agree with @sachmii here, that the # and announcement icon at the same time are a bit weird, but since this is unrelated to the change, and also happens on other testservers, genreally when creating announcement channels I'd propose to fix this in a follow up?

HawKhiem
HawKhiem previously approved these changes Dec 25, 2024
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 TS3. Works as expected

@asliayk
Copy link
Contributor Author

asliayk commented Dec 25, 2024

see my inline feedback: channel type and channel scope should only be visible to moderators. We need corresponding checks in the ChannelResource to make sure normal members cannot create announcement or course wide channels

Since the "create channel" functionality is configured in the code to require at least tutor permissions, I set the "create channel" option to be invisible to students. As a result, the "create channel" dialog is already inaccessible to students, meaning they cannot open it. I tested this with test accounts for different roles: tutors, editors, and instructors can open the "create channel" dialog. Therefore, I didn’t need to add a role check specifically for the course-wide option.

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 TS1. Works generally as expected, however creating a channel, deleting it and then wanting to create a new channel with the same name (either same or different settings) does not work though

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 component:Communication feature playwright ready for review server Pull requests that update Java code. (Added Automatically!) tests
Projects
Status: Ready For Review
Status: In Progress
Development

Successfully merging this pull request may close these issues.

Communication: Cannot create channels consecutively Communication: Support for Course-wide Group Chats
8 participants