Commit Graph

617 Commits

Author SHA1 Message Date
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
Berkeley Martinez
dced96da8e feat: react challenges (#16099)
* chore(packages): Update redux utils

* feat(Panes): Invert control of panes map creation

* feat(Modern): Add view

* feat(Panes): Decouple panes from Challenges

* fix(Challenges): Decouple challenge views from panes map

* fix(Challenge/views): PanesMap => mapStateToPanesMap

This clarifies what these functions are doing

* fix(Challenges): Add view type

* fix(Panes): Remove unneeded panes container

* feat(Panes): Invert control of pane content render

This decouples the Panes from the content they render, allowing for
greater flexibility.

* feat(Modern): Add side panel

This is common between modern and classic

* feat(seed): Array to string file content

* fix(files): Modern files should be polyvinyls

* feat(Modern): Create editors per file

* fix(seed/React): Incorrect keyfile name

* feat(Modern): Highligh jsx correctly

This adds highlighting for jsx. Unfortunately, this disables linting for
non-javascript files as jshint will only work for those

* feat(rechallenge): Add jsx ext to babel transformer

* feat(seed): Normalize challenge files head/tail/content

* refactor(rechallenge/build): Rename function

* fix(code-storage): Pull in files from localStorage

* feat(Modern/React): Add Enzyme to test runner

This enables testing of React challenges

* feat(Modern): Add submission type

* refactor(Panes): Rename panes map update action
2017-11-29 17:44:51 -06: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
Dylan
ba084876d8 fix(styles): Add z-index to lint markers in code-mirror (#16024) 2017-10-24 22:56:32 +05:30
dhcodes
63a147257b fix(main): static page links and constantStrings 2017-09-16 17:16:48 -05:00
Quincy Larson
564e76b2bf fix(merge): Fix merge conflicts 2017-09-11 17:43:18 -05:00
Dylan
220960bdfd Merge pull request #15787 from AbdelghaniTassi/fix/font-consistency
Fix/font consistency
2017-09-03 17:38:20 -05:00
Markus Englund
b76f3aaf54 fix(settings): Make night mode settings-toggle actually work (#15817)
Closes #15790
2017-09-01 19:09:20 -07:00
Mrugesh Mohapatra
239313cb0b Remove sign up page and update button styles 2017-09-01 17:15:26 -07:00
Timo
dcfe18d5d5 refactor: Replace .com with .org 2017-08-26 00:07:44 +02:00
Zachary Kearns
a5c330de4d fix(settings): Improve email settings buttons
Closes #15772
2017-08-23 23:36:44 -04:00
Abdelghani TAssi
9030df2d8b fix: uniformize text font size to 15px
fix: change code area text font size to 15px

fix: undo modification that have been accidentally commited

fix: undo modification that have been accidentally commited

fix: change tests font size to 15px
2017-08-23 23:35:55 +02:00
dhcodes
6caf034e70 fix(frame): Fix fcc-test-frame on firefox
I used an alternative to display: none; to allow Firefox to properly run
challenge tests

Closes #10749
2017-08-21 09:15:50 -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
dhcodes
bc46368750 fix(styles): Change modal title color
Closes #15588
2017-07-25 09:07:03 -05:00
Dylan
e1a2fecd13 add donate links and mousetrap 2017-06-05 16:46:04 +01:00
Berkeley Martinez
70f2b797d9 Fixs classic modal styling not rendering
Move classic modal less files co-locating them in the app file structure
2017-05-19 05:46:35 +01:00
techstonia
9f60f40b71 Code tags removed from output 2017-05-01 21:27:00 +03:00
Berkeley Martinez
ee8ac7b453 feat(rechallenge): Retool challenge framework (#13666)
* feat(rechallenge): Retool challenge framework

* fix(code-storage): should use setContent not updateContent

* fix(rechallenge): fix context issue and temporal zone of death

* fix(rechallenge): Fix frame sources for user code

* fix(polyvinyl): Set should ignore source and transform should keep track of source

* fix(rechallenge): Missing return statement causing issues
2017-04-28 20:30:23 -05:00
Berkeley Martinez
4942156c31 Merge pull request #13229 from Bouncey/fix/nightModeOnPageLoad
Persist night mode on page load
2017-04-18 11:06:19 -07:00
slyty7
e8a7e31618 Update Modals.less 2017-04-01 00:56:33 -07:00
Stuart Taylor
d6e302dd58 Persist night mode on page load 2017-03-24 17:03:21 +00:00
ZZhaoTireless
45f1c92d79 Fix: replace all GoMix with Glitch 2017-03-23 22:26:45 -04:00
Venkateshwaran
9eb80b6220 CSS fix for issue - Night Mode Poor Contrast #13959 (#14037) 2017-03-22 00:17:58 -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
Ethan Arrowood
1491bf905f Initial state test icon color changed 2017-03-04 22:21:34 +00:00
Samuel Plumppu
3889f87cc3 Merge pull request #13651 from Ethan-Arrowood/fix/challenge-icon-color
Set default icon color to darkgreen
2017-03-01 11:06:16 +01:00
Ethan Arrowood
c1ad7d56a2 Set default icon color to darkgreen 2017-02-28 13:49:35 -05:00
Berkeley Martinez
81d720da5b Merge pull request #11474 from petrgazarov/chore/remove-bower
Remove bower and port dependencies over to npm
2017-02-27 15:03:59 -08:00
Samuel Plumppu
659fff05ab Merge pull request #13476 from nawazishali/fix/iPhone-frame
Fixed iPhone frame doesn't disappear on narrow widths
2017-02-22 21:33:58 +01:00
Nawazish Ali
e2e0fd7ccf Fixed iPhone frame doesn't disappear on narrow widths
Removed all unnecessary formatting.

I have removed all unnecessary formatting as requested. Sorry for inconvenience .

Squashed the second commit into first.
2017-02-22 23:43:00 +05:00
quentin
de707c185e indexOf() instead of includes() 2017-02-20 15:42:50 -05:00
Petr Gazarov
f159027025 Remove bower and port dependencies over to npm 2017-02-09 00:09:39 -05:00
Mrugesh Mohapatra
343397c282 fix: Update Gomix handler 2017-02-07 01:39:12 +05:30
Leon Feng
30bc87c1da Disable loopProtect for non-JavaScript code 2017-02-01 03:13:48 +04:00
Berkeley Martinez
f1d936198e feat(challenges): add backend challenge infrastructure (#11058)
* Feat: Initial backend view

* Feat: Refactor frame runner

* Feat: backend challenge submit runs tests

* Feat: Backend challenge request

* Feat: Whitelist hyperdev in csp

* Fix: Use app tests instead of challenge tests

* Feat: Allow hyperdev subdomains

* Fix(csp): allow hypderdev.space subdomains

* feat(challenge): submit backend

* feat: Add timeout to test runner (5 sec)

* chore(seed): Add more to test backend

* fix(csp): s/hyperdev/gomix/g

* fix(app): fix code mirror skeleton filepath

* fix(app): remove Gitter saga import

* fix(app): codemirrorskeleton does not need it's own folder
fix(app): cmk needs to work with Null types

* fix: No longer restart the browser when challenges change

* fix(app): Update jquery for challenges

* fix(seed): Remove to promise jquery call

* fix(lint): Undo merge error
undefined is no allowed

* fix(app): linting errors due to bad merge

* fix(seed): Remove old seed file
2017-01-26 23:07:22 -06:00
Berkeley Martinez
51912d5263 Merge pull request #12605 from petrgazarov/fix/upgrade-jquery-major-version
Bump JQuery major version - to 3.1.1
2017-01-26 15:00:16 -08:00
Quincy Larson
3e3fa12b52 Merge pull request #12048 from raisedadead/feature/reporting-profiles
feat(user): Report profiles
2017-01-26 14:16:16 -06:00
Mrugesh Mohapatra
f262bfd960 fix(night-mode): Update indenting and change border color 2017-01-24 22:23:20 +05:30
Markus Török
e1261526d8 fix(night-mode): Add css classes to unsubscribe button
Add class btn-toggle and remove bg-color from inactive buttons in night mode
2017-01-24 22:17:45 +05:30
Petr Gazarov
6594106002 Bump JQuery major version - to 3.1.1
closes #12015
2017-01-21 01:46:48 -05:00
Berkeley Martinez
86d4b5e841 chore: Remove unused/deprecated files 2017-01-19 17:56:07 -08:00
Peter Weinberg
e5c5a6ee63 amended nightmode styles: modals, dropdown, menu-toggle 2017-01-16 19:37:04 -05:00
Peter Weinberg
54c4f99066 added LESS rule for <dfn> tag in nightmode 2017-01-14 19:14:30 -05: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
Stuart Taylor
075476f15f Render CodeMirror skeleton for SSR 2017-01-03 21:25:14 +00:00
Berkeley Martinez
3a4e62da44 feat(nav): Add dropdown menu 2016-12-30 16:08:15 -08:00
Quincy Larson
183e1c64a2 Merge pull request #11593 from BerkeleyTrue/feat/no-sidecar-map
feat(nav): remove sidecar
2016-12-30 00:06:54 -06:00
Berkeley Martinez
1892654dab feat(nav): remove sidecar 2016-12-29 22:04:05 -08:00
Berkeley Martinez
ab977835e4 Merge pull request #11801 from Bouncey/fix/langRoutes
Fix: Lang routes persist between sessions
2016-12-29 20:12:49 -08:00