Skip to content

Commit

Permalink
feat: add disableAdvanced filter config
Browse files Browse the repository at this point in the history
BREAKING CHANGE: The `infoText` and `projectTypes` configs have been nested under `filter`.
  • Loading branch information
stdavis committed Jul 12, 2022
1 parent 730ccd1 commit e40a28f
Show file tree
Hide file tree
Showing 6 changed files with 298 additions and 262 deletions.
221 changes: 112 additions & 109 deletions public/config.json
Original file line number Diff line number Diff line change
@@ -1,118 +1,121 @@
{
"infoText": {
"simpleMode": "<p>Projects in the Regional Transportation Plan (RTP) can be displayed and filtered on this map by either <i>transportation mode</i> or by the <i>phasing period</i> in which the projects are planned for completion.</p><p><i>For more information, contact the WFRC Long Range Planning team at longrange@wfrc.org.</i></p>",
"simplePhase": "<p>Projects in the Regional Transportation Plan (RTP) can be displayed and filtered on this map by either <i>transportation mode</i> or by the <i>phasing period</i> in which the projects are planned for completion.</p><p>In the RTP development process, projects are initially assigned to a project phase period, that are typically 8-10 years in length.</p><p>In this map, phasing can be displayed as <i>“needs-based phasing”</i> - the periods in which projects are needed to support the overall transportation system.</p><p>Or, phasing can be displayed according to <i>“financially-constrained phasing”</i>, wherein needed projects are prioritized according to the overall amount of transportation funding available and the project's comparative performance. <i>A portion of projected future funding is anticipated, but not yet in place.</i></p><p><i>For more information, contact the WFRC Long Range Planning team at longrange@wfrc.org.</i></p>",
"projectType": "Projects displayed on the map be filtered by any combination of project types. Project type filtering options are presented in transportation mode groups.",
"phaseYears": "<p>In the RTP development process, projects are initially assigned to a project phase period, that are typically 8-10 years in length.</p><p>In this map, phasing can be displayed as <i>“needs-based phasing”</i> - the periods in which projects are needed to support the overall transportation system.</p><p>Or, phasing can be displayed according to <i>“financially-constrained phasing”</i>, wherein needed projects have been prioritized according to the overall projected amount of transportation funding available and the project's comparative performance. <i>A portion of projected future funding is anticipated, but not yet in place.</i></p>",
"cost": "<p>Projects displayed on the map can be filtered by the estimated project cost.</p><p>The filter uses project costs adjusted to 2023 dollars, using economic assumptions adopted as part of the RTP development process.</p><p>Project estimates in future dollars, and additional project information, can be viewed by clicking on individual projects displayed on the map.</p>"
},
"projectTypes": {
"road": {
"New Construction": {
"points": "improvement_type = 'New Interchange'",
"lines": "improvement_type LIKE 'New Construction%'"
},
"Lane Additions": {
"points": null,
"lines": "improvement_type LIKE 'Widening%' AND plan_id <> 'R-S-136'"
},
"HOT Lane Additions": {
"points": null,
"lines": "plan_id = 'R-S-136'"
},
"Interchange": {
"points": "improvement_type = 'Upgrade Interchange'",
"lines": null
},
"Operational": {
"points": null,
"lines": "improvement_type = 'Operations' OR improvement_type = 'Re-striping'"
},
"Over/Underpass": {
"points": "improvement_type = 'Grade-Separated Crossing'",
"lines": null
},
"Corridor Preservation": {
"points": null,
"lines": "improvement_type = 'Corridor Preservation' AND mode = 'Highway'"
},
"Limit to UDOT Facilities": {
"points": "breakout IN ('State', 'State/Local')",
"lines": "breakout IN ('State', 'State/Local')",
"offByDefault": true,
"useAnd": true
}
"filter": {
"infoText": {
"simpleMode": "<p>Projects in the Regional Transportation Plan (RTP) can be displayed and filtered on this map by either <i>transportation mode</i> or by the <i>phasing period</i> in which the projects are planned for completion.</p><p><i>For more information, contact the WFRC Long Range Planning team at longrange@wfrc.org.</i></p>",
"simplePhase": "<p>Projects in the Regional Transportation Plan (RTP) can be displayed and filtered on this map by either <i>transportation mode</i> or by the <i>phasing period</i> in which the projects are planned for completion.</p><p>In the RTP development process, projects are initially assigned to a project phase period, that are typically 8-10 years in length.</p><p>In this map, phasing can be displayed as <i>“needs-based phasing”</i> - the periods in which projects are needed to support the overall transportation system.</p><p>Or, phasing can be displayed according to <i>“financially-constrained phasing”</i>, wherein needed projects are prioritized according to the overall amount of transportation funding available and the project's comparative performance. <i>A portion of projected future funding is anticipated, but not yet in place.</i></p><p><i>For more information, contact the WFRC Long Range Planning team at longrange@wfrc.org.</i></p>",
"projectType": "Projects displayed on the map be filtered by any combination of project types. Project type filtering options are presented in transportation mode groups.",
"phaseYears": "<p>In the RTP development process, projects are initially assigned to a project phase period, that are typically 8-10 years in length.</p><p>In this map, phasing can be displayed as <i>“needs-based phasing”</i> - the periods in which projects are needed to support the overall transportation system.</p><p>Or, phasing can be displayed according to <i>“financially-constrained phasing”</i>, wherein needed projects have been prioritized according to the overall projected amount of transportation funding available and the project's comparative performance. <i>A portion of projected future funding is anticipated, but not yet in place.</i></p>",
"cost": "<p>Projects displayed on the map can be filtered by the estimated project cost.</p><p>The filter uses project costs adjusted to 2023 dollars, using economic assumptions adopted as part of the RTP development process.</p><p>Project estimates in future dollars, and additional project information, can be viewed by clicking on individual projects displayed on the map.</p>"
},
"transit": {
"Commuter Rail": {
"points": null,
"lines": "improvement_type = 'Commuter Rail'"
},
"Light Rail": {
"points": null,
"lines": "improvement_type = 'Light Rail' OR improvement_type = 'Street Car'"
},
"Bus Rapid Transit": {
"points": null,
"lines": "improvement_type = 'Bus Rapid Transit'"
},
"Bus, Core Route": {
"points": null,
"lines": "improvement_type = 'Core Route'"
},
"Corridor Preservation": {
"points": null,
"lines": "improvement_type = 'Corridor Preservation' AND mode = 'Transit'"
},
"New Station": {
"points": "improvement_type = 'Station'",
"lines": null
},
"Mobility Hub": {
"points": "improvement_type = 'Transit Hub'",
"lines": null
"projectTypes": {
"road": {
"New Construction": {
"points": "improvement_type = 'New Interchange'",
"lines": "improvement_type LIKE 'New Construction%'"
},
"Lane Additions": {
"points": null,
"lines": "improvement_type LIKE 'Widening%' AND plan_id <> 'R-S-136'"
},
"HOT Lane Additions": {
"points": null,
"lines": "plan_id = 'R-S-136'"
},
"Interchange": {
"points": "improvement_type = 'Upgrade Interchange'",
"lines": null
},
"Operational": {
"points": null,
"lines": "improvement_type = 'Operations' OR improvement_type = 'Re-striping'"
},
"Over/Underpass": {
"points": "improvement_type = 'Grade-Separated Crossing'",
"lines": null
},
"Corridor Preservation": {
"points": null,
"lines": "improvement_type = 'Corridor Preservation' AND mode = 'Highway'"
},
"Limit to UDOT Facilities": {
"points": "breakout IN ('State', 'State/Local')",
"lines": "breakout IN ('State', 'State/Local')",
"offByDefault": true,
"useAnd": true
}
},
"Park & Ride": {
"points": "improvement_type = 'Park & Ride'",
"lines": null
"transit": {
"Commuter Rail": {
"points": null,
"lines": "improvement_type = 'Commuter Rail'"
},
"Light Rail": {
"points": null,
"lines": "improvement_type = 'Light Rail' OR improvement_type = 'Street Car'"
},
"Bus Rapid Transit": {
"points": null,
"lines": "improvement_type = 'Bus Rapid Transit'"
},
"Bus, Core Route": {
"points": null,
"lines": "improvement_type = 'Core Route'"
},
"Corridor Preservation": {
"points": null,
"lines": "improvement_type = 'Corridor Preservation' AND mode = 'Transit'"
},
"New Station": {
"points": "improvement_type = 'Station'",
"lines": null
},
"Mobility Hub": {
"points": "improvement_type = 'Transit Hub'",
"lines": null
},
"Park & Ride": {
"points": "improvement_type = 'Park & Ride'",
"lines": null
},
"Maintenance Facility": {
"points": "improvement_type = 'Maintenance'",
"lines": null
}
},
"Maintenance Facility": {
"points": "improvement_type = 'Maintenance'",
"lines": null
"activeTransportation": {
"Multiuse Pathway": {
"points": null,
"lines": "bike_type_text = 'Parallel Bikeway Paved' OR bike_type_text = 'Parallel Bikeway Unpaved'"
},
"On-street, Protected": {
"points": null,
"lines": "bike_type_text = 'General Cycle Track'"
},
"On-street, Bike Lane": {
"points": null,
"lines": "bike_type_text = 'Bike Lane' OR bike_type_text = 'Buffered Bike Lane'"
},
"Signed Route/Sharrow": {
"points": null,
"lines": "bike_type_text = 'General Shared Roadway' OR bike_type_text = 'Marked Shared Roadway' OR bike_type_text = 'Shoulder Bikeway' OR bike_type_text = 'Unknown Category'"
},
"Over/Underpass (AT)": {
"points": "bike_type_text = 'Overpass' OR bike_type_text = 'Underpass'",
"lines": null
},
"At-Grade Crossing": {
"points": "bike_type_text = 'At-Grade Crossing' OR bike_type_text = 'Crossing'",
"lines": null
},
"Limit to UDOT Facilities": {
"points": "breakout IN ('State', 'State/Local')",
"lines": "breakout IN ('State', 'State/Local')",
"offByDefault": true,
"useAnd": true
}
}
},
"activeTransportation": {
"Multiuse Pathway": {
"points": null,
"lines": "bike_type_text = 'Parallel Bikeway Paved' OR bike_type_text = 'Parallel Bikeway Unpaved'"
},
"On-street, Protected": {
"points": null,
"lines": "bike_type_text = 'General Cycle Track'"
},
"On-street, Bike Lane": {
"points": null,
"lines": "bike_type_text = 'Bike Lane' OR bike_type_text = 'Buffered Bike Lane'"
},
"Signed Route/Sharrow": {
"points": null,
"lines": "bike_type_text = 'General Shared Roadway' OR bike_type_text = 'Marked Shared Roadway' OR bike_type_text = 'Shoulder Bikeway' OR bike_type_text = 'Unknown Category'"
},
"Over/Underpass (AT)": {
"points": "bike_type_text = 'Overpass' OR bike_type_text = 'Underpass'",
"lines": null
},
"At-Grade Crossing": {
"points": "bike_type_text = 'At-Grade Crossing' OR bike_type_text = 'Crossing'",
"lines": null
},
"Limit to UDOT Facilities": {
"points": "breakout IN ('State', 'State/Local')",
"lines": "breakout IN ('State', 'State/Local')",
"offByDefault": true,
"useAnd": true
}
}
"disableAdvanced": false
},
"sherlock": {
"placeHolder": "trans:searchPlaceholder",
Expand Down
112 changes: 63 additions & 49 deletions public/config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,67 +54,81 @@
}
}
},
"title": "WFRC RTP Projects",
"title": "WFRC RTP Projects Application Configuration",
"type": "object",
"additionalProperties": false,
"required": ["infoText", "projectTypes", "sherlock", "openOnLoad", "translations", "projectInformation"],
"required": ["filter", "sherlock", "openOnLoad", "translations", "projectInformation"],
"properties": {
"infoText": {
"title": "Info Popup Content",
"description": "An object that contains the content that will show up in the info popups",
"filter": {
"title": "Filter Widget Configuration",
"description": "Configuration options for the filter widget",
"type": "object",
"additionalProperties": false,
"required": ["simpleMode", "simplePhase", "projectType", "phaseYears", "cost"],
"required": ["infoText", "projectTypes", "disableAdvanced"],
"properties": {
"simpleMode": {
"title": "Simple Filter - Mode Tab",
"type": "string"
},
"simplePhase": {
"title": "Simple Filter - Phase Tab",
"type": "string"
},
"projectType": {
"title": "Advanced Filter - Project Types",
"type": "string"
},
"phaseYears": {
"title": "Advanced Filter - Phase Years",
"type": "string"
},
"cost": {
"title": "Advanced Filter - Cost",
"type": "string"
}
}
},
"projectTypes": {
"title": "Project Types",
"description": "An array of project types",
"type": "object",
"additionalProperties": false,
"required": ["road", "transit", "activeTransportation"],
"properties": {
"road": {
"title": "Road",
"infoText": {
"title": "Info Popup Content",
"description": "An object that contains the content that will show up in the info popups",
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/projectType"
"additionalProperties": false,
"required": ["simpleMode", "simplePhase", "projectType", "phaseYears", "cost"],
"properties": {
"simpleMode": {
"title": "Simple Filter - Mode Tab",
"type": "string"
},
"simplePhase": {
"title": "Simple Filter - Phase Tab",
"type": "string"
},
"projectType": {
"title": "Advanced Filter - Project Types",
"type": "string"
},
"phaseYears": {
"title": "Advanced Filter - Phase Years",
"type": "string"
},
"cost": {
"title": "Advanced Filter - Cost",
"type": "string"
}
}
},
"transit": {
"title": "Transit",
"projectTypes": {
"title": "Project Types",
"description": "An array of project types",
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/projectType"
"additionalProperties": false,
"required": ["road", "transit", "activeTransportation"],
"properties": {
"road": {
"title": "Road",
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/projectType"
}
},
"transit": {
"title": "Transit",
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/projectType"
}
},
"activeTransportation": {
"title": "Active Transportation",
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/projectType"
}
}
}
},
"activeTransportation": {
"title": "Active Transportation",
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/projectType"
}
"disableAdvanced": {
"title": "Disable Advanced Filter",
"description": "Whether the advanced filter should be disabled",
"type": "boolean"
}
}
},
Expand Down
Loading

0 comments on commit e40a28f

Please sign in to comment.