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

feat: send individuals emails with pluggable component #7

Open
wants to merge 3 commits into
base: jv/pluggable-component-slot
Choose a base branch
from

Conversation

johnvente
Copy link

Description

This feature will allow sending emails to expected emails of students in the course using pluggable component

Demo

email-learner-test

Plugin loaded:

loaded-plugin

How to test it

If you are using devstack

  1. Go to workspace and clone this branch
cd ~/workspace && git remote add fork [email protected]:eduNEXT/frontend-app-communications.git
git fetch fork jv/feat-send-indivudial-email-pluggable && git checkout jv/feat-send-indivudial-email-pluggable
  1. Go to the mfe repository, use node version in the repo and install dependencies
cd ~/workspace/frontend-app-communications && nvm use && npm install

  1. inside frontend-app-communications run
npm run start
  1. Go to http://localhost:1984/courses/course-v1:edX+DemoX+Demo_Course/bulk_email Or
    http://localhost:1984/courses/{{id_course}}/bulk_email

  2. Select the checkbox called "Individual learners"

  3. In the input with this label "Add individual learner" search an student with email/name/username and click on the user that you wish

  4. Fill out the fields Subject and Body

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ No coverage uploaded for pull request base (jv/pluggable-component-slot@0d94489). Click here to learn what that means.

Additional details and impacted files
@@                      Coverage Diff                       @@
##             jv/pluggable-component-slot       #7   +/-   ##
==============================================================
  Coverage                               ?   83.31%           
==============================================================
  Files                                  ?       53           
  Lines                                  ?      773           
  Branches                               ?      147           
==============================================================
  Hits                                   ?      644           
  Misses                                 ?      129           
  Partials                               ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@johnvente johnvente force-pushed the jv/feat-send-indivudial-email-pluggable branch from 5556a2b to 36a3b69 Compare December 29, 2023 17:16

return (
<Container className="col-12 my-5">
<Form.Label className="mt-3" data-testid="learners-email-input-label">{intl.formatMessage(messages.individualEmailsLabelLearnersInputLabel)}</Form.Label>
Copy link

@AuraAlba AuraAlba Dec 29, 2023

Choose a reason for hiding this comment

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

Suggested change
<Form.Label className="mt-3" data-testid="learners-email-input-label">{intl.formatMessage(messages.individualEmailsLabelLearnersInputLabel)}</Form.Label>
<Form.Label className="mt-3" data-testid="learners-email-input-label">
{intl.formatMessage(messages.individualEmailsLabelLearnersInputLabel)}
</Form.Label>

placeholder={intl.formatMessage(messages.individualEmailsLabelLearnersInputPlaceholder)}
onChange={handleSelectedLearnerEmail}
renderMenuItemChildren={({ name, email, username }) => (
<span data-testid="autocomplete-email-option">{name ? `${name} -` : name} {username ? `${username} -` : username} {email}</span>

Choose a reason for hiding this comment

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

In the case the variables doesn't exist the value should be an empty string, not the variable

/>
{emailList.length > 0 && (
<Container className="email-list">
<Form.Label className="col-12" data-testid="learners-email-list-label">{intl.formatMessage(messages.individualEmailsLabelLearnersListLabel)}</Form.Label>

Choose a reason for hiding this comment

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

Suggested change
<Form.Label className="col-12" data-testid="learners-email-list-label">{intl.formatMessage(messages.individualEmailsLabelLearnersListLabel)}</Form.Label>
<Form.Label className="col-12" data-testid="learners-email-list-label">
{intl.formatMessage(messages.individualEmailsLabelLearnersListLabel)}
</Form.Label>

width: 100%;
display: flex;
flex-wrap: wrap;
border: 1px solid #ccc;

Choose a reason for hiding this comment

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

Manage colors as variables. If they are be used in other components, make a separate file

@BryanttV
Copy link

Hi @johnvente, I tested the changes, and work correctly! 💯

@johnvente johnvente force-pushed the jv/feat-send-indivudial-email-pluggable branch from 381cfd2 to 2884398 Compare January 2, 2024 13:44
@johnvente johnvente force-pushed the jv/feat-send-indivudial-email-pluggable branch from 2884398 to a6dfabb Compare January 2, 2024 13:52
@johnvente johnvente force-pushed the jv/pluggable-component-slot branch 2 times, most recently from 2b8e68b to 0d94489 Compare January 29, 2024 20:16
@johnvente johnvente force-pushed the jv/pluggable-component-slot branch 2 times, most recently from e3e2ce8 to ffa1797 Compare March 7, 2024 22:34
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.

4 participants