Skip to content

feat: buldelete ban in forum UI#18

Merged
mraman-2U merged 1 commit intomasterfrom
mraman-2U/buldelete-ban-forum-UI
Mar 4, 2026
Merged

feat: buldelete ban in forum UI#18
mraman-2U merged 1 commit intomasterfrom
mraman-2U/buldelete-ban-forum-UI

Conversation

@mraman-2U
Copy link
Member

This pull request introduces enhancements to moderation capabilities, filtering options, and user interface improvements for discussions. The main changes include adding new post status filters and actions for moderation, updating the ActionsDropdown to support submenus for complex moderation actions, and introducing a dismissible spam warning banner for users. Additionally, prop types are updated to support passing post data to alert components.

Moderation and Filtering Enhancements:

  • Added new post status filters (ACTIVE, DELETED) to PostsStatusFilter and integrated them into the FilterBar component, allowing users to filter posts by active or deleted status. (src/data/constants.js [1] src/components/FilterBar.jsx [2]
  • Expanded moderation actions in ContentActions to include restore, mute, ban, enhanced delete, and organization/course-specific actions, enabling more granular moderation control. (src/data/constants.js src/data/constants.jsR54-R79)
  • Updated ActionsDropdown to support submenus for complex moderation actions, including navigation between main actions and sub-actions, and improved accessibility with new icons and test IDs. (src/discussions/common/ActionsDropdown.jsx [1] [2] [3] [4]

User Interface Improvements:

  • Introduced a new SpamWarningBanner component with localStorage-based dismissal and comprehensive tests, warning users about potential spam and phishing attempts. (src/components/SpamWarningBanner.jsx [1] src/components/SpamWarningBanner.test.jsx [2] src/components/index.js [3]
  • Updated prop types for AlertBanner and AlertBar components to accept and pass along postData, improving their flexibility and data handling. (src/discussions/common/AlertBanner.jsx [1] [2] [3] [4] [5]; src/discussions/common/AlertBar.jsx [6] [7] [8] [9]

Additional Data and Sorting Options:

  • Added a deleted-based ordering option (BY_DELETED) to LearnersOrdering, allowing sorting by deletion status. (src/data/constants.js src/data/constants.jsR154)

These changes collectively enhance moderation workflows, improve user experience, and provide additional filtering and sorting capabilities in the discussions feature.### Description

Include a description of your changes here, along with a link to any relevant Jira tickets and/or GitHub issues.

How Has This Been Tested?

Please describe in detail how you tested your changes.

Screenshots/sandbox (optional):

Include a link to the sandbox for design changes or screenshot for before and after. Remove this section if it's not applicable.

Before After

Merge Checklist

  • If your update includes visual changes, have they been reviewed by a designer? Send them a link to the Sandbox, if applicable.
  • Is there adequate test coverage for your changes?

Post-merge Checklist

  • Deploy the changes to prod after verifying on stage or ask @openedx/edx-infinity to do it.
  • 🎉 🙌 Celebrate! Thanks for your contribution.

@mraman-2U mraman-2U force-pushed the mraman-2U/buldelete-ban-forum-UI branch 2 times, most recently from c017541 to 4902a1d Compare February 17, 2026 06:38
@mraman-2U mraman-2U marked this pull request as ready for review February 19, 2026 04:54
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request introduces comprehensive ban and bulk delete moderation capabilities for the discussions forum UI. The changes add support for banning users at course and organization scopes, bulk deleting user content with optional ban actions, and UI enhancements including submenu support in action dropdowns and various moderation-related banners.

Changes:

  • Added ban/unban functionality with course and organization-level scopes, including scope-aware permission logic via banUtils.js
  • Implemented bulk delete/undelete operations for user discussion activity across course and organization scopes
  • Enhanced ActionsDropdown component with submenu support for complex moderation actions
  • Added UI components for banned user indicators, moderation modals, and audit trail information

Reviewed changes

Copilot reviewed 54 out of 54 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
src/discussions/utils/banUtils.js Core utility functions for ban scope logic and state management
src/data/api/moderation.js Centralized moderation API functions for ban, unban, and bulk operations
src/discussions/utils.js Updated permission checks to support ban actions and prevent self-targeting
src/discussions/common/ActionsDropdown.jsx Added submenu navigation for complex moderation action hierarchies
src/discussions/posts/post/Post.jsx Integrated ban modals and bulk delete with ban options
src/discussions/learners/LearnerPostsView.jsx Added learner ban status display and bulk moderation actions
src/discussions/data/selectors.js Expanded moderation privileges selector to include multiple admin roles
src/discussions/discussions-home/BannedUserBanner.jsx New banner component to notify banned users
src/index.scss Styling for moderation UI elements and banned user indicators

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings March 2, 2026 16:15
@mraman-2U mraman-2U force-pushed the mraman-2U/buldelete-ban-forum-UI branch from db835aa to daa2b35 Compare March 2, 2026 16:15
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 56 out of 56 changed files in this pull request and generated 7 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mraman-2U mraman-2U requested a review from jcapphelix March 3, 2026 14:20
Copy link

@santhosh-apphelix-2u santhosh-apphelix-2u left a comment

Choose a reason for hiding this comment

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

Approving this PR. I’ve left a few comments based on Copilot suggestions that seemed reasonable to consider, but they are not blocking.

@mraman-2U
Copy link
Member Author

Approving this PR. I’ve left a few comments based on Copilot suggestions that seemed reasonable to consider, but they are not blocking.

Copilot comments have been addressed and resolved

@mraman-2U mraman-2U force-pushed the mraman-2U/buldelete-ban-forum-UI branch from 2ea32b0 to adfab31 Compare March 4, 2026 05:54
Copilot AI review requested due to automatic review settings March 4, 2026 06:36
@mraman-2U mraman-2U force-pushed the mraman-2U/buldelete-ban-forum-UI branch from 8db13d3 to c766c3c Compare March 4, 2026 06:39
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 57 out of 57 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mraman-2U mraman-2U force-pushed the mraman-2U/buldelete-ban-forum-UI branch from d031808 to 50827a0 Compare March 4, 2026 07:33
@mraman-2U mraman-2U merged commit ceeb6c6 into master Mar 4, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants