Commit Graph

57 Commits (47bb4ca5e38c3770825e58d142fcf30b7e86410b)

Author SHA1 Message Date
Berkeley Martinez 543f43c4f1
Merge pull request #16845 from Bouncey/feat/opBeat
feat(opbeat): Enable opbeat-react for frontend performance tracking
2018-03-13 16:05:11 -07:00
Stuart Taylor 73b8ba96af fix(env): Use NODE_ENV to enable/disable opbeat frontend 2018-03-13 22:56:44 +00:00
Stuart Taylor fa59bcfd7b fix(credentials): Pass credentials through DefinePlugin 2018-03-09 15:59:45 +00:00
Stuart Taylor a0c3d5bd08 feat(opbeat): Enable opbeat-react for frontend performance tracking 2018-03-09 15:42:44 +00:00
Stuart Taylor cebf72701e fix(challenge): Update challenge once we have all the data 2018-03-06 10:25:58 +00:00
Berkeley Martinez 6cf91060fc fix(client): Remove unused import 2018-01-18 15:20:54 -08:00
Berkeley Martinez 9c155c73ed fix(client): Make devtools optional/disable
You must enable debug to enable devtools
2018-01-18 15:20:54 -08:00
Berkeley Martinez 387eafbf33 feat(Flash): Add render methods that do not dump flash autom
query from the front end app for these messages
2018-01-18 15:20:54 -08:00
Berkeley Martinez 5a32585ddd feat(Flash): Get flashes from ssr 2018-01-18 15:18:42 -08:00
Berkeley Martinez 4c5b41fe9a chore(client): Remove error log, add note
This callback does not have an err, may also never be called when used
with React hot reload
2018-01-18 15:18:42 -08:00
Berkeley Martinez 71869757a0 feat(babel): Add babel-runtime plugin
Reduce payload and remove old shims in favor of babel shims
2018-01-18 15:18:42 -08:00
Berkeley Martinez f8f55dd846 fix(client): Hot reload breaking on undefined defaultState 2018-01-18 15:18:42 -08:00
Berkeley Martinez dbecdc5618 feat: prep for modern challenges (#15781)
* feat(seed): Add modern challenge

* chore(react): Use prop-types package

* feat: Initial refactor to redux-first-router

BREAKING CHANGE: Everything is different!

* feat: First rendering

* feat(routes): Challenges view render but failing

* fix(Challenges): Remove contain HOC

* fix(RFR): Add params selector

* fix(RFR): :en should be :lang

* fix: Update berks utils for redux

* fix(Map): Challenge link to arg

* fix(Map): Add trailing slash to map page

* fix(RFR): Use FCC Link

Use fcc Link to get around issue of lang being undefined

* fix(Router): Link to is required

* fix(app): Rely on RFR state for app lang

* chore(RFR): Remove unused RFR Link

* fix(RFR): Hydrate initial challenge using RFR and RO

* fix: Casing issue

* fix(RFR): Undefined links

* fix(RFR): Use onRoute<name> convention for route types

* feat(server/react): Add helpful redux logging/throwing

* fix(server/react): Strip out nonjson from state

This prevents thunks in routesMap from breaking serialization

* fix(RFR/Link): Should accept any renderable

* fix(RFR): Get redirects working

* fix(RFR): Redirects and not found's

* fix(Map): Move challenge onClick handler

* fix(Map): Allow Router.link to handle clicks after onClick

* fix(routes): Remove react-router-redux

* feat(Router): Add lang to all route actions by default

* fix(entities): Only fetch challenge if not already loaded

* fix(Files): Move files to own feature

* chore(Challenges): Remove vestigial hints logic

* fix(RFR): Update challenges on route challenges

* fix(code-storage): Should use events instead of commands

* fix(Map): ClickOnMap should not hold on to event

* chore(lint): Use eslint-config-freecodecamp

Closes #15938

* feat(Panes): Update panes on route instead of render

* fix(Panes): Store panesmap and update on fetchchallenges

* fix(Panes): Normalize panesmaps

* fix(Panes): Remove filter from createpanemap

* fix(Panes): Middleware on location meta object

* feat(Panes): Filter preview on nonhtml challenges

* build(babel): Add lodash babel plugin

* chore(lint): Lint js files

* fix(server/user-stats): Remove use of lodash chain

this interferes with babel-plugin-lodash

* feat(dev): Add remote redux devtools for ssr

* fix(Panes): Dispatch mount action

this is needed to trigger window/divider epics

* fix(Panes): Getpane to use new panesmap format

* fix(Panes): Always update panes after state

this lets the panes logic be affected by changes in state
2017-11-09 19:10:30 -06:00
Berkeley Martinez 42bfa2e64d feat(app): new layout (#14707)
* feat(app): Restructure app to be more flexible and redux idiomatic

BREAKING CHANGE: Lots of breaking changes

* refactor(challenges): Redux to started file structure

* fix(app): lint issues due to refactor

* fix(settings): Refactor settings to use folder structure

* refactor(challenges): Move step redux stuff into step folder

* fix(challenges): Remove fetchchallenges actions

* refactor(challenges): Move project redux logic into project view subdirectory

* refactor(app): %s/sagas/epics/g

* refactor(redux): Use new redux-epic with combineEpic and ofType

* refactor(app): Move challenge selector to app level

* fix(app): Move loading challenge info into challenge route

This moves a lot of the logic needed to load challenge info into the challenge app. This decouples
the main app from the challenge route

* refactor(map): Map is now decoupled from challenges

* refactor(challenges): Use selectors everywhere instead of guessing state shape

* refactor(client): refactor client epics to use selectors

* refactor(app): Refactor userSelector to return user object instead of object.user

* refactor(entities): Move entities logic into it's own file

* fix(redux): combineTypes should be combineActions

* fix(app): reducer namespacing and import

* fix(Map): Fix undefined type and update redux-action

* fix(redux): Refactor fetchUser to be more declarative

Use rxjs methods instead of imperative if/else. Also prevent non-actions from being emitted

* fix(redux): toString multi phase action types

* fix(redux): typecast multiphase type, fix typo in reducer

toString multiphase types in fetch challenge epic. Add epic to epics lists. Fix type in fetch
challenge complete handler

* fix(redux): updateCurrentChallengelogic should be centerlized

Move route changes to one location.

* fix(Nav): Prevent event object from hanging around

closeDropDown/openDropDown where handing on to the event object. This was causing issues with react
since event objects are recycled in React.

* fix(Map.Challenge): decouple map selector

* fix(Map): Decouple panel selectors from props

Panel Selectors no longer need to know the shape of a components props. Refactored component
selectors to decouple them entities state shape

* fix(Map.redux): Add select challenge epic and connect map epics

* fix(redux.analytics): Fix meta creator and nav/map events

* fix(redux): Update current challenge ajax

* fix(challenges): ssr fetch challenge should update challenge ui

Was using an epic to update challenge ui on fetch complete, but this was not working on ssr due to
the way ssr disables epics to wait for completion. This commit fixes this by causing the complete to
directly update state in the challenge ui

* fix(challenges): wrong import of types, refactor epic name

* fix(redux): Prevent fetch challenge epic from emitting null to dispatch

* fix(redux): prevent executechallenge from emitting null

* fix(challenges.redux): testsSelector returns just tests

* fix(challenges.redux): Prevent completion challenge from emitting null

* refactor(Challenges.Step): Refactor step challenge to release event object

* fix(redux): wrap reducers in factories
reducers exported from features need to be factories
this helps avoid cyclic requires messing up reducer creation
We end up with exports from files being undefined as node tries
to resolve cyclic dependencies.
This prevents that by wrapping the `handleActions` call so that the ref
to types imported from parent features are closures and can be resolved
by node before we need them.

* fix(Map): createUi not working correctly

map utils should receive just map ui state, createMapUi needs to add title to challenge

* feat(Challenges): Adds Panes and panes backend challenge

* fix: Create child container to wrap children

Create a ChildContainer comp' to wrap all children that represent the view for the current route.
This let's the child route define if they want a full width view or if they want the standard
max-width view.

* feat(Panes): panes now render dividers

* feat(Panes): Get divider to move currectly

* fix(Nav): Add top margin to contained childs

Move margin-bottom from nav to child container as margin top. This let's the jsbin style views fit
snug with navbar

* fix(Panes): Should be contained within their borders

* feat(Panes): Update navbar height of pane on app mount

* feat(Panes): Toggle map on map nav btn click

* fix(gulpfile): Ensure nodemon exits on restart

On process exit, wait for nodemon to shutdown before process.exit

* feat(Panes): Make Panes redux first

* fix(Panes): Fix divider positioning

* fix(Panes): Update divider moved handler

dividerMoved action now uses new panesByName structure

* feat(Panes): Pane nav button will hide panes

* chore(package-lock): Update package lock

* feat(Panes.redux): Recaculate dividers on pane toggle

* fix(Challenges): Update challenge on dashedName change

This fixes backwards navigation not updating the redux state current
challenge

* feat(Panes.redux): Clear panes on unmount

Clearing panes on unmount will clear bin buttons in nav

* refactor(Map): Colocate styles

* feat(Map): New map layout

* fix(Map): No longer has it's own page

* fix: FetchChallenges on appMounted

* feat: Normalize fetchChallenge(s) results

This allows superblocks to be sent with both fetchChallenge and
fetchChallenges so the map is always populated on first load

* feat(Map): Show blocks on first load

* fix(less): Remove old css

* feat(Nav): Reduce nav height

* fix(Nav): Render nav after content

Render nav after content and use css to reverse again on screen. We do
this so the panes can render first and update redux panes state which
will then update the nav ui state before nav has a chance to render

* fix(Panes): Add container

This adds a Panes Container that will allow it to udpate redux state so
Panes Component will have redux state ready to actually render panes

* feat(Challenges.Classic): Add panes

* fix(Challenge.Classic): Editor onchange should not need to know about file

* fix(Panes): Index on panes hide should account for hidden pane

* fix(Challanges.Classic): Fix panes types

* fix(Challenges): Add completion modal to all challenges

Change classic modal to completion modal

* fix(Panes): Dividers live on top of planes

* fix(Challenges): Remove codemirror theme

Remove codemirror theme and remove borders from preview frame

* fix(Challenges.Classic): Remove old component

* feat(Challenges.Step): Add panes to step challenge

* feat(Challenges.Project): Add panes to projects

* fix(Challenges.Projects): Remove row

* fix(Modals): Move modal text color to challenge less

This text color is dependent on the actual header color

* fix(Map): Use Superblock title for ui

* fix(Map): Reduce panel header height

* fix(app): Capitalize Toasts folder

Feature folders should be campitalized

* chore(Map): Remove unused epic file

* fix(Step): Fix tests

* test(Map): Update createMapUi tests input
2017-07-31 22:04:01 -05:00
Stuart Taylor 496c648f46 Fix: Lang routes persist between sessions 2016-11-29 23:10:08 +00:00
Stuart Taylor 9e727ee0c1 Fix for CSRF Token issue 2016-10-27 23:22:51 +01:00
Berkeley Martinez a6f9e95ed8 Feat: Add react-hot-loader
Combine webpack and browser-sync on one port
2016-09-27 19:49:58 -07:00
Berkeley Martinez 9d1e8c5a33 chore(toasts): refactor and test flash to toast logic 2016-09-01 18:46:09 -07:00
Berkeley Martinez 1a7c289324 Fix(flash): Turn flash messages into toasts. 2016-09-01 17:37:30 -07:00
Berkeley Martinez 5381b0660c Feature(analytics): Add redux logic for analytics
Add(nav): Add event tracking to nav bar
Add(Drawer): Add event tracking to chat/map drawer
2016-07-28 23:40:01 -07:00
Berkeley Martinez 94a297c570 Fix(challenge): coming soon challenges unclickable in prod 2016-07-28 23:40:01 -07:00
Berkeley Martinez 95aab958aa Feature(langauge): Make client history language aware
Remove need for language aware links
2016-07-28 23:40:01 -07:00
Berkeley Martinez d9e9af0a0f Feature(mousetrap): Add mousetrap features to redux 2016-07-28 23:40:01 -07:00
Berkeley Martinez 2207a26ee9 Udpate react-router-redux 2016-07-28 23:40:01 -07:00
Berkeley Martinez 9b7bd2a026 Initial preview rendering 2016-07-28 23:39:17 -07:00
Berkeley Martinez e173463cdb Fix window height adjustment during dev 2016-07-28 23:39:17 -07:00
Berkeley Martinez b6f9cfdf71 Move to redux-epic 2016-07-28 23:39:17 -07:00
Berkeley Martinez d511be3332 Add new rx saga 2016-07-28 23:39:17 -07:00
Berkeley Martinez 844afb6e2f Add webpack code splitting module
Add cold-module replacement
Add webpack module hashing
2016-07-28 23:39:17 -07:00
Berkeley Martinez 4e12c45057 Add webpack cold reloading
On changes to the react bundle
webpack will store the current redux state
in localStorage, waits (to allow the server to restart)
then refreshes the page. On page load, it checks if it
has state stored and loads it into the app.
2016-07-28 23:39:17 -07:00
Logan Tegman c015cb5ec5 Inject csrf token into react app 2016-05-09 10:13:02 -07:00
Rommel Sunga d2af0c6a03 Fixed DOMContainer typo. 2016-03-11 10:25:59 -08:00
Berkeley Martinez c50510db71 Update history/react-router 2016-03-03 17:53:33 -08:00
Berkeley Martinez 8ef3fdb6a0 Initial move to redux 2016-03-03 17:53:33 -08:00
Logan Tegman 4341a3eee2 Update babel to 6.0 2016-01-10 20:21:15 -08:00
Berkeley Martinez 9acc946a4e Fix for no key issue
Now if location has no key, it is assumed that history hasn't updated
2016-01-09 18:38:15 -08:00
Berkeley Martinez 8e930fbe8a Add toasts to react app 2016-01-07 15:04:32 -08:00
Berkeley Martinez 4e5da23844 Add error handling
In the near future these will be handled by a toast.
2016-01-05 12:34:50 -08:00
Berkeley Martinez ea574d721e Make document titles work 2016-01-04 14:27:22 -08:00
Berkeley Martinez 80d36cc3cd Get router history working with flux 2016-01-04 14:27:22 -08:00
Berkeley Martinez acb05e3a71 Question now semi functional 2016-01-04 14:27:22 -08:00
Berkeley Martinez cec243b032 [add] Upgrade ThunderCats react 2016-01-04 14:27:22 -08:00
Berkeley Martinez 83e82bd967 Fix issue with transitioning between routes 2015-10-29 17:10:30 -07:00
Berkeley Martinez d633f74ff9 Change goToPayPal flow 2015-10-29 17:10:30 -07:00
Berkeley Martinez da26f19cde Adds paypal button and completes the number of views 2015-10-29 17:10:26 -07:00
Berkeley Martinez a34bcc2266 fix (hack) override history object with original 2015-09-21 12:54:33 -07:00
Berkeley Martinez e579cbd778 update to react-router 1.0.0-rc1 2015-09-21 12:54:33 -07:00
Berkeley Martinez db80c098e5 add es6 shim file
use Object.assign
2015-09-10 16:27:09 -07:00
Berkeley Martinez e36dd9970a fix rx long stack trace support 2015-08-12 11:47:03 -07:00
Berkeley Martinez a1a4ac883d add user stores/actions
construct fetchr on every request
2015-07-24 22:27:52 -07:00