GreenInfo-Network / caliparks.org

Mapping social media in parks and other open spaces
http://www.caliparks.org/
22 stars 3 forks source link

Park supplemental content from OuterSpatial #658

Closed gregallensworth closed 6 years ago

gregallensworth commented 6 years ago

Let's read in some content from OuterSpatial and merge it into the parks data and park-details UI.

Visual mockup is below. Details and thought- caliparks_enhancedparkview_outerspatial_20170917 sketches in further comments.

CCing @danrademacher as my point of contact

gregallensworth commented 6 years ago

Documentation has been provided as to the OuterSpatial V2 API. It uses OAuth2 to generate a token, and this is included as a Authorization: bearer header in subsequent requests. I don't see any significant hurdles there.

Looking into the Details feed as documented, it looks as if this output contains most/all of what is needed (followup will confirm/deny this). Specific items are as follows:

gregallensworth commented 6 years ago

Status:

To do:

gregallensworth commented 6 years ago

Latest round creates responsive desktop/mobile behavior, and adds expand/collapse effect to the OS sections.

gregallensworth commented 6 years ago

f311e87 adds photos: cronjob parsing and HTML stowage. joining to CPAD content, display as a Slick carousel.

The small_square image is chosen, for best functionality on both mobile and desktop -- gives the best loading times and data usage, as well as nice carousel-style scrolling much as the slider below.

Using the medium_square version can fit well if your screen size is just right: on mobile it will downsize, but on most desktops you're still seeing a carousel with part of the next image. At smaller desktops, the medium_square does work well, but at smaller-desktop sizes you may scroll down a bit before seeing the prev/next arrows, and may not be able to see both the caption and the top of the image.

I'll check in and get some feedback and ideas on next steps.

danrademacher commented 6 years ago

For events, how do we exclude past events?

Like this: image

gregallensworth commented 6 years ago

Good catch. Thank you. I had presumed that could be done by the API, but was clearly mistaken.

73d9181 -- Events are now sorted with earliest first. Events dated in the past are skipped.

gregallensworth commented 6 years ago

New OuterSpatial content, deployed live.

Those with OS content show it: https://www.caliparks.org/park/1624 https://www.caliparks.org/park/1652 https://www.caliparks.org/park/1443

Those without OS content, are same as ever: https://www.caliparks.org/park/1496

gregallensworth commented 6 years ago

Scheduler set up, and confirmed working. OuterSpatial content will be updated each day.

ryanbranciforte commented 6 years ago

@gregallensworth Looks like the More Info link is broken on Mt San Jacinto https://www.caliparks.org/park/1652 Goes to this page - https://www.caliparks.org/park/www.parks.ca.gov/msjsp

Others look good.

gregallensworth commented 6 years ago

I'm not seeing that behavior on any of the computers here. I see that the link is properly formed (starts with http://) and opens to the CA Parks website. Maybe we can discuss and debug via private message?

ryanbranciforte commented 6 years ago

@gregallensworth Checked with staff, and someone went in and updated the link in OuterSpatial Manager, and it appears to have resolved the problem. All good.

danrademacher commented 6 years ago

Looks like some issue where future events are not always appearing:

image

On Nov 18. And here's our page, https://www.caliparks.org/park/1652.

No events section: image

Is this an issue on our end or API endpoint?

ryanbranciforte commented 6 years ago

Let us know what you discover. If it's an API endpoint issue, we'll get on it right away.

gregallensworth commented 6 years ago

I have been parsing the primary_events content for events, but was not aware of the attached_events structure. Looking at attached_events I do see 4 events which are being missed: Hubble, Geologic Story, Winter Essentials, and Round Valley.

I will work on integrating the attached_events content into the events output.

gregallensworth commented 6 years ago

The attached_events structure is identical to the primary_events structure, so it was very little work to merge these two structures to combine their events.

image

ryanbranciforte commented 6 years ago

👍

ryanbranciforte commented 6 years ago

@danrademacher @gregallensworth Are you guys seeing the event on the San Jacinto page? I saw it yesterday after Greg made the update, but was demoing this to another pilot park and noticed it is not there today.

https://www.caliparks.org/park/1652

screen shot 2017-11-15 at 11 08 22 am

gregallensworth commented 6 years ago

Sorry about that. I didn't push the updated cronjob to production in time for the Scheduler run to catch the updated version. The Scheduler ran the old one, which didn't support attached_events

ryanbranciforte commented 6 years ago

Looks good on my end!