Skip to content
This repository has been archived by the owner on May 21, 2019. It is now read-only.

Normalize vizwiz configuration schema #29

Closed
fionawhim opened this issue Apr 4, 2018 · 3 comments
Closed

Normalize vizwiz configuration schema #29

fionawhim opened this issue Apr 4, 2018 · 3 comments
Assignees

Comments

@fionawhim
Copy link
Contributor

If a JSON value should be interpreted as HTML, then its key should make that obvious. E.g. descriptionHtml and popoverHtmlMustache. Other keys that are just strings should stay the same (such as "title")

Putting this above the milestone only because migrating the config will be more of a pain once we're in the wild.

@fionawhim fionawhim created this issue from a note in Maps Module 🗺️ (In Progress) Apr 4, 2018
@fionawhim
Copy link
Contributor Author

First pass at normalization. Would like to find an API docs site or something to be able to put this in place for comment / documentation.

{
  "format": "1.0",
  "uid": "0PXs0K514dn917qVqw4Su",
  "dataSources": [
    {
      "uid": "HzViXPtxfbDTmKxSXTHv6",
      "icons": {
        "url": "https://patterns.boston.gov/images/global/icons/mapping/waypoint-charles-blue.svg",
        "cluster": true
      },
      "polygons": {
        "style": "default",
        "color": "#0C2639",
        "hoverColor": "#FB4D42"
      },
      "popupHtmlTemplate": "<div>&lt;img src=\"{{Image}}\" class=\"cdp-i\" alt=\"{{Councilor}}\" style=\"margin-bottom: 1rem\"/&gt;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;div class=\"ta-c m-v300\"&gt;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;div class=\"cdp-t t--sans t--upper m-t200\"&gt;{{Councilor}}&lt;/div&gt;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;div class=\"cdp-st t--subinfo t--g300\"&gt;District {{DISTRICT}}&lt;/div&gt;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/div&gt;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;a href=\"{{Bio}}\" class=\"btn btn--b btn--100 btn--sm\"&gt;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Visit webpage&lt;span class=\"a11y--h\"&gt; of {{Councillor}}&lt;/span&gt;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/a&gt;</div>",
      "source": {
        "type": "cob-arcgis",
        "service": "https://services.arcgis.com/sFnw0xNflSi8J0uh/ArcGIS/rest/services/City_Council_Districts/FeatureServer",
        "layer": 0
      },
      "legend": {
        "style": "icon",
        "label": "Boston City Council Districts"
      }
    }
  ],
  "maps": [
    {
      "uid": "OL~DGvQTVMyD00yr068SZ",
      "title": "City Councilor Look-Up",
      "instructionsHtml": "       <div class=\"t--info\"> <p>\n          Hover over and click on your district to find your councilor, or search your address.\n        </p>\n        <p>\n          To see all City Council members, including at-large councilors, visit the\n          <a href=\"https://www.boston.gov/departments/city-council#city-council-members\">City Council page</a>.\n        </p>\n </div>",
      "latitude": 42.347316,
      "longitude": -71.065227,
      "zoom": 12,
      "showZoomControl": true,
      "showLegend": true,
      "showUserLocation": false,
      "addressSearch": {
        "title": "Find an address",
        "placeholder": "Search for your address...",
        "zoomToResult": true,
        "autoPopupLayerUid": ""
      }
    }
  ]
}

@fionawhim
Copy link
Contributor Author

Considering documenting this with JSON-Schema and generating documentation with docson.

fionawhim pushed a commit that referenced this issue Apr 10, 2018
Description of changes for #29.

Normalizes some names, adds in configuration for legend configuration
(necessary for #23).
@fionawhim fionawhim removed their assignment Apr 11, 2018
@fionawhim
Copy link
Contributor Author

#31 has an agreed-upon new schema. Vizwiz needs to be updated to consume / generate it.

See CityOfBoston/patterns#303 for the web components side of this change.

@coordt coordt closed this as completed Apr 19, 2018
Maps Module 🗺️ automation moved this from In Progress to Done Apr 19, 2018
@paylakatel paylakatel removed this from Done in Maps Module 🗺️ Apr 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants