Commit Graph

50 Commits

Author SHA1 Message Date
connorhaugh
42cb63601e feat: remove loading on editor pages (#250)
Because we are moving the v2 editor pages to be "fake" modals, which have no z-index, we need to discard the course authoring "loading" wheel for the header and footer. We also need to bump the version of f-l-c-c to bring in the new editor changes.
2022-02-15 15:06:09 -05:00
connorhaugh
de873bb9ad fix: update f-l-c-c version for editor save (#245)
* fix: update f-l-c-c version for editor save

An error in the content components caused the new html editor not to save. This will make it so it won't encode the destination uri twice.

* fix: add pack-lock
2022-01-27 12:58:19 -05:00
connorhaugh
325d98016e feat: Use new TextEditor (#237)
DO NOT MERGE UNITL https://github.com/edx/frontend-lib-content-components/pull/9/files is merged. This PR utalizes the new text editors. Also upgrade node version.
2022-01-27 09:48:05 -05:00
connorhaugh
a3e88a6c09 feat: Serve New Editor Pages (#224)
This work will add, behind a flag, the ability to route to components from frontend-lib-content-component.
2021-12-21 10:29:42 -05:00
Kshitij Sobti
21b34e6456 fix: the view live button should link to the learning MFE (#210)
The view live button now links to the learning MFE.
2021-11-09 17:23:34 +00:00
Kshitij Sobti
6c1b8b6a58 fix: UX feedback suggestions from TNL-8730 (#205)
Fix styling of delete message to reduce gaps between paras
Fix bold font on collapsed title of group
Add no groups found error message when trying to enable teams without groups defined
2021-10-26 18:03:55 +00:00
Kshitij Sobti
6a2e1ba45f fix: improve styling and behaviour to match mockups [BD-38] [TNL-8730] (#193)
* fix: improve styling and behaviour to match mockups
This fixes the following issues:
TNL-8737: Description field should be larger
TNL-8738: Increase right and left padding in expanded card
TNL-8739: Expand/Collapse icon should have fixed position
TNL-8741: Remove field helper text on field error state
TNL-8742: Use consistent spacing between field and helper text
TNL-8743: Too much spacing above Save button
TNL-8744: remove field error states when re-focusing on field
TNL-8762: Copy changes to team configuration
TNL-8763: Radio button rendering issues
TNL-8764: Use lowercase "M" for "Public managed" and "Private managed" labels
TNL-8766: Match style of labels in collapsed card
2021-10-06 12:58:44 +00:00
Awais Ansari
6ce280e3e1 feat: add blackout dates new UI and validation (#191)
* feat: implement blackout dates UI and validation

* chore: bump paragon version to 16.14.2

* refactor: blackout dates collapsible card with reusable collapsible component

Co-authored-by: Mehak Nasir <mehaknasir94@gmail.com>
2021-09-29 18:34:19 +05:00
Kshitij Sobti
6efbaa2dfe apply review feedback 2021-09-17 14:34:40 +05:00
Kshitij Sobti
f4979b4c37 apply review feedback 2021-09-17 14:34:40 +05:00
Awais Ansari
ca5e283159 chore: bump paragon version to 16.6.4 (#175) 2021-08-02 14:08:31 +05:00
Awais Jibran
d1a677aff7 refactor: code refactoring. (#166)
* refactor: discussion topic code refactoring

* test: update topic item test cases after code refactor
2021-07-27 19:48:08 +05:00
Mehak Nasir
b0fd539770 chore: bump paragon version to 16.3.2 2021-07-20 01:42:01 +05:00
=Awais Jibran
12c81b2056 fix: upgrade frontend-build to v7 and paragon to v16 2021-07-13 19:35:16 +05:00
=Awais Jibran
36e2ab0d75 chore: Bump paragon 2021-07-02 13:42:54 +05:00
Kshitij Sobti
0e7340bdda feat: Hook up course apps API and add base components for app configuration
Hooks up the course apps API so that the data returned by the server is being used.
Adds the base components and infrastructure to enable adding pages for configuring
each app.
2021-07-01 20:58:05 +05:00
=Awais Jibran
44d8cfbaa1 chore: bump paragon 2021-06-30 17:57:34 +05:00
Mehak Nasir
863b2fd90c chore: bump paragon to 14.16.9 2021-06-23 23:12:16 +05:00
Ahtisham Shahid
0f384ee0ea chore: updated paragon version (#143) 2021-06-22 19:15:47 +05:00
=Awais Jibran
d7b2e8ec17 refactor: bump paragon version 2021-06-21 22:31:48 +05:00
=Awais Jibran
e8d2502761 refactor: upgrade frontend-platform to 1.11.0 2021-06-18 12:14:04 +05:00
=Awais Jibran
46031f5b3b refactor: upgrade frontend-platform 2021-06-18 12:14:04 +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 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
Mehak Nasir
0a7752635b chore: bumped paragon version from 14.11.2 to 14.11.4 2021-05-19 22:21:07 +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
Awais Jibran
18c0cf2c50 Bump edx paragon (#107) 2021-05-04 15:16:45 +05: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
Awais Jibran
83bbb06170 build: bump edx paragon to 14.7.0 (#90)
* build: bump edx paragon to 14.7.0

* Fixing test failures

* Fixes an issue where Form Switch was unexpectedly getting wrong width from its parent.
2021-04-21 19:14:57 +05:00
David Joy
c0deaf2020 build: bump frontend-build to 5.6.11 (#66) 2021-04-02 11:30:48 -04:00
David Joy
b5998a36c1 fix: improve app config forms, refactor LegacyConfigForm, add tests (#62)
* chore: adding jest-dom package and configuring it

Also bumping version of paragon - it’s in this commit because the changes in package-lock.json can’t really be separated from each other.

* fix: improve mocked data in the API layer

Make the mocked data for the app configs closer to reality, using correct shape and better IDs.

* fix: improve layout of FormSwitchGroup and make compatible wit latest paragon

Form.Group needs a controlId, and this layout gives a nice gutter between the text side on the left and the switch itself on the right.

* fix: active vs. displayed apps and app configs

We have a problem in that the app config and app that are _displayed_ in the frontend are not necessarily the same as app and app config that’s _active_ for the course.  I.e., maybe I’m configuring a new one, but a different integration’s already set up.

This commit changes our data model a bit to differentiate between the two - this will let us display information about what’s currently active at the same time as configuring a different integration.

This commit also tweaks a Container size to make the form a bit wider.  Pretty.

* refactor: split LegacyConfigForm parts out into their own components

This is in preparation for needing to share legacy config form fields with the ‘standard’ config form for the new discussions MFE.  In particular, we also need to pull the InContextDiscussionFields out of the legacy form - that component exists but isn’t technically used in this commit.  It will be included in the ‘standard’ form soon.
2021-03-31 13:32:30 -04:00
David Joy
1baecebabb refactor: using initializeMockApp in ProctoredExamSettings tests (#59)
- This uses a new function in frontend-platform 1.9.0 that sets up a mock application for use in test suites.
- The ProctoredExamSettings.test.jsx tests have been refactored to use axios-mock-adapter and initializeMockApp.
- A tweak was made to ProctoredExamSettings to use error.response.status instead of error.customAttributes.httpErrorStatus - the former is a more canonical way of getting at this data, rather than using the customAttributes object we add to our errors.  It also means the code will work with the MockAuthService instead of AxiosJwtAuthService.
- Removing axios dev dependency - we don’t need it anymore!
2021-03-24 10:39:21 -04:00
David Joy
6f762edbd3 Discussions config UI part 2 - FullScreenModal and Stepper! (#53)
* Bumping paragon version to latest.

* Modifying event handlers to be named with “on” prefix instead of “Handler” suffix

* Tweaking a message id.

* Removing “Discussion” prefix from discussions components.

Seems unnecessary.

* Backing pages & resources view with data handling.

It still has the list of pages hard coded.

* Adding FullScreenModal and Stepper components.

These components are pretty close to their final form.  They could benefit from some snapshot tests and such; there isn’t much actual functionality in ‘em.

Stepper will get a bit more functionality when we add the dynamic drop shadow behavior.  Depending on whether the stepper body is at the top or bottom, drop shadows on the header and footer should appear or disappear to indicate more content exists above or below the viewport.

* Moving discussions routes inside PagesAndResources

Note that the discussions component has been renamed - that’ll be coming in a subsequent commit.

Also trying to get consistent about calling it “discussions”

* AppList gets less responsibility

The AppList is now a child of the top-level “Discussions” component, so it’s no longer responsible for loading the app list or storing the state for the selected app ID.  It’s also given a handler for when an app is selected, and no longer has a button to configure the app.

* Fleshing out Discussions component

The top-level Discussions component (renamed from DiscussionsRoutes) is now responsible for a lot.

- it loads the app list
- it keeps track of selected app ID
- it has handlers for all the various user actions so they can be coordinated here at the top.
- it uses component composition to create the majority of the UI, folding together FullScreenModal and Stepper with its route-based views.

* Decomposing the app config form

The discussion app config form has been decomposed into a container responsible for loading app data, and a component specifically for the LTI configuration form.

In the future, ConfigFormContainer will get a second possible child for the edX Forums app, and will switch between the two forms based on the app being configured.

Note that I expect that some of the data loading logic from ConfigFormContainer may be better situated in the Discussions component… everything else is happening there, and it may make sense for it to handle loading the app config data as necessary as well.
2021-03-12 10:25:55 -05:00
David Joy
013aba58a6 Discussions LTI config UI. (#50)
* Adding font-awesome so we can use it with StatefulButton

* Rudimentary discussion config UI with mocked APIs.

* Updating Yellowdig logo URL

* Bumping and locking dependencies, adding formik and yup

* Wiring up the “Enable” button to go to the discussions config.

* Refactoring DiscussionConfig to use formik and yup.

* Using more paragon components - Card, CardGrid, and DataTable

* Adding keys to arrays of rendered components.

* Ignore module.config.js file.

* Bumping frontend-build to the latest version.

* Removing font-awesome again - it’s no longer necessary.

The latest version of Paragon uses <FontAwesomeIcon> for its closing “X”, rather than using CSS class names directly.

* Splitting discussion app list cards out into their own component.

They used to, but were folded in while refactoring to use Card and CardGrid.

* Adding comments to FeaturesTable.
2021-02-26 13:45:56 -05:00
David Joy
9c63ab8044 Refactoring and organization (#41)
* Updating dependencies and removing unneeded ones.

* Fixing broken IntlProvider attribute in ProctoredExamSettings test.

* package-lock.json was out of sync - checking it in.

* Initializing an empty redux store.

* Adding model-store from frontend-app-learning.

This will let us save data from the server in a normalized way in redux, reducing boilerplate in React components.

* Fixing paragon button usage.

(also just organizing the imports while I was there…)

* Using paragon button instead of an anchor tag.

For the “New Page” button in the pages & resources view.

* Add API, reducers, and thunks to add course detail data into redux.

Subsequent PR will use this to store course detail data for use across different pages in the application.

* Prep work to add CourseAuthoringPage component.

Decided the course-detail sub-directory didn’t make much sense, given component structure, and moved it up to src.

These functions will be used in a CourseAuthoringPage component to load course detail data and display the Header and Footer in one common place, wrapping all the existing course authoring pages (proctoring and pages & resources)

It will also replace LmsApiService.js

* Minor style refactorings.

(This commit had originally made some changes to how courseId was passed in to these two components, but I decided to back it out… but the style stuff is worth adding as a fixed nit.)

* Refactor course detail loading and top-level course authoring components

This commit does a few things:

- Factors course detail data loading out of the Header.
- Loads that data in CourseAuthoringPage instead, adding it to redux and then passing it to the Header from there.
- Deletes LmsApiService, which is no longer used.
- Changes the route paths to be more canonical and entity-oriented, i.e., the first part of the route is the course, followed by the specific page about that course to load, rather than the other way around.  This more naturally allows us to use react-router to extract the common course detail loading code that only depends on the courseId.

* Refactoring routes code a bit to pass courseId into components

Didn’t like how CourseAuthoringPage, LegacyProctoringRoute, and CourseAuthoringRoutes all reached into the parent route to find the courseId, so passed it in instead.

* Updating README with more detail on routes in the MFE.
2021-01-07 13:16:35 -05:00
David Joy
eaefefda26 Upgrading axios to latest. (#43) 2021-01-05 16:13:02 -05:00
dependabot[bot]
559deb1380 Bump codecov from 3.6.5 to 3.7.1 (#8)
Bumps [codecov](https://github.com/codecov/codecov-node) from 3.6.5 to 3.7.1.
- [Release notes](https://github.com/codecov/codecov-node/releases)
- [Commits](https://github.com/codecov/codecov-node/compare/v3.6.5...v3.7.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-15 10:24:12 -05:00
Bianca Severino
bf90463ec2 Rebrand (#39) 2020-12-08 09:48:21 -05:00
rusrushal13
09a21c96ff Add wireframe views for configuring course apps
Adds views (with test data) for the course apps configuration pages.
2020-10-08 03:14:00 +05:30
Michael Roytman
991ab0ac9c Add lean Studio header component. (#24)
* add component from edx/frontend-component-header-edx

* adapt header components from edx/frontend-component-header-edx to fit the Studio header use case
2020-08-03 12:28:10 -04:00
alangsto
899dd9a17b updated paragon version (#23)
updated paragon version

improved focus indicators

improved focus indicators

added newline

reverted package.json to master

updated way to access border styling

changed testing library for style

fixed typo

another typo

updated styling

prevents fields from shifting

removed tests

removed packages

removed package

updated paragon version
2020-07-31 14:10:15 -04:00
Simon Chen
d4b50c46a5 Switch from enzyme to testing-library/react (#14) 2020-07-23 21:15:46 -04:00
Michael Roytman
39b0320ae8 update version of Paragon, change some checkboxes to radio buttons to match wireframes, and update remaining Paragon components to use React-Boostrap passthrough components (#12) 2020-07-23 14:07:14 -04:00
alangsto
8aef7877d9 Added validation logic for parity (#9)
Removed merge conflict

resolved merge conflict

added validation logic for enforcing proctortrack escalation email

added dependencies for email validator and testing, added code and tests for requiring valid email

added validation for editing proctoring provider field

added validation for editing proctoring provider field

Add error handling code to the Exam settings page. Also include spinners for loading (#10)

updated help text

updated comment

added unit tests

updates for requested changes

removed unnecessary line

trying to see if tests will rerun

testing for travis build

adding another test

adding another test for travis

uncommented last test

updated tests

trying to fix test

removed tests

This change would fix tests so they are actually doing the testing job (#11)

Update the error messages based on copy provided by Deen (#13)
2020-07-23 13:51:02 -04:00
Simon Chen
74f5a44d83 Add error handling code to the Exam settings page. Also include spinners for loading (#10) 2020-07-22 09:43:49 -04:00
Michael Roytman
500eba661e add Studio base URL to configuration and add Proctored Exam Settings component (#4) 2020-07-14 14:24:30 -04:00
stvn
49c46c4dc1 Update app name
```
export APP_NAME=course-authoring
grep -rl frontend-template-application . | \
    xargs sed -i.bak "s/frontend-template-application/frontend-app-${APP_NAME}/g"
```
2020-05-06 12:40:55 -07:00
stv
0e4f8ed2cf Initial commit 2020-05-06 12:40:54 -07:00