Commit Graph

27 Commits

Author SHA1 Message Date
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
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
Petr Gazarov
f159027025 Remove bower and port dependencies over to npm 2017-02-09 00:09:39 -05:00
Berkeley Martinez
3a4e62da44 feat(nav): Add dropdown menu 2016-12-30 16:08:15 -08:00
Hallaathrad
f88f5dd5d4 revisioning 2016-04-12 10:34:24 -04:00
shl_kfy
1dee10a55c change color of labs 2016-03-08 16:38:12 +00:00
Hallaathrad
85a78046d1 fix for navbar overflowing at 4 digits brownies 2016-02-07 14:02:45 -05:00
Hallaathrad
a903db76e3 Minor aesthetic changes 2016-02-05 23:46:11 -05:00
Hallaathrad
81f9b92bed Adjust spaces and sizes on sidebar
Addressing the changes discussed over skype to fix #6564, and an incoming issue with #6584 in which the absence of the button will create awkward empty spaces.
Took that chance to improve the spacing even further —vertical real state.

----

bonus: changed the colour for the navbar hover status (brown -> darkgreen)
2016-01-29 18:29:26 -08:00
Quincy Larson
e02000bddd start adding accordion map 2016-01-15 17:19:39 -08:00
Berkeley Martinez
039f68b548 Finish up hikes 2016-01-15 04:51:11 -08:00
Berkeley Martinez
b5d9ba1a4d Fix background on list items 2016-01-15 04:51:11 -08:00
Quincy Larson
1e5f3dc61c refactor map view and make buttons and text bigger 2016-01-15 04:49:46 -08:00
Quincy Larson
3105dda128 fix seeding errors and remove meet-bonfire from certification requirements 2016-01-15 04:46:20 -08:00
Berkeley Martinez
7187ae1841 Fix btn success color 2016-01-15 04:36:15 -08:00
Berkeley Martinez
b4a63f799a Change buttons to ghost type 2016-01-15 04:36:15 -08:00
Berkeley Martinez
b7c071bcfb Fix btn success color 2016-01-15 04:14:38 -08:00
Berkeley Martinez
1661550c68 Change buttons to ghost type 2016-01-15 04:14:38 -08:00
Quincy Larson
f410a94b54 Update 2016-01-15 04:10:16 -08:00
Quincy Larson
7eefcb0705 more redesign work on challenge views 2016-01-15 04:10:16 -08:00
Quincy Larson
7e481833cd Revert "make navbar brown again"
This reverts commit 18224e14f7b9ee356450bae54959b770c5ec4c7c.
2016-01-15 04:09:57 -08:00
Quincy Larson
345b0a5513 make navbar brown again 2016-01-15 04:09:57 -08:00
Quincy Larson
4101a6c34a start simplifying views 2016-01-15 04:09:57 -08:00
Quincy Larson
953df6826b fix merge conflicts 2015-09-14 00:02:42 -07:00
Berkeley Martinez
306c441ae7 add revisioning to js/css files to break caching
This moves the location of javascript files, commonFramework,
iFrameScript, sandbox, plugin, and all the less files.
On gulp or gulp build these files are moved and revisioned.
Places where they are references in jade/html are now removed and
replaced with the use of a helper function `rev`. This function will
take the required file and return a string referencing the revisioned
file. This should alleviate the need for hard refreshing and will break
caches when files change, so fixes for firefox caching issue as well.

NOTE: @benmcmahon @quincylarson, This means files will need to be build
on the server in production before doing a server restart/reload
In production: 'npm run build' To build and revision js/css files

`gulp` and `gulp build` will used in development

npm install also needs to be run in production on initial deploy
2015-08-26 23:30:33 -07:00