learningequality / learningequality/studio

Develop Content Flagging UI Modal

Open
#4,367 2 comments 0 reactions 1 assignee View on GitHub

@vkWeb is already working on this.

Since Dec 23, 2023.

DEV: frontend javascript P1 - important TAG: new feature
Dominant language
Python
Stars
191
Forks
307
Avg merge
5d 6h
Merged PRs (30d)
10

Description

Overview

This issue aims to create a modal that will be triggered when a user clicks on the "Flag" option associated with a specific content node. The modal will provide predefined checkboxes for common reasons for flagging regarding why they believe the content should be flagged. We would also want to implement proper logic to accumulate all the parameters required to create a FlagFeedbackEvent object and call the utility functions to make the API request to the backend.

Description and outcomes

  • Create a Vue component for the flag modal.
  • Trigger the modal when the user clicks on the "Flag" option associated with a content node.
  • The Checkboxes should have the following options:
    • Violent or repulsive content
    • Hateful or abusive content
    • Harmful or dangerous acts
    • Spam or misleading
    • Sexual Content
  • User should be able to check multiple checkboxes.
  • Capture user selections made with the checkboxes provided in the feedback_reason field of the FlagFeedbackEvent Class.
  • In the ContentNodeOptions vue component, add a method that would be triggered when the user completes the procedure of flagging content.
  • This method should retrieve the corresponding parameter values required to create an instance of FlagFeedbackEvent Class i.e user, target_channel_id, context, contentnode_id, content_id, feedback_type, feedback_reason, target_topic_id for the ContentNode.
  • Create an object of FlagFeedbackEvent Class and make an API request using sendRequest utility functions implemented in feedbackApiUtils.js.

Related Screenshot

Screenshot from 2023-12-19 12-56-20

  • The modal should look something similar to this with an option to submit selected !

Acceptance criteria

  • UI modal with checkboxes for retrieving feedback_reason from the user trying to flag a contentNode.
  • Above mentioned methods triggered and implemented correctly according to specifications provided above.

Resources

  • To understand more about FlagFeedbackEvent Class refer to #4366

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.