Commit Graph

96 Commits (002e7d38c7b1e60a5cb2aa89bbfa0651e17970a8)

Author SHA1 Message Date
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 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 f018cae686 Merge branch 'staging' into fix/update-config-for-debug-setups 2017-04-17 14:38:28 -07:00
Berkeley Martinez 8ee371fff4 fix(build): gulp server process never finishing 2017-03-28 12:30:42 -07:00
Berkeley Martinez a2998c4b9c style(gulp): Linted gulpfile (#13978) 2017-03-28 13:25:08 -05:00
Mrugesh Mohapatra 566de3e3f2 fix: Update config to be flexible for host 2017-03-20 12:13:27 +00: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
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
Daniel Gonzalez Reina 3ce7910c4b Changed the reference to the path in guplfile.js to allow spaces in the local path to the repository. 2017-02-27 13:51:23 +01:00
Petr Gazarov f159027025 Remove bower and port dependencies over to npm 2017-02-09 00:09:39 -05: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 a6f9e95ed8 Feat: Add react-hot-loader
Combine webpack and browser-sync on one port
2016-09-27 19:49:58 -07:00
Berkeley Martinez cc8b608cb9 Moves to next challenges 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 9b7bd2a026 Initial preview rendering 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 c77fcedcbb Only use file hashing in production 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
gangachris c184609340 Add ability to toggle comments with ctrl/cmd + / keymap
Add ability to comment on editor with ctrl + /

load codemirror commenting plugin
2016-07-22 19:13:07 +03:00
Berkeley Martinez 3c1e08f894 Revert "Feature/Popover Definitions" 2016-07-16 21:35:28 -07:00
Berkeley Martinez e6f29ecc9c Feature/Popover Definitions 2016-06-17 23:53:44 +01:00
Berkeley Martinez 8ef3fdb6a0 Initial move to redux 2016-03-03 17:53:33 -08:00
Berkeley Martinez 9dbfa3c8da Merge pull request #6320 from bugron/fix/tooltip-shiftkey
Temporarily remove the 'popup' feature
2016-02-01 00:03:58 -08:00
Arsen Melikyan 18e8df53b9 Temporarily remove the 'popup' feature 2016-01-30 11:55:07 +04:00
JelenaBarinova 29f93df1bb Getting users timezone on client side and passing it to server side within POST (on challenge complete), showing users stats with users timezone
After CR
2016-01-26 15:09:47 -08:00
Sahat Yalkabov 5500e59258 Added mousetrap to enable keyboard shortcuts 2016-01-24 16:12:59 -05:00
Arsen Melikyan db57fd405f Add 'copy to clipboard' buttons for easy challenge link and code copying 2016-01-18 11:20:21 +04:00
Berkeley Martinez 50b1e61e70 Fix change challenge model to POJO 2016-01-15 04:51:11 -08:00
Berkeley Martinez 0e52466163 Add less source maps
Watch bootstrap less files
2016-01-15 04:14:38 -08:00
Rex Schrader b28c7089a2 Merge pull request #5974 from ltegman/fix/loop-protect-default-case
Fix loop protect thinking default cases are loop labels
2016-01-08 11:56:35 -08:00
Logan Tegman 5d6808e7af Fix loop protect thinking default cases are loop labels 2016-01-08 09:40:53 -08:00
Berkeley Martinez 30826d9ecb Fix production build never completing 2016-01-04 14:27:22 -08:00
Berkeley Martinez dd4589dd6f Fix manifest build order 2016-01-04 14:27:22 -08:00
Harsha 4e83352774 updated gulp to watch new file structure 2016-01-01 19:27:29 -05:00
JelenaBarinova 6c7d2685fd Current and Longest streak calculation fixed
Minor refactoring and unit tests added

After CR: user-stats file moved to util folder, export keywork added to exported functions, new line added at the end of gulp file

User-stats-test file moved to replicate user-stats path in test folder
2015-12-15 18:33:04 -05:00
Quincy Larson 676ef0e253 finish qa-ing removal of angular 2015-12-04 19:21:19 -06:00
Berkeley Martinez 9c97f90f66 Add source map profiling to all files 2015-12-02 23:19:02 -08:00
Berkeley Martinez 3a299daa37 Add loop-protect
Remove webworkers
2015-12-02 11:50:52 -08:00
Logan Tegman 66e01e683d Fix Codemirror Emmet Plugin Support 2015-12-01 14:50:45 -08:00
Berkeley Martinez ce37991c50 Remove console.logs 2015-11-29 16:28:32 -08:00
Berkeley Martinez eec7fff909 Fix jQuery challenges 2015-11-29 16:28:32 -08:00
Berkeley Martinez 74fa49cd75 Reset and execute update display and storage 2015-11-29 16:27:14 -08:00
Berkeley Martinez 4bdf1b2854 Add gulp build of commonFramework 2015-11-29 16:27:14 -08:00
Berkeley Martinez 748f7ab93f Progress towards refactoring 2015-11-29 16:21:04 -08:00
Berkeley Martinez 545e545f51 Fix for manifest not updating on initial build 2015-11-29 16:21:04 -08:00
Berkeley Martinez 0a46dc16a6 Fix for vendor files not working correctly with manifest 2015-11-29 16:21:04 -08:00
Berkeley Martinez 87fa38182e bundle vendor files 2015-11-29 16:20:17 -08:00
Berkeley Martinez c71636b629 Minify react in production 2015-11-22 20:26:44 -08:00
Berkeley Martinez 533a3f1d58 Don't use es6 in gulpfile 2015-11-09 22:31:31 -08:00