Commit Graph

76 Commits

Author SHA1 Message Date
renovate[bot]
905dd98d28 chore(deps): update dependency @testing-library/jest-dom to v5.16.5 2022-08-09 12:19:46 +00:00
Justin Hynes
156dd0e47b Merge pull request #65 from edx/jawayria/drop-12
chore!: drop support for Node12
2022-08-05 08:11:54 -04:00
Jawayria
dcf69d693f chore!: drop support for Node12
BREAKING CHANGE: Node 12 support dropped
2022-08-05 14:04:41 +05:00
Maxwell Frank
c905ede6fe fix: cohorts disabled when 'all learners' is selected 2022-08-04 14:17:57 -04:00
Thomas Tracy
eea663675b fix: [MICROBA-1903] validate date time (#62)
* fix: [MICROBA-1903] validate date time

Currently, we do not validate date and time to be a date on the future on the front end. We do handle this on the backend. This updates form validation to force the user to enter a data in the future.
2022-08-03 09:57:25 -04:00
Maxwell Frank
9c6644c1b9 Mfrank/microba 1881 microba 1908 (#63)
* refactor: replaced Pending Tasks with alert and made general styling/accesibility updates

* addressed linter flags

* refactor: replaced Pending Tasks with alert and made general styling/accesibility updates

* fixed linting issues again

* refactor: replaced Pending Tasks with alert and made general styling/accesibility updates

* fixed checkbox responsiveness and darkened text under input

Co-authored-by: Maxwell Frank <mfrank@2u.com>
2022-08-02 11:41:27 -04:00
renovate[bot]
8205ff64f8 chore(deps): update dependency @edx/frontend-build to v9.2.2 2022-08-01 07:21:03 +00:00
renovate[bot]
c0f41874bb fix(deps): update dependency tinymce to v5.10.5 2022-08-01 07:13:30 +00:00
Thomas Tracy
339f9b303f fix: await post to properly update form (#59) 2022-07-29 09:24:42 -04:00
Thomas Tracy
aec97816fb fix: [MICROBA-1877] fix cancel button (#56)
The various form states were getting mixed up during error handling,
which lead to some strange situations where the cancel button was
appearing when it shouldnt have been. This PR centralizes all of the
form state changes into a useEffect hook to handle any and all state
changes throughout the form. This approach not only centralizes the
fragmented code, but prevents the state mixups that were happening
previously.

It also has the added benefit if down the line more state changes need
to be added, the changes are all happening in one place.
2022-07-25 15:02:02 -04:00
renovate[bot]
b62a92c4d2 fix(deps): update dependency react-redux to v7.2.8 2022-07-25 11:38:22 +00:00
renovate[bot]
c950864afa chore(deps): update node.js to v12.22.12 2022-07-25 11:30:46 +00:00
Thomas Tracy
31669aa1f2 feat: [MICROBA-1902] Confirm email deletion (#55)
This PR adds an alert style pop up to confirm with the user that they
are deleting an email from the scheduled email table intentionally.
2022-07-21 12:58:58 -04:00
renovate[bot]
deae6c9654 chore(deps): update dependency glob to v7.2.3 2022-07-18 10:29:10 +00:00
renovate[bot]
1ede234b31 chore(deps): update dependency @testing-library/react to v12.1.5 2022-07-18 10:21:55 +00:00
Thomas Tracy
3deaeece2c feat: Add cancel button for editing an email (#49)
Right now, canceling edit mode is clunky. This adds a button to
explicitly cancel the mode for the editor.
2022-07-13 11:51:10 -04:00
renovate[bot]
b7275c1491 chore(deps): update dependency @testing-library/jest-dom to v5.16.4 2022-07-11 10:40:58 +00:00
renovate[bot]
f6058c9bbe fix(deps): pin dependencies 2022-07-11 10:33:55 +00:00
Maxwell Frank
5a20359856 WIP - Removing Pending tasks and styling changes - Microba 1824 (#47)
* refactor: replaced Pending Tasks with alert and made general styling/accesibility updates

* addressed linter flags

* refactor: replaced Pending Tasks with alert and made general styling/accesibility updates

* fixed linting issues again

* refactor: replaced Pending Tasks with alert and made general styling/accesibility updates

Co-authored-by: Maxwell Frank <mfrank@2u.com>
2022-06-28 10:04:55 -04:00
Thomas Tracy
99b9a51598 feat: [MICROBA-1840] delete/edit scheduled emails (#44)
This PR adds delete and edit functionality to emails that are scheduled to be sent at a future date. The workflow for editing is as such:

    A user clicks edit on the table
    The contents of the email are copied to the editor, and the user makes edits
    The user is warned that this is editing an email, and that it will not create a new task, instead updating the selected one
    If they accept, the email is updated.

For delete, the user just hits the delete button, and its gone. There is now warning popup as of yet.

This PR also adds the toast component for success and errors when sending emails.
2022-06-23 14:20:48 -04:00
Thomas Tracy
5d88b19c07 feat: Add ScheduledBulkEmailTable (#42)
This PR refactors some of the code around the context store to be more in line with the project organization ADR in this repo. Essentially, it splits the reducers and actions into slices used by the components that need them to prevent pollution of data in the store.

This PR also handles most of the refactor around the BulkEmailTool making use of the BulkEmailToolProvider in order to share data between components. This allows for better copyToEditor functionality, amongst other changes, as the email form now handles its state within the context store.

The Provider and its store is purposefully tied to the BulkEmailTool as to prevent any bleeding of state information between tools that may be added to the comms MFE in the future.

This PR also adds the first iteration of the scheduled emails table. This table will allow for viewing, deleting, and editing emails in the future. For now, it only adds viewing. The viewing modal DOES support copy to editor functionality but it is NOT editing the original entry and WILL schedule a new email if submitted.
2022-06-06 10:27:31 -04:00
Justin Hynes
9e29c54ac6 Merge pull request #43 from edx/jhynes/microba-1822_fix-access
fix: use `originalUserIsStaff` to gate bulk email tool over `isStaff`
2022-06-01 14:30:10 -04:00
Justin Hynes
298f573113 fix: use originalUserIsStaff to gate bulk email tool over isStaff
[MICROBA-1822][CR-4822]

* use `originalUserIsStaff` to gate bulk email tool access over `isStaff`

Additional Context
Access to this tool was originally gated by looking at the `isStaff` value from the CourseMetadata data returned to us from the LMS. The user masquerading feature seems to have some interesting interactions with the Instructor Dashboard and we may be denying legitimate staff/admin/instructors access to the tool. Instead of using the value of `isStaff` we will now use `originalUserIsStaff` to determine if the user accessing the tool should be allowed access (and this follows how the Learning MFE gates content).
2022-06-01 14:24:04 -04:00
Thomas Tracy
6dd09451a3 refactor: [MICROBA-1506] refactor message modal (#41)
This pr extracts out the message modal so that it can be reused
elsewhere in the app. Specifically so we can reuse it for the "view"
button in the scheduled emails table.
2022-05-17 12:05:27 -04:00
Thomas Tracy
ffa0361c22 feat: [MICROBA-1506] bulkEmailTool data context (#39)
Currently, our bulk email tool in concept looks something like this:
- BulkEmailTool
	- BulkEmailForm
	- BulkEmailTaskManager

Right now, the two components under the parent BulkEmailTool dont really
need to communicate with each other. For scheduled email, these two
components are going to be relying on the same data, and there need to
be provided that data by the parent. In order to make things more
manageable, this PR sets up some boilerplate and patterning for this
data. What this PR will include:
- Documentation around the pattern
- Necessary boilerplate to leverage the context store for the
  BulkEmailTool
- Tests around said store

What this PR will not include:
- Changes to the UI or form functionality
2022-05-16 11:43:04 -04:00
Tim McCormack
e09bb55544 fix: Fix pull_translations by using correct CLI flag for languages (#40)
Docs: https://developers.transifex.com/docs/using-the-client

Apparently this CLI option changed from singular to plural at some point.
2022-05-13 16:19:12 +00:00
edX requirements bot
5ce9ab00c8 feat: Add package-lock file version check (#38)
* feat: Add package-lock file version check

* fix: package-lock

Co-authored-by: Jawayria <jawayriahashmi@gmail.com>
2022-05-09 18:03:42 +05:00
Thomas Tracy
200f19dd9a feat: [MICROBA-1528] add schedule email UI (#36)
This handles a few things around the scheduled email UI. This includes:
1. Adding the schedule email UI date/time picker.
2. Adds states to the submit button for scheduling emails.
3. Drys out intl code and some submitting states.
4. Matches the email form UI to mocks.

This however does not include:
1. A table to show scheduled emails. Scheduled emails at the moment are
   displayed in the "pending tasks" section.
2. Matching the tasks section to the mocks.
2022-05-04 12:49:02 -04:00
Thomas Tracy
a37d63a4a3 chore: update edx frontend packages (#35) 2022-04-25 09:22:31 -04:00
Thomas Tracy
d67348929d fix: [MICROBA-1799] fix bulk email tool on safari (#34)
Course teams were having issues sending bulk emails to themselves and
students. This was caused by two problems.

1. The language selector tool was failing because of no default language
   settings in safari is possible
2. The translated string for the "continue" button on the submit modal
   was messing with the markup and causing the event to POST the email
to not properly fire.

To fix the language issue for now, we are disabling the language
selector plugin. To fix the markup issue, we are forcing the string to
render in a fragment to remove the additional span, allowing the event
to fire no matter where the user clicks the button.
2022-04-15 13:47:24 -04:00
Jawayria
dc292f5084 Merge pull request #33 from edx/jenkins/npm-8-f2c66eb
chore: Install dependencies using npm 8
open-release/nutmeg.1 open-release/nutmeg.3 open-release/nutmeg.2
2022-04-06 16:40:30 +05:00
edX requirements bot
9101b9540a chore: Install dependencies using npm 8 2022-04-05 10:48:48 -04:00
Thomas Tracy
f2c66ebcf6 fix: disable emoticons to prevent messages from being cut off (#31) 2022-03-30 10:34:54 -04:00
Thomas Tracy
d0de55d11a fix: Support feedback of tool (#30)
- Missing left align tool (just a typo)
- Missing advanced image options (missing configuration)
- Page title was never set

Other issues such as email title, google+, and sender address are not
related to the MFE and are quirks to do with the staging environment.
2022-03-25 12:29:16 -04:00
Thomas Tracy
90a26d7897 fix: [MICROBA-1760] code block on toolbar (#29) 2022-03-15 12:00:52 -04:00
Justin Hynes
eb01e6e439 Merge pull request #19 from edx/jenkins/node-16-1b1e304
build: Added support for node v16
2022-03-14 14:48:06 -04:00
Justin Hynes
2dae2b1c42 Merge pull request #28 from edx/jhynes/microba-1743_fix-logo
fix: fix oversized logo in header
2022-03-14 11:58:13 -04:00
Justin Hynes
9bc69e39e2 fix: fix oversized logo in header
[MICROBA-1743]

* Add styling overrides for images and text in header to make logo sizes consistent in the PageContainer component.
2022-03-14 09:58:40 -04:00
Justin Hynes
4d04a72663 Merge pull request #27 from edx/jhynes/microba-1743_course-title-in-header_v2
feat: suggested UI improvements from bugbash
2022-03-11 14:54:46 -05:00
Justin Hynes
1477460abc feat: suggested UI improvements from bugbash
[MICROBA-1743]

* Use `LearningHeader` component which can display the course information (title, org, number) in the header to the learner (matching existing design).
* Refactor components to introduce a `PageContainer` component in order to support displaying course information in header.
* Refactor the BulkEmailTool component to take advantage of the new course metadata context provider.
* Add tests for new `PageContainer` component.
* Fix existing tests due to refactor.
* Add "Email" label above recipient selection checkboxes to match existing design.
2022-03-11 11:35:00 -05:00
Thomas Tracy
cf239370df Revert "fix: [Microba-1741] Fix email image upload (#25)" (#26)
This reverts commit 08499922c3.
2022-03-09 16:56:43 -05:00
Thomas Tracy
08499922c3 fix: [Microba-1741] Fix email image upload (#25)
Image uploads were broken for 2 reasons on stage:
  1. Our bleaching on the server was too strong. it was pulling out
     attributes inside of the image tags that allowed base64 encoding to
     work properly.
  2. The paste_data_images needs to be set to true to allow for dragging
     and dropping of images into the editor

Since bleach has been rolled back for now, adding this setting should
allow for images to be properly uploaded.
2022-03-09 16:29:42 -05:00
Justin Hynes
408a6e9afe Merge pull request #24 from edx/jhynes/microba-1743_webpack-config-update
fix: Update webpack config to be less strict
2022-03-08 14:39:20 -05:00
Justin Hynes
2387d621d7 fix: Update webpack config to be less strict
[MICROBA-1743]

Fixes an issue where we couldn't override the header and footer with the branded versiom within the Comms MFE because some of the dependencies of the branded components are not currently Webpack5 compliant. Adds a rule to make webpack5 less strict with imports that do not include a file extension.

This also includes a change so that the Comms MFE uses the Open edX branded colors/styles by default.
2022-03-08 14:22:22 -05:00
Justin Hynes
9dbd47bc58 Merge pull request #23 from edx/jhynes/microba-1743
fix: (MICROBA-1743) Minor UI updates after bug bash
2022-03-07 15:25:57 -05:00
Justin Hynes
8987ccd01c fix: (MICROBA-1743) Minor UI updates after bug bash
[MICROBA-1743]

* Remove `instructor` from the path of the bulk course email tool in the Comms MFE.
* Remove `file` option from TinyMCE text editor.
2022-03-07 10:33:01 -05:00
Thomas Tracy
762cfe2a99 fix: [MICROBA-1709] Fix cohort display bug (#22)
There was a small issue with the cohorts looking a little weird in the
checkbox list. This even out the list and forces each item to be the
same size.
2022-02-28 16:16:19 -05:00
Thomas Tracy
97364e42d9 chore: update readme, fix (#21) 2022-02-24 14:30:16 -05:00
Thomas Tracy
ad87d08d04 feat: [MICROBA-1664] Add copy email button (#20)
The old tool had a button in the modal used to view past emails that
allowed you to copy the content into the editor. This replicates that
functionality, but without the ability to fill in the subject field of
the email. This was done to keep certain components more seperate.
2022-02-11 14:26:41 -05:00
Jawayria
1f8e64e454 fix: update events 2022-02-10 18:12:24 +05:00