Commit Graph

97 Commits

Author SHA1 Message Date
Robert Raposa
61d7b4b278 Fix analytics events to be x-www-form-urlencoded.
The LMS /event api expects the request to use a content type of
application/x-www-form-urlencoded.

ARCH-390
2019-03-11 18:11:55 -04:00
albemarle
971a712b04 i18n: add make targets for Transifex (#77) 2019-03-11 17:58:07 -04:00
Adam Butterworth
b3a1c71a14 fix: update header (#76) 2019-03-11 16:50:56 -04:00
Adam Butterworth
15a06948de fix: upgrade header containing mobile fixes (#72) 2019-03-11 16:23:25 -04:00
David Joy
8131cf219d If account_privacy is blank, that means “all_users” (#75) 2019-03-11 16:06:03 -04:00
David Joy
2ee1887b6a Adding a horizontal rule below the joined date. (#74) 2019-03-11 15:52:03 -04:00
Douglas Hall
c74d0816ee fix(certificates): handle absolute and relative certificate download urls 2019-03-11 15:51:56 -04:00
Adam Butterworth
c8d9db2656 fix: use onChange instead of onInput to fix broken upload on mobile (#70) 2019-03-11 15:36:01 -04:00
Adam Butterworth
e54eb5ddad fix: order and vertical alignment of columns (#69) 2019-03-11 11:57:34 -04:00
Adam Butterworth
231d94911a fix: Add edit button to empty state on certs (#68) 2019-03-11 11:17:22 -04:00
Adam Butterworth
0853d6feb1 fix(a11y): Improvements to form descriptions and heading levels (#66)
* 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
2019-03-11 11:14:11 -04:00
Adam Butterworth
e66d1540cd feat: increase resolution of profile image (#67) 2019-03-11 11:05:51 -04:00
Adam Butterworth
b5f0a4e6ac fix: add ids for inputs and update header and footer components (#65) 2019-03-08 17:07:05 -05:00
Robert Raposa
8b1157f3c6 Rename event to edx.profile.viewed.
Had temporarily named the event edx.bi.profile.viewed while working
out some details. Now that the backend will add user_id for the
username, the event can become more official.

ARCH-491
2019-03-08 14:42:01 -05:00
Adam Butterworth
60268b5ba7 feat: Update header (#60)
* Update SiteHeader

* Remove old header

* Fix message key

* Icons now render in header

* style: move site header into common dir
2019-03-07 15:58:52 -05:00
Adam Butterworth
07a3680d5e feat(layout): add layout and style to 404 page (#63) 2019-03-07 15:23:55 -05:00
Adam Butterworth
438dcdb641 fix: Do not show age message when viewing other's profiles (#64)
remove close button on age message.
do not show age message for other users.
2019-03-07 15:20:23 -05:00
Robert Raposa
dc6366a015 JSON.stringify event data.
ARCH-492
2019-03-06 16:58:28 -05:00
albemarle
db91f69cdf update translations for es (#59) 2019-03-06 16:30:34 -05:00
Adam Butterworth
7bc2e8f02b Photo upload error handling (#57)
* Parse error response for photo upload

* Show profile photo upload errors

* Update test to match new shape of error

* Clearer comments
2019-03-06 12:17:04 -05:00
Adam Butterworth
f431d41948 pass isDefault to ProfileAvatar 2019-03-05 13:31:37 -05:00
Robert Raposa
f9f1c723cd Add Logging Service and event fixes.
- 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
2019-03-05 12:59:41 -05:00
Robert Raposa
b24f6db050 Temporary rename to edx.bi.profile.viewed. 2019-03-05 12:59:41 -05:00
Adam Butterworth
0671fa5d26 Add filemock for jest testing 2019-03-05 10:01:28 -05:00
Adam Butterworth
bddc369299 Delete css comment 2019-03-05 10:01:28 -05:00
Adam Butterworth
6524e2a044 Move verified next to default 2019-03-05 10:01:28 -05:00
Adam Butterworth
5885a5a392 Add other certificate illustrations 2019-03-05 10:01:28 -05:00
Adam Butterworth
35385ae99e Add MicroMasters illustration in background of all certificates 2019-03-05 10:01:28 -05:00
David Joy
129e32f7b5 Client/server data adapter and simpler data model. (#53)
* 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.
2019-03-04 16:45:22 -05:00
Adam Butterworth
af8fb0e859 Update display of avatar upload menu (#50)
* Update display of avatar upload menu

* Add i18n

* Incorporate feedback

* Add mobile style fix

* Fix loading style

* Use ===
2019-03-01 17:14:32 -05:00
Adam Butterworth
a1706dcf7f Remove editing capability for accounts that requireParentalConsent (#51)
Remove editing capability for accounts that requireParentalConsent
2019-03-01 16:29:21 -05:00
Douglas Hall
0793b04931 fix(certificates): use real certificate data 2019-03-01 16:02:53 -05:00
Robert Raposa
9abb2df5b2 Refactor analytics code into folder. 2019-03-01 14:59:06 -05:00
Robert Raposa
57d78402d2 Add logEvent call and new event. 2019-03-01 14:19:08 -05:00
Adam Butterworth
a3fd3ec5f8 Adding i18n 2019-03-01 14:17:53 -05:00
Adam Butterworth
a03a063179 Add languageProficiencies 2019-03-01 14:17:53 -05:00
Adam Butterworth
2064141e63 Combine Visibility Display and Select. i18n for both 2019-03-01 13:10:11 -05:00
Adam Butterworth
8063c0453d Clean up message ids 2019-03-01 13:10:11 -05:00
Adam Butterworth
e7da0132c5 Flip buttons and put visibility on new line 2019-03-01 13:10:11 -05:00
Adam Butterworth
f5c440c93b Add account settings url to age message. 2019-02-28 17:09:58 -05:00
Adam Butterworth
6f4753b7db Add "member since 2017" (#44)
* Add date joined

* Create a Date object to get the year

* Add date joined

* Create a Date object to get the year

* add i18n

* Update 18n key
2019-02-28 16:08:09 -05:00
albemarle
30f158d109 i18n all the things (#41) 2019-02-28 10:53:39 -05:00
Adam Butterworth
a4534551e9 yearOfBirth and requiresParentalConsent were missing from redux state. Adding to the clientServer key map 2019-02-28 10:00:12 -05:00
Adam Butterworth
41339d8d6e Collapse redux log groups in the console 2019-02-28 09:59:58 -05:00
David Joy
baf6e83f73 Re-re-rewire data/form state up to redux (#40)
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.
2019-02-27 16:23:41 -05:00
Adam Butterworth
3a0564e8a8 Add age message 2019-02-27 15:16:14 -05:00
Adam Butterworth
0c95e46741 Avatar no longer squishes on mobile 2019-02-27 15:16:14 -05:00
Adam Butterworth
6a03a056d0 Fix fetching profile data call after saving a photo 2019-02-27 15:16:14 -05:00
David Joy
0e1a3356aa First pass - realigning/simplifying/refactoring (#33)
Realigning and simplifying directories and naming.

- Combining “containers” into “components”.
- Flattening out “data” into “reducers” and “config” to consolidate configuration-like files in one place and to make reducers a peer of its teammates (components, actions, sagas, and services).
- Creating dev/prod-specific redux configurations.
- Converting “index.jsx” files into files named for their contents.
- Splitting up the top-level “index.jsx” file into an entry point and an “App” component.
- Renaming SCSS file to “index.scss” to keep it consistent with where it’s imported.
- Renaming/simplifying some variables.
2019-02-25 15:36:24 -05:00
Adam Butterworth
6e41a0a928 Adding button type attribute to button 2019-02-25 10:27:37 -05:00