Commit Graph

55 Commits (d5f1687a0e478d10c2e40624bdce49278e94f276)

Author SHA1 Message Date
Berkeley Martinez c547c26bba Fix: map should redirect to current challenge (#15723)
* fix(routes): /map redirects to current challenge

* fix(map): Normalize server map building

Localize all server code dealing with the map

* refactor(server): Remove unused services

* feat(Nav): Show Map button when no panes

This gives user the ability to quickly return to their challenge using a
known feature

* fix(server.map): Add caching to nameIdMap

Add caching to nameIdMap on the server

* fix(services.map): Fix map service

Move map building utils to map util. Fix bad import. Normalize challenge
lookup
2017-08-03 22:45:36 -05: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
Quincy Larson 60187e6c28 Revert "Add Youtube videos to the map (#13592)"
This reverts commit 4a3fcba501.
2017-05-03 19:22:05 -05:00
Stuart Taylor 4a3fcba501 Add Youtube videos to the map (#13592) 2017-05-03 18:03:59 -05:00
Berkeley Martinez f4443e16dd feat(nav): make navbar static (#13673)
* feat(nav): make navbar static

make the navbar in react layout and the static layout stick to the top of the screen

* feat(challenges): Make classic view flex

Classic view now uses flex to control it's height. This was necessary to control view and allow
navbar to be static on other pages.

This breaks mobile view and other non-classic challenge views

* feat(app): Add logic to make screen expand on tablet

* fix(app): let routes define their content structure

* fix(less): use American spelling of gray

* fix(classic-preview): make preview smaller to prevent scroll

* feat(classic-frame): Make frame border less distinct

* fix(challenges): scope test suite less to challenges

* feat(challenges): make generic ChallengeTitle component
2017-03-13 18:17:07 -05:00
Peter Weinberg 3ed485b14a chore(common): updated common to freeCodeCamp 2017-01-14 19:49:01 -05:00
Stuart Taylor bba4ecc13c Refactor entities reducer for redux-actions update 2017-01-05 00:09:47 +00:00
Berkeley Martinez 3d93e70a73 Show dropdown on hover 2017-01-03 07:04:07 +00:00
Berkeley Martinez 1892654dab feat(nav): remove sidecar 2016-12-29 22:04:05 -08:00
Berkeley Martinez 2400ea04c5 feat(app): render spinner on /settings 2016-11-01 13:35:55 -07:00
Logan Tegman 2762238c8d Fix sitemap, remove jobs remnants 2016-10-06 22:10:26 -07:00
Berkeley Martinez 5fb2802e32 Chore(challenges): separate code storage sagas 2016-08-18 09:44:40 -07:00
Berkeley Martinez 8be0d194a5 Fix(challenge): update user challenge map on challenge complete 2016-08-11 16:41:03 -07:00
Berkeley Martinez d3dabb1f36 Fix(challenges): completed marked at render
Mark challenge completed using derived data in a selector
instead of manipulating the data on user load
2016-08-08 16:21:04 -07:00
Berkeley Martinez 94c4c846e9 Feature(theme): add nightmode react logic
We wait to load the user before applying the theme
as we will begin aggressively caching most of the react
app routes. This means we can not depend on user data to
determine.
2016-08-06 07:24:10 -07:00
Berkeley Martinez 91a50b4843 Fix(nav): Only update user data if current challenge actually changes 2016-08-04 15:18:51 -07:00
Berkeley Martinez 879f5b3bb8 Fix(nav): current-challenge should work when not on challenges 2016-08-04 15:16:55 -07:00
Berkeley Martinez f0955aea5c Fix(nav): Protect against missing data 2016-08-04 15:01:37 -07:00
Berkeley Martinez 8f14076f35 Feature(analytics): add event to fcc logo click 2016-08-03 15:51:28 -07:00
Berkeley Martinez 2b32fb3633 Feature(challenges): save users current challenge to db
This allows us to automatically load their current challenge
2016-08-03 15:51:28 -07:00
Berkeley Martinez 42de7c57ef Feature(nav): clicking on logo takes user to current challenge 2016-08-03 15:51:28 -07:00
Berkeley Martinez 9656d9030e Feaure(map): close map drawer on challenge transition 2016-07-29 16:51:32 -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 e5efcbb6c6 Feature(settings): Update url/challenge lang onChange 2016-07-28 23:40:01 -07:00
Berkeley Martinez 9a2dfca0fc Feature(settings): complete settings page logic 2016-07-28 23:40:01 -07:00
Berkeley Martinez 0d3dd75f41 Feature(settings): add user flag logic
This also moves a couple of settings to their own controller
2016-07-28 23:40:01 -07:00
Berkeley Martinez efcfaf0391 Feature(chat): Add help chat logic 2016-07-28 23:40:01 -07:00
Berkeley Martinez c204e8cdea Feature(toasts): make toast short lived by default 2016-07-28 23:40:01 -07:00
Berkeley Martinez 8e3c092029 Feature(toast): Move from react-toastr to react-notifications 2016-07-28 23:40:01 -07:00
Berkeley Martinez 668bd74690 Fix(lint): Add import eslint and fix import errors 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 1be1712577 Feature(redux): Add completed challenge logic to redux 2016-07-28 23:40:01 -07:00
Berkeley Martinez 0c07e961a7 Feature(components): fetch user after page load
This makes it easier to serve whole site statically in the future
Feature(redux): Move user state into entities
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 acf4d99f67 Add block scoping to challenges url 2016-07-28 23:39:17 -07:00
Berkeley Martinez dc36396369 Add view logic for all projects 2016-07-28 23:39:17 -07:00
Berkeley Martinez 7c2053f139 Move event method calls out of action creator 2016-07-28 23:39:17 -07:00
Berkeley Martinez 1acd3139c3 Add main chat toggle 2016-07-28 23:39:17 -07:00
Berkeley Martinez 8169e9e785 Add map drawer
This commit break map css. Will need to refactor how the map renders
2016-07-28 23:39:17 -07:00
Berkeley Martinez 515051d817 Fix lint errors
Remove commonFramework build from gulpfile
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 1eb6390b85 move map as a supdirectory of challenges 2016-07-28 23:39:17 -07:00
Berkeley Martinez a0f6ecfca2 Add initial dynamic challenge rendering 2016-07-28 23:39:17 -07:00
Berkeley Martinez 59dcabb588 Move fetchChallenges up a level 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 c909cd032e Add React Map 2016-07-28 23:39:17 -07:00
Berkeley Martinez f29545ef6c Move to localize non ui data 2016-07-28 23:39:17 -07:00
Berkeley Martinez 09ea99e561 Add react challenge view with editor 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
Logan Tegman 3e258a7868 Remove thundercats and oldActions, update react-dom 2016-05-03 22:12:59 -07:00