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

Feature: Delete Channel #432

Merged
merged 18 commits into from
Mar 5, 2025
Merged

Conversation

eylulnc
Copy link
Contributor

@eylulnc eylulnc commented Feb 25, 2025

Problem Description

The delete channel functionality was previously available only on the web version of Artemis. However, there was no implementation for Android, preventing moderators from deleting channels within the mobile app.

Changes

✔️ Implemented channel deletion functionality in the Conversation Settings screen.
✔️ Added a confirmation dialog before deletion to prevent accidental removals.
✔️ Integrated API call to delete the channel, ensuring consistency with the web version.
✔️ Updated UI elements to reflect the deletion process correctly.
✔️ Implemented end-to-end tests (ChannelSettingsE2eTest) to verify the functionality.

Steps for testing

PS - While I test Test User 8 (Tutor) and Test User 11 (Editor) had weird behavior but when I compare with the other Tutor and Editors everything looked okay. Maybe their role has been changed. Also in the web app they can see the buttons but other Tutors and Editors cant.

Test Case 1 - Student/Tutor/Editor

  1. Navigate to Conversation Settings of a channel.
  2. Verify the Delete Channel button is not visible for users without moderation rights.

Test Case 2 - Moderator

  1. Navigate to Conversation Settings of a channel.
  2. Verify the Delete Channel button is visible for users with moderation rights.
  3. Click Delete Channel, and ensure a confirmation dialog appears.
    Confirm deletion and check:
    - The channel is removed from the overview.
    - The user is redirected to conversation overview.

Screenshots

Screenshot 2025-02-25 at 13 14 00 Screenshot 2025-02-25 at 13 14 08

@eylulnc eylulnc self-assigned this Feb 25, 2025
@eylulnc eylulnc linked an issue Feb 25, 2025 that may be closed by this pull request
@eylulnc eylulnc added the ready for review This PR can be reviewed label Feb 27, 2025
Copy link
Collaborator

@FelberMartin FelberMartin left a comment

Choose a reason for hiding this comment

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

Nice, I tested the functionality, works as described :)

@eylulnc eylulnc requested a review from FelberMartin February 28, 2025 16:48
Copy link
Contributor

@julian-wls julian-wls left a comment

Choose a reason for hiding this comment

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

Nice change, worked as expected :)

Code lgtm, I agree with Martin regarding the points mentioned, should be good to go once the changes are made

@eylulnc eylulnc requested a review from FelberMartin March 1, 2025 00:40
@FelberMartin FelberMartin added ready to merge This PR can be merged and removed ready for review This PR can be reviewed labels Mar 1, 2025
@FelberMartin FelberMartin added the api calls Attention when merging because of the recent 8.0.0 breaking changes label Mar 5, 2025
@FelberMartin FelberMartin merged commit 74e9f5c into develop Mar 5, 2025
1 of 3 checks passed
@FelberMartin FelberMartin deleted the feature/communication/delete-channel branch March 5, 2025 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api calls Attention when merging because of the recent 8.0.0 breaking changes ready to merge This PR can be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add channel deletion option
3 participants