Commit Graph

118 Commits (e6110fe71876bb29509d610eb9680f06bfb11449)

Author SHA1 Message Date
Tarun Singh 90ba46f6f0 fix(URLs): Changed protocol relative URLs to Https URLs
BREAKING CHANGE: None

Closes #16522
2018-01-25 20:11:01 +05:30
Berkeley Martinez 4a911931d0 fix(server/flash): Api to match documentation
This fixes duplication issues and normalize our use with everyone else
2018-01-18 15:20:54 -08:00
Quincy Larson 4fffd907ce fix(copy): Edited challenge completed copy (#16507) 2018-01-16 11:14:31 +05:30
Cassidy Pignatello eab62f6623
Merge branch 'staging' into fix/normalize-flash-type 2018-01-10 14:19:00 -05:00
cassidypignatello f158183039 fix(app): Normalize flash type
Changed flash messages to use types provided by Bootstrap

Closes #16395
2018-01-08 17:25:45 -05:00
Berkeley Martinez 35a290f8fa feat(server): Move wepback require code split
Clean up server code
2018-01-07 11:18:26 +05:30
Berkeley Martinez d5e7bd586d fix(handled-errors): Handled errors should default to 200 2018-01-02 23:38:01 +05:30
Berkeley Martinez 750c9f1eab fix(passwordless): Reduce db calls, run in parallel
Adds validations, reduces the number of database calls, separates
concers. reduces logic
2018-01-02 23:38:01 +05:30
Stuart Taylor 7d7e559b08 fix(map): Render superBlock titles on initial render 2017-12-27 10:56:30 +00:00
Jonathan Grah 674ce83ab0 feat(cert): Certificates (#16185)
* feat(cert): finished layout and design of legacy certificates

* feat(cert): added new certs

* feat(cert): added logic for new certs

* feat(cert): updated claiming challenges

* feat(cert): fixed various small issues

* feat(cert): completed suggested changes
2017-12-20 19:15:23 -06:00
Berkeley Martinez 2e410330f1 Feat(Challenges): no js preview (#16149)
* fix(files): Decouple files from challenges

* feat(server/react): Remove action logger

use redux remote devtools instead!

* feat(Challenges): Disable js on edit, enable on execute

* feat(Challenge/Preview): Show message when js is disabled

* refactor(frameEpic): Reduce code by using lodash

* feat(frameEpic): Disable js in preview by state

* feat(frameEpic): Colocate epic in Challenges/redux

* refactor(ExecuteChallengeEpic): CoLocated with Challenges

* refactor(executeChallengesEpic): Separate tests from main logic

* feat(Challenge/Preview): Update main on edit

* feat(frameEpuc): Replace frame on edit/execute

This allows for sandbox to work properly

* fix(Challenges/Utils): Require utisl

* revert(frameEpic): Hoist function to mount code in frame

* fix(frameEpic): Ensure new frame is given classname

* feat(executeChallenge): Update main on code unlocked

* fix(frameEpic): Filter out empty test message

* fix(Challenge/Preview): Remove unnessary quote in classname

* feat(codeStorageEpic): Separate localstorage from solutions loading

* fix(fetchUser): Merge user actions into one

prefer many effects from one action over one action to one effect

* fix(themes): Centralize theme utils and defs

* fix(entities.user): Fix user reducer namespacing

* feat(frame): Refactor frameEpic to util

* feat(Challenges.redux): Should not attempt to update main from storage

* fix(loadPreviousChallengeEpic): Refactor for RFR

* fix(Challenges.Modern): Show preview plane
2017-12-07 18:13:19 -06:00
kennethlumalicay 46383ddaa6 fix(user): new function to compute unique days within hours. 2017-12-04 19:10:33 -05: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
Marc Rendl Ignacio ed68463738 fix: remove random compliment without gender-neutral alternative 2017-10-21 08:18:58 +08:00
Mrugesh Mohapatra 5e86b25a69 fix(auth): Remove reset password endpoint 2017-09-17 14:54:48 +05:30
Berkeley Martinez 9bb9cbe1bc fix(url-utils): S%/com/org/g 2017-09-01 17:38:37 -07:00
Mrugesh Mohapatra 2321f7b326 feat(server): Add URL utils to compute server URL, HOST, PORT, etc. 2017-09-01 17:32:20 -07:00
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
Berkeley Martinez 2fcd976700 fix(signup): signup auth (#15628)
* fix(models.user): Colocate all user methods

Moved user methods/extensions into one file. Tracked down `next method
called more than once` error and setting headers after their sent. Let
regular error handler handle api errors as well.

* feat(server.auth): Disable github account creation

We are no longer allowing account creation through github

* refactor(Auth): Move user identity link into models dir

* feat(Disable link account login): This removes the ability to use a linked account t

* feat(errorhandlers): Add opbeat, filter out handled error
2017-07-14 00:09:07 +05:30
Stuart Taylor c886ebfa92 Remove duplicate from blacklisted usernames (#14769) 2017-05-08 20:29:00 +05:30
Berkeley Martinez 962675ee17 feat(api): Add active user api 2017-01-26 18:01:15 -08:00
Mrugesh Mohapatra 1f67c72fc6 feat(user): Report profiles
This adds a simple email-based mechanism to report profiles for
abuse. An email with text from the report is sent to Free Code
Camp's support account with the reporter's account in copy. This
also adds the reporter's details to the report for follow ups.
2017-01-13 00:14:29 +05:30
Zach Latta e818f2f4a2
Improve Hack Club's entry on /commit 2016-12-30 13:26:17 -08:00
Stuart Taylor 9d46ebfc29 Added note about language degradation 2016-11-29 22:52:05 +00:00
Berkeley Martinez 3e6e214d51 Chore(tests): Move tests 2016-09-23 15:38:49 -07:00
Berkeley Martinez 606bfd7c88 Fix(accounts): show challenge info on user profile
This changes the behavior of the user profile page to pull the current
challenge info from our challenge map and overwrite the user challenge.
This should also make name changes point to the correct challenge
regardless of the info saved to the user profile
2016-08-01 18:48:31 -07:00
Berkeley Martinez 1981e5b1a9 Fix(routes): ignore link routes in lang redirects 2016-07-28 23:41:23 -07:00
Berkeley Martinez 668bd74690 Fix(lint): Add import eslint and fix import errors 2016-07-28 23:40:01 -07:00
Berkeley Martinez cc0543d5df Fix(lint): correct lint errors 2016-07-28 23:40:01 -07:00
Berkeley Martinez 078560c3ba Add language routing 2016-07-28 23:40:01 -07:00
Berkeley Martinez 4514d39eff Add challenge map service 2016-07-28 23:39:17 -07:00
Quincy Larson 3c95ea0e15 remove hodor from congratulatory quotes - it's not funny anymore 2016-07-08 19:00:17 -07:00
Jonathan ecd1f628e2 Added Bio from GitHub to freecodecamp portfolios
- Removed unneeded code
2016-06-18 19:07:57 +01:00
Thomas Gerot 2f196f45b7 Added hyphen. "Kool Aid">"Kool-Aid"
https://github.com/FreeCodeCamp/FreeCodeCamp/issues/8967
2016-06-05 00:03:15 -05:00
Berkeley Martinez 1906f5d57c fix(email): Remove flash until author required bug is fixed 2016-06-03 00:19:41 -07:00
Quincy Larson 7eaa780351 fix email copy and flash message link copy 2016-06-02 23:39:36 -07:00
Berkeley Martinez 564f4c1180 Update email info copy 2016-06-02 13:48:56 -07:00
Mrugesh Mohapatra ff4dfb09da Add email verification and notifications
This commit
- [x] Fixes the flash notice color (Trivial)
- [x] Adds flash message for user with no email.
- [x] Adds checks to see if user's email is verified, and displays corresponding notification.
- [x] Adds email templates.
2016-06-01 08:34:34 +00:00
Quincy Larson ee2e0e290f Merge branch 'fix/theme-flash' of https://github.com/BerkeleyTrue/FreeCodeCamp into BerkeleyTrue-fix/theme-flash
Conflicts:
	common/models/user.js
2016-05-12 21:28:29 -07:00
Berkeley Martinez 8166bfbcd8 Remove o-auth account creation
Accounts can only be created with Github or email
2016-05-02 21:26:47 -07:00
Aniruddh Agarwal 09bf747cfc
Change ESLint quote-props rule to as-needed
Also fixes all files flagged by the rule
2016-04-16 00:31:13 +08:00
Berkeley Martinez b2462e1b4c Fix sitemap
Add 24 hour cache
Add jobs to sitemap
Possible warning about to many eventemitter listeners
2016-04-07 13:31:58 -07:00
Berkeley Martinez 06ea132257 Add timed cache to user count queries 2016-04-05 14:45:09 -07:00
Jacob Bearden fcf866906b fix image protocol 2016-03-16 20:32:12 -06:00
Berkeley Martinez 74592e72b4 Update eslint, fix lint issues 2016-03-03 17:53:33 -08:00
Berkeley Martinez 8ef3fdb6a0 Initial move to redux 2016-03-03 17:53:33 -08:00
Berkeley Martinez 0354eeae16 Move idMap to utils so it can be used elsewhere 2016-02-10 16:34:09 -08:00
JelenaBarinova 631c7ea319 Timestamps are converted to start of the days and filtered to b unique before calculating streaks 2016-02-09 13:48:20 -08:00
Berkeley Martinez c7fc9dc99f Merge pull request #6601 from SaintPeter/feature/challenge-checksum
Add Checksum to Challenges for Google Analytics
2016-01-31 17:36:16 -08:00