Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WildCam Lab Classrooms - 2018 Rebuild - part 1 #122

Merged
merged 21 commits into from
May 11, 2018
Merged

Conversation

shaunanoordin
Copy link
Member

PR Overview

This PR is a massive overhaul of the WildCam Lab Classrooms and overrides previous work done in #107 and #114 . Requirements for WildCam-type classrooms and Astro-type classrooms have diverged in such a way that it now makes more sense to separate out WildCam-type components from the "standard" (i.e. Astro) classrooms.

Major Updates:

  • The Darien program code is now separated into the new /programs folder.
  • WildCam Classrooms and WildCam Maps (formerly Map Explorer) are now standalone modules, placed in the new /modules folder.
    • Each individual module should be fairly standalone - its /ducks, /containers, components should be easily separated from other modules' ducks/containers/components - and should be easy to plug into future WildCam-type Programs.
    • I've left the Astro Classrooms intact as the default "standard" classrooms, meaning its ducks/containers/components remain intermixed in the same hierarchy as the common/shared code (e.g. the Program Home Container)
  • WildCam Classrooms will consist of the modules necessary for a TEACHER or STUDENT to view and manage Classrooms and Assignments.
  • Current dev focus is on the Teachers managing classrooms. Sorry, Students who want to know how much work they've already done!
  • WildCam Classrooms will replicate a lot of the work done on standard classrooms. This means there's a duplication of effort & code here, but I feel it's necessary to 1. not interfere with the stability of Astro while 2. still make things work for WildCam's unique quirks (e.g. Subject selection, Student's version of the classroom & assignments view.)
  • WildCam Maps is the renamed Map Explorer, and serves the same purpose of allowing users to see data displayed on the map.
  • New MAP_STATE() pattern allows for quickly mapping a store's data values to a React's props.
  • New naming convention introduced to avoid collisions.
    • For example, Actions.wcc_teachers_fetchClassrooms is distinct from Actions.getClassrooms and (hopefully) signals to devs that any wcc_... code is related to the WildCam Classrooms module.
    • Also, MAP_STATE() lets us add prefixes to the mapped data keys in case we want to avoid collisions in a React component that accesses multiple Redux stores with similar keys. (e.g. "classrooms.status" and "assignments.status") Honestly, I don't see it being used much in this app, but I like the pattern enough to keep it in for future refrence.
    • OK, admittedly, WILDCAMCLASSROOMS_DATA_STATUS can be a mouthful... I might rename this to WCC_DATA_STATUS in the future if that makes sense to people.

Clarification:

  • The idea for separating the code into /modules and /programs is to separate the general from the specific. e.g. WildCam Darien and WildCam Gorongosa may both be programs, and each program will have their own specific configurations. Those configurations then plug into the general WildCamClassrooms and WildCamMaps components.
    • As far as new Program development goes, devs should only need to add a few new pages and some config files into /programs and not worry about the actual logic of how the components work (in /modules)

SAFETY:

NOT YET BUILT:

  • Full Classrooms functionality for Teachers. That's Part 2
  • Documentation. Each module should have a README.md explaining how the component should be used.

Status

Merging, part 2 coming soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant