* fix: delay closing a form on success so a user can read the message
* fix: update test
* fix: upgrade frontend-auth to stop logging login redirects as errors
- The logging service is now configured and used via an interface,
rather then from the concrete implementation.
- The logging service is passed to frontend-auth.
ARCH-687
* Removing rename of “levelOfEducation” to “education”
It caused the user account and profile data to diverge, and we want to use the same data for both at the moment.
* Reuse userAccount data for profile if possible.
Don’t make a separate request to fetch the user profile if we’ve already gotten it for the current user.
* fix: upgrade paragon and use new components
* test: update snapshot to reflect minor dom changes
* fix: use transition replace from paragon
* refactor: remove unneeded class definition on EditButton
* fix: add missing margin next to pencil icon in edit button
* refactor: use raw html for form elements
* test: update snapshot to reflect minor changes in html output
* refactor: replace all reactstrap with paragon or html
* test: update snapshot
* fix: add a noop to the button in async button if needed
This is a flaw in the Button component in Paragon. It calls props.onClick even if it doesn't exist.
* refactor: use classnames for toggling class names
* fix: remove unneeded ids. fix some form markup
* fix: update snapshot to reflect removed labels
- Add custom attributes to api response errors.
- Add custom attribute capabilities to loadError.
- Drop the data for html page responses.
- Move code for max message length.
- Add tests.
ARCH-578
* Add div role dialog for edit modes
* fix(a11y): add aria-describedby attributes on inputs
* fix(a11y): headings don't skip levels
* fix: update site header that contains a11y improvements
- Original NewRelicService lifted from edx-portal.
- Fixed bug with snake case of event data.
- Added error handling for logEvent.
- Added tests for logEvent.
ARCH-430
* Client/server data adapter and simpler data passthroughs.
* Parse error response and pipe to UI
* Add top-of-form error display for social links
* Remove save failed state from save button
* Remove object deconstruction in catch
* Fixing a few small bugs.
* When opening and closing forms, remove drafts.
* Tweak where we send account_privacy back to
* Passing course cert visibility through.
* Fixin’ up the tests.
* Documenting weird social links behavior.
* More comments.
This PR rewires how our forms get their data. It also folds in changes from #35 because @abutterworth and I had a pretty hefty conflict between our two branches.
This turned into a broader effort than I intended, admittedly.
The original goal was to take our form state out of component state and put it into redux state for all six forms on the profile page. This has been done, but doing so begged a bit of broader refactoring and renaming as well.
In no particular order:
1. We were referring to our forms as fields - that language has been fixed. They're forms now.
2. We were putting 'draft' form values in component state - that state has been moved up to the redux level.
3. The fetchProfile action is now responsible for making several underlying calls to the system for the profile's account information, preferences (if it's your own account), and certificates. Before, we had multiple actions responsible for each part, and coordination was hard.
4. `react-router-redux` has been replaced with `connected-react-router`. This is admittedly not something that ultimately needed to be in this PR - I _thought_ I was going to need it, but after the work was done, the need for the change fell out and it's essentially unrelated. That said, `react-router-redux` is deprecated and no longer supported, and `connected-react-router` has taken its place. I didn't see any reason to throw away the work, so here it is.
5. I updated some packages as part of number 4 above which didn't strictly need to be updated. I _thought_ I needed to update them w/r/t changing the router, but I didn't. As above, didn't see any reason to throw away the work, though.
6. Introduced `reselect` to handle derived state. This helps keep components clean.
7. Directly connected the forms to the store. This makes ProfilePage.jsx a lot cleaner.
8. The ProfilePage.jsx file still manages calling action creators to put stuff in redux - the forms are connected for their data, but are otherwise "dumb" about how the data gets back into redux. It felt weird, for instance, to have the Name.jsx component call an action creator called `saveProfile`... just seemed above its pay grade. Admittedly this is a bit asymmetrical, but it allowed ProfilePage.jsx to be a lot shorter/have less responsibility for passing data down.