Closed gregallensworth closed 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:
[x] Rename existing Photo View to "Instagram Feed"
[x] Highlights
[ ] Highlights, add alerts
posts
content (array of posts) where is_alert is true[x] Photo Feed
image_attachments
section of the API output[x] Featured Events
primary_events
section of API output: array of event objects[x] About Visiting
content_blocks
attribute: array of objects[x] These 4 items go into the park details view
Status:
Scraper is working just fine, updating a new DB table. The OUTERSPATIAL.md document describes this in detail.
Content is present in park details page, and looking up to spec.
To do:
Desktop behavior. Looks great on mobile. Desktop's columnar layout uses floats, so there'll be some fussing involved in getting this to fit into place.
Accordion effect to expand/collapse sections.
No Alerts. Alerts are not yet fully implemented at OS; this is a future functionality.
Photos not implemented, yet.
Latest round creates responsive desktop/mobile behavior, and adds expand/collapse effect to the OS sections.
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.
For events, how do we exclude past events?
Like this:
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.
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
Scheduler set up, and confirmed working. OuterSpatial content will be updated each day.
@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.
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?
@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.
Looks like some issue where future events are not always appearing:
On Nov 18. And here's our page, https://www.caliparks.org/park/1652.
No events section:
Is this an issue on our end or API endpoint?
Let us know what you discover. If it's an API endpoint issue, we'll get on it right away.
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.
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.
👍
@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
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
Looks good on my end!
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-
sketches in further comments.
CCing @danrademacher as my point of contact