WISE-Community / plate-tectonics-boundary-explorer

React app to teach students about plate tectonics
0 stars 0 forks source link

Added view to show location summary via the mode GET parameter #4

Closed hirokiterashima closed 3 years ago

hirokiterashima commented 3 years ago

Description I added a location summary view for this model that can be shown by passing in a mode=showLocationSummary GET parameter. The location can be specified by an additional location=[ccd/ooc/ood/cod/coc] GET param. Right now the view only shows what you typed in the prediction textarea.

Testing

  1. Create an embedded component and set its url to

    pt-boundary-explorer/index.html
  2. In another step, create another embedded component, connect it to the first PT model component using "connected components", and set its url to

    pt-boundary-explorer/index.html?mode=showLocationSummary&location=ccd
  3. As a student, do work on location ccd in the first embedded component. Remember what you wrote in the prediction textarea.

  4. Go to the second embedded component. It should display what you wrote in the previous step.

Closes #1

breity commented 3 years ago

Hey @geoffreykwan and @hirokiterashima, I styled and updated with options to display location text, boundary type selections, and student text. These can be set by URL params as well (showLocationText, showBoundarySelection, showStudentText) and all default to true.

Can you take another look? You can see it working here: https://wise.berkeley.edu/preview/unit/33873/node264.

hirokiterashima commented 3 years ago

@breity Looks great! The location summary display message is easy to read and digest. 👍 I had one comment about the code, see below.