CityOfBoston / boston.gov-d8

The official repository City of Boston public website, boston.gov.

Home Page:https://boston.gov

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Create better link for Status Item message

davidrkupton opened this issue · comments

Jira link: https://bostondoit.atlassian.net/browse/DIG-94

Issue

  • Remove "link" field from the API.
  • Add "More Information" clickable-text link to message body

The connected-bits mobile app (311 App) receives the status item message data feed from the Drupal API (API Feed). The 311 App processes that feed and displays the content. If the body of the message from the API Feed is long (e.g. more than 100chars) the body text by the 311 App and "..." is added to the shortened message.

In the 311 App, if the user clicks the message then either
[1] If there is a valid URL provided in the API feed the user is redirected (away from the 311 App) to the URL, or
[2] If there is no URL, but the message body has been truncated, then the full message is shown (in the 311 App), or
[3] if there is no URL and the message is not shortened, then nothing happens.

At this time, a bug in the 311 App stops [2] from happening. This bug will be fixed for launch.

Proposed Resolution

  1. Because the links generally lead to generic pages describing the service related to the status item, and not to the status item "state" itself we should not provide a URL (to the boston.gov page related to the status item) in the links field in the API Feed. E.g. if street sweeping is cancelled, following the link for that message just takes the user to a page describing general street sweeping info, not information about the cancellation. This would potentially be annoying to users.
  2. We append a "More Information" (or "Service Information", or similar) link to the bottom of the message body in the API Feed, make that link clickable and have it go to the page that we are currently providing in the link field of the API Feed. Note: we need to translate and provide the link's displayed text into the 10 languages.
  3. [optional/discussion] We allow the content editor to control whether the More Information link is added to the message for a status item. (This would avoid hardcoding a solution if we don't want some messages to have links appended)

@juliagtzp this is the ticket David wrote up to update the API work so the service alerts in the BOS311 app are not URL links. We suggest adding a More Information Link at the bottom of the service alert with the appropriate URL to allow the user to navigate to boston.gov for more information.

@davidrkupton -- couple of questions:

  1. We can control whether the 'More Information" link shows on an alert but it is available for all alerts if we want via the API?
  2. Option 3 does this mean James can add a URL to any status alert and it will be passed through the API, the there is no development here when we want to update and show the More Information link?

@stephaniemar Without option 3 the content editor would have no control over whether the link appeared on any particular message. It would be hard-coded and need a developer to change (there would be a default set for new messages).
These proposed changes only affect the API - all other uses/implementations of the status items (e.g. on homepage) are unchanged.

@davidrkupton Ok, so option 3 gives a content developer control of whether a URL shows up? James or Micah would do this in drupal?

Yes.
I propose to add 2 fields to the message in the backend:
[1] a checkbox: "Add this Link to 311 API message body", and
[2] a field in which the content editor can specify the url for the link.
I will add a fieldset around the these 2 fields with a title so it is clear they are linked settings.
If the checkbox is not checked then the "More Information" link is not appended to the message body. If the box is checked then the "More Information" link will be appended, and clicking it will redirect to the URL provided in the second field.

Perfect, thanks for the explanation, very helpful @davidrkupton

This sounds like a great solution!! Let's do it

Closing this ticket as the work has been documented in Jira for the API work and BOS311 App