Commit Graph

148 Commits

Author SHA1 Message Date
=Awais Jibran
46031f5b3b refactor: upgrade frontend-platform 2021-06-18 12:14:04 +05:00
Mehak Nasir
fae326f715 style: LTI form review fixes 2021-06-17 13:04:12 +05:00
=Awais Jibran
94b1cd8243 fix: upgrade paragon to fix styling issue 2021-06-16 23:20:07 +05:00
Mehak Nasir
b11a800417 chore: upgrade paragon (#136)
* chore: upgrade paragon

* Bump to 14.16.2

Co-authored-by: =Awais Jibran <awaisdar001@gmail.com>
2021-06-16 12:59:26 +05:00
Awais Ansari
8edc05422e feat: add collapsible card validation for empty field (#131)
* feat: add collapsible card validation for empty field
2021-06-14 17:25:07 +05:00
Mehak Nasir
2192092879 fix: LTI config form title fixed for app providers and eternal link heading fixes 2021-06-14 13:36:34 +05:00
edX Transifex Bot
0e6f9ba4bd fix(i18n): update translations 2021-06-14 02:31:39 +05:00
Mehak Nasir
1b4b30677e refactor: renamed external link keys and implemented review fixes 2021-06-11 14:56:24 +05:00
Mehak Nasir
dafc489c6a Refactor: updated LTI Config form screen according to new figma design 2021-06-11 14:56:24 +05:00
Mehak Nasir
1943aeeb84 test: updated UI test according to new api response 2021-06-11 14:56:24 +05:00
Mehak Nasir
046e4441e9 refactor: updated app document instructions description 2021-06-11 14:56:24 +05:00
Ahtisham Shahid
0a5b4c136e refactor:removed legacy proctoring route (#127) 2021-06-10 17:13:38 +05:00
Awais Ansari
c10f1521dc refactor: legacyConfigForm UI (#130)
* refactor: update legacyConfigForm UI and divider colour
2021-06-08 23:23:47 +05:00
Awais Ansari
76a99cadde test: add test cases for discussion topics (#129)
* test: add test cases for discussion topics
2021-06-08 23:17:35 +05:00
Awais Ansari
e242fbb16f feat: remove deletion functionality for default discussion topic (#125)
* feat: remove deletion functionality for default discussion topic

* refactor: update variables name and add general topic condition
2021-06-08 12:13:22 +05:00
edX Transifex Bot
f2cba3f9cb fix(i18n): update translations 2021-06-07 02:31:27 +05:00
Awais Ansari
7f4c28f4ba feat: Add Divide discussions by cohorts funtionality (#122)
* feat: Add Divide discussions by cohorts funtionality

* feat: Destructure values in DivisionByGroupField and remove unnecessary async calls from thunks

* feat: update checkbox component in DivisionByGroupFields

* refactor: change variable names
2021-06-03 17:32:18 +05:00
Awais Ansari
12fd5cdc83 feat: Add Incomplete error state in stepper (#121)
* feat: Add Incomplete error state in stepper

* feat: Remove Incomplete stepper step 2 error when click on back button
2021-06-01 11:08:22 +05:00
Mehak Nasir
54aea97fab style: added icon buttons for fixing hover styling for topics delete/expand/collapse 2021-05-31 17:40:06 +05:00
edX Transifex Bot
f294aa4495 fix(i18n): update translations 2021-05-24 02:31:00 +05:00
Awais Jibran
6bb6409d26 feat: Add UI for Add Topics (#105)
* Fixes an issue where Form Switch was unexpectedly getting wrong width from its parent.

* style: add discussion topics UI

* feat: Add section for general discussion topic in legacy form

* style: improve style according to Figma and add name uniqueness validation

1- Improve styling for General discussion topics section
2- Add discussion topic name uniqueness validation using yup test
3- Add internationalisation for discussion topic section

* test: Update LegacyForm test cases

Update LegacyForm test cases according to new requirements. Add mock store in test cases as we are using redux in DiscussionTopic and manipulating the redux store.

* refactor: update variables name and add async type in thunk function

Co-authored-by: Awais Ansari <awais.ansari63@gmail.com>
2021-05-21 12:39:24 +05:00
Awais Ansari
442335cf8c test: add features table test cases (#106)
* test: add features table test cases

* test: improve featureTable test cases
2021-05-20 15:45:18 +05:00
Mehak Nasir
0a7752635b chore: bumped paragon version from 14.11.2 to 14.11.4 2021-05-19 22:21:07 +05:00
MehakNasir
4ec40a8ae9 style: step2 button margins removed from code. 2021-05-19 22:21:07 +05:00
=Awais Jibran
1df6b6fb23 test: update test files 2021-05-18 17:59:36 +05:00
=Awais Jibran
efe6688e73 refactor: update full screen modal 2021-05-18 17:59:36 +05:00
Awais Jibran
c85f82aba2 chore: bump paragon (#118) 2021-05-18 10:53:19 +05:00
Awais Jibran
fff026d58f chore: bump paragon (#117) 2021-05-17 20:16:15 +05:00
edX Transifex Bot
c03b2652dd fix(i18n): update translations 2021-05-17 02:30:49 +05:00
Mehak Nasir
a3219225db test:Applist test cases added (#113)
Co-authored-by: MehakNasir <mehaknasir@A006-00194.local>
2021-05-11 16:10:20 +05:00
Ahtisham Shahid
6caf6aeefb feat: added new messages for new discussion providers (#115)
* feat: added new messages for new discussion providers

* fix: changed styles and minor test update

* refactor: refactored feature id names

* fix: Update messages.js
2021-05-11 15:47:36 +05:00
edX Transifex Bot
d4079526e8 fix(i18n): update translations 2021-05-10 02:30:39 +05:00
mehaknasir
0e179e36a0 TNL-8276: Mobile view feature list test cases added (#112)
Co-authored-by: MehakNasir <mehaknasir@A006-00194.local>
2021-05-06 11:28:01 +05:00
alangsto
b37a29e3ad fix: include zendesk ticket in post request for non admin (#111) 2021-05-05 14:09:05 -04:00
Awais Ansari
b68142cfa5 style: update piazza config form according to hifi design and add action test case (#88) 2021-05-05 18:26:29 +05:00
Awais Jibran
18c0cf2c50 Bump edx paragon (#107) 2021-05-04 15:16:45 +05:00
Ahtisham Shahid
23dc1aef80 Fixed padding in discussion settings modal (#110) 2021-05-04 15:16:38 +05:00
David Joy
ce85197a33 fix: update discussions API handler to match shape from server (#109)
The application was expecting a different API shape than the server was sending.  I have _no_ idea how this made it through, as it’s blatantly broken.  I don’t see any changes in this code in the past few weeks.

Anyway, the client was expecting a “features” array inside an app (provider), which simply didn’t exist.  The app itself is the array.  This PR udpates the shape in `normalizeApps` and also the associated test, which was also equally as wrong.  Somehow.
2021-05-03 15:10:15 -04:00
Ahtisham Shahid
c20fbbcf79 Updated Discussion UI as per Figma (#92)
* Updated Discussion UI as per Figma
2021-05-03 11:47:31 +05:00
edX Transifex Bot
afd66fcbe8 fix(i18n): update translations 2021-05-03 02:30:27 +05:00
mehaknasir
6513133e92 TNL-8268: Hide features table on mobile view and update mobile design according to figma (#104)
Co-authored-by: MehakNasir <mehaknasir@A006-00194.local>
2021-04-30 18:29:15 +05:00
Ahtisham Shahid
37873f0f4e Fixed color and alignment in data table (#103)
* Fixed color and alignment in the data table

* fix: fixed column width
2021-04-30 13:11:57 +05:00
Awais Ansari
b73b710777 test: add test for AppCard (#98)
* test: add test for AppCard
2021-04-29 11:17:50 +05:00
Saad Yousaf
f87e7b6d93 fix: replace strict classNames with themeable className. (#101)
Co-authored-by: SaadYousaf <saadyousaf@A006-00314.local>
2021-04-27 12:28:16 +05:00
edX Transifex Bot
1e1f83ec5a fix(i18n): update translations 2021-04-25 17:30:12 -04:00
AsadAzam
db98f66b3a Fixed cohorts section step 2 (#84)
* Fixed cohorts section step 2

* Fixed test

* Fixed test

* Added in-context discussions

* Added margin top

* Refactored code

* refactored code
2021-04-24 13:21:24 +05:00
David Joy
904c5d4145 feat: add network connectivity and permission denied alerts (#97)
* refactor: reusable connection error and permission denied alerts

This commit pulls the connection error and permission denied alerts out of ProctoredExamSettings and also makes them Open edX friendly by removing references to “edX” and using the SUPPORT_URL environment variable to supply the support link.

This is in preparation for using these alerts in the Discussions UI.

* refactor: saveAppConfig now responsible for redirect

I’ve moved the redirect to the pages and resources path into the thunk for saveAppConfig.  This is because we only want to do it if the thunk is successful, and it’s easier to do it here than to have `then` and `catch` handlers in the component.  In particular, this is because we can’t stop the `then` from happening unless we throw an error from the thunk, but the component has nothing to do on a thrown error.  This avoids the awkward code in the component and just handles it all here.

* feat: handle access denied by setting DENIED statuses

This takes us one step closer to user messaging for permission denied errors by setting an explicit DENIED status and saveStatus when a request was denied because the user didn’t have permissions.  Note that this is different than a 401, which is unauthorized, meaning the user is logged out.  This doesn’t handle 401s.

Following this, we can then use the DENIED status to give the user feedback on what’s going on.

* feat: adding error alerts

This commit adds friendly error alerts for connection and permission denied errors in the discussions app.

If the initial fetch apps request errors out or is denied, then the entire contents of the modal is replaced with an error message.

If the save app config request errors out, then a message is displayed at the top of the form.

If the sae app config request is denied, the entire contents of the modal is replaced with a permission denied error message, as in the first case.
2021-04-23 14:23:33 -04:00
David Joy
911c84162e feat: add the stepper header back in (#96)
Accidentally refactored it out.
2021-04-22 14:17:43 -04:00
David Joy
785cba9037 fix: internationalize some strings that got left behind (#95)
* fix: internationalize some strings that got left behind

- General
- Questions for the TAs

* fix: making the questions for TAs field consistent with the general topic one

* fix: improving i18n descriptions as per review feedback
2021-04-22 14:12:31 -04:00
David Joy
63444e6861 refactor: use Paragon versions of Stepper and FullscreenModal (#94)
* test: adding @testing-library/user-event

We use this library to simulate user clicks on interactive elements.

* test: adding some test environment mocks

Paragon components tend to use some advanced browser features that aren’t available in node.js/jest’s environment.  This safely mocks those features so that testing can proceed.

* test: Make our API responses reusable

Our future tests for DiscussionsSettings will want to use these API responses, so pull them out into a “factories” directory so multiple tests can re-use them.

The directory is called “factories” because ideally we’d use a test data factory to generate this data if we need a number of varieties of it.  Right now we just need these two, so generating factories for it isn’t really worthwhile.  But we might as well put it in the right place.

* refactor: use new CheckboxControl for AppCards

This replaces our usage of Input for checkboxes with a new CheckboxControl which is made specifically for this sort of use case.

It also adds an aria-label that describes what the checkbox does: “Select <appName>”

* feat: adds aria-label to Next button

The button lacked a label - this also lets us use queryByLabelText in our tests.

* test: favoring getByRole over getByTestId

The testing-library documentation talks about how it’s preferable to write tests that act like screen readers and inspect the DOM in ways that a user would.  Adding “test IDs” is a last resort when no better option is available.  The spinner actually has a “status” role on it, so we can use that instead here.

* feat: adding a spinner to the AppConfigForm

Improves the UX here by giving the user some feedback, and also makes it consistent with how AppList works.

* fix: set the selected app in redux so it’s official

Prior to this, we derived a selected app from the activeAppId if one wasn’t actively selected, but we never sent that decision back to redux.  This closes the loop.

* fix: add the message for selecting an app

Forgot to include this in a prior commit.  Oops.

* refactor: use Paragon Stepper and FullscreenModal

Also deletes our app-specific implementations of Stepper and FullScreenModal.

Note that the routes were pulled up into PagesAndResources.  This is so that we can access the appId param in DiscussionsSettings, and is an artifact of how react-router works.  You can’t access sub-route params in the same component that defines sub-routes.

Related to this, we now decide which step we’re on by examining the appId parameter, rather than having a route per step.  Conceptually it’s the same and each step has its own route, but now DiscussionsSettings just has multiple routes and doesn’t define subroutes.

* test: Adding tests proving that DiscussionsSettings works

This exercises the modal and stepper, proving that they interact with routes properly.  It also exercises the navigation buttons.

* doc: documenting selectedAppId and activeAppId

* fix: removing unnecessary aria-label attributes

aria-label is only necessary on buttons if the button text doesn’t sufficiently label the button, i.e., in the case that the button text is an “X” instead of the word “Close”.  This removes unnecessary button aria-labe attributes and updates the tests not to use them.

* test: adding more DiscussionsSettings tests

- form submission
- loading the ‘legacy’ form

* test: improving coverage for “full support” apps
2021-04-22 12:26:01 -04:00