umts / BusInfoBoard

A place to view bus arrival information from Avail's JSON feed
Apache License 2.0
15 stars 3 forks source link

Show public messages #72

Closed dfaulken closed 6 years ago

dfaulken commented 6 years ago

Closes #71.

Default view:

screen shot 2017-12-04 at 11 45 38 am

Messages only:

screen shot 2017-12-04 at 11 54 47 am

No messages:

screen shot 2017-12-04 at 11 54 54 am
dfaulken commented 6 years ago

So before we merge this, we should contact the organizations using the various kiosks. If they want to control when they start displaying public messages, in case they want to monitor how that change looks on their kiosk, they should set &show_messages=no now. It will have no effect on the current master codebase, and will cause there to be no change once this is merged.

dfaulken commented 6 years ago

Thanks @Anbranin. I'll wait for @werebus as well on this one (unless we think it's particularly pressing).

sherson commented 6 years ago

So before we merge this, we should contact the organizations using the various kiosks. If they want to control when they start displaying public messages, in case they want to monitor how that change looks on their kiosk, they should set &show_messages=no now. It will have no effect on the current master codebase, and will cause there to be no change once this is merged.

Yesterday, I reached out to folks at the GRC and the Design Building about that.

  1. In the case of your screenshots, the text of the alert contains the routes affected. That's pretty buch how we always do it, because we're copy-pasting from Twitter and Facebook, but do we want to rely on that? Should we show the affected routes somehow?

Good point. Perhaps we can leave the routes out messages, and prefix them. For instance, currently the feed has:

  <PublicMessage>
    <ChannelMessages />
    <DaysOfWeek>Monday Tuesday Wednesday Thursday Friday Saturday Sunday</DaysOfWeek>
    <FromDate>2017-07-31T00:00:00</FromDate>
    <FromTime>2017-07-31T00:00:00</FromTime>
    <Message>The Northampton Lodging bus stop is relocated 100-feet Southbound due to construction and sidewalk closures at the Northampton Lodging.</Message>
    <MessageId>30010</MessageId>
    <MessageTranslations />
    <Priority>Low</Priority>
    <PublicAccess>19</PublicAccess>
    <Published>true</Published>
    <Routes xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:int>30041</d3p1:int>
      <d3p1:int>30042</d3p1:int>
      <d3p1:int>30048</d3p1:int>
    </Routes>
    <Signs xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:int>999</d3p1:int>
    </Signs>
    <ToDate>2018-08-31T00:00:00</ToDate>
    <ToTime>2017-07-31T23:59:59</ToTime>
  </PublicMessage>

That'd look fine as "Routes 41, 42, 48: The Northampton Lodging bus stop is relocated 100-feet Southbound due to construction and sidewalk closures at the Northampton Lodging."

Potentially complicating things is that there will be a few different organizations updating this. I'll see if the others are amenable to adopting such a convention.

Another aspect to this is that Avail supports tweeting PublicMessages automatically. For various reasons, we do not currently do this with @umasstransit or @pvta. I'll find out if such tweets can include the routes (in case PVTA wants to start using this in the future), but this doesn't block us from deploying.

  1. What about non-route-specific alerts. Should we handle those?

We should render those along with messages corresponding to routes in the list of departures.

dfaulken commented 6 years ago

Showing route names with alerts:

screen shot 2017-12-07 at 8 40 17 am

Showing multiple alerts:

screen shot 2017-12-07 at 8 44 30 am
dfaulken commented 6 years ago

@sherson do you think we're all set to merge this?

sherson commented 6 years ago

Yep

sherson commented 6 years ago

Looks good

businfoboard with public messages