From 51b0b44146b0e047c5f3f0bfa533a7f88c542981 Mon Sep 17 00:00:00 2001 From: Mateusz Konieczny Date: Fri, 18 Nov 2022 16:46:27 +0100 Subject: [PATCH 1/6] provide more clear errors --- app/src/tiles/tileserver.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/tiles/tileserver.ts b/app/src/tiles/tileserver.ts index 07c99a58..38a9c511 100644 --- a/app/src/tiles/tileserver.ts +++ b/app/src/tiles/tileserver.ts @@ -38,16 +38,16 @@ router.get('/:tileset/:z/:x/:y(\\d+):scale(@\\dx)?.png', handleTileRequest); function parseTileParams(params: any): TileParams { const { tileset, z, x, y, scale } = params; - if (!allTilesets.includes(tileset)) throw new Error('Invalid value for tileset'); + if (!allTilesets.includes(tileset)) throw new Error('Invalid value for tileset: ' + tileset); const intZ = strictParseInt(z); - if (isNaN(intZ)) throw new Error('Invalid value for z'); + if (isNaN(intZ)) throw new Error('Invalid value for z: ' + intZ); const intX = strictParseInt(x); - if (isNaN(intX)) throw new Error('Invalid value for x'); + if (isNaN(intX)) throw new Error('Invalid value for x: ' + intX); const intY = strictParseInt(y); - if (isNaN(intY)) throw new Error('Invalid value for y'); + if (isNaN(intY)) throw new Error('Invalid value for y: ' + intY); let intScale: number; if (scale === '@2x') { From 3a05627af1b4d6eae6dc165478b2498aa5662917 Mon Sep 17 00:00:00 2001 From: Mateusz Konieczny Date: Wed, 23 Nov 2022 09:01:20 +0100 Subject: [PATCH 2/6] More clear instructions for protected site menu fixes #982 --- app/src/frontend/building/data-containers/planning.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/frontend/building/data-containers/planning.tsx b/app/src/frontend/building/data-containers/planning.tsx index 27bcca9d..39f33b20 100644 --- a/app/src/frontend/building/data-containers/planning.tsx +++ b/app/src/frontend/building/data-containers/planning.tsx @@ -80,7 +80,7 @@ const PlanningView: React.FunctionComponent = (props) => ( mode={props.mode} copy={props.copy} onChange={props.onChange} - placeholder="If yes, add ID" + placeholder="If yes, add ID here" linkTargetFunction={(id: String) => { return "https://historicengland.org.uk/listing/the-list/list-entry/" + id + "?section=official-list-entry" } } linkDescriptionFunction={(id: String) => { return "ID Link" } } /> @@ -140,7 +140,7 @@ const PlanningView: React.FunctionComponent = (props) => ( mode={props.mode} copy={props.copy} onChange={props.onChange} - placeholder="If yes, add ID" + placeholder="If yes, add ID here" linkTargetFunction={(id: String) => { return "https://whc.unesco.org/en/list/" + id } } linkDescriptionFunction={(id: String) => { return "ID Link" } } /> From d604ba30d865cc2925f70cee2074c324a2df63e7 Mon Sep 17 00:00:00 2001 From: Mateusz Konieczny Date: Wed, 23 Nov 2022 13:04:43 +0100 Subject: [PATCH 3/6] Tweak warning for designation/protection data quality --- app/src/frontend/building/data-containers/planning.tsx | 1 - app/src/frontend/config/category-maps-config.ts | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/frontend/building/data-containers/planning.tsx b/app/src/frontend/building/data-containers/planning.tsx index 39f33b20..3c3a495b 100644 --- a/app/src/frontend/building/data-containers/planning.tsx +++ b/app/src/frontend/building/data-containers/planning.tsx @@ -170,7 +170,6 @@ const PlanningView: React.FunctionComponent = (props) => ( user_verified_as={props.user_verified.planning_local_list_url} verified_count={props.building.verified.planning_local_list_url} /> - Date: Fri, 25 Nov 2022 10:10:54 +0100 Subject: [PATCH 4/6] reword historic area assesment --- app/src/frontend/config/data-fields-config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/frontend/config/data-fields-config.ts b/app/src/frontend/config/data-fields-config.ts index 15c8bdad..c29267bf 100644 --- a/app/src/frontend/config/data-fields-config.ts +++ b/app/src/frontend/config/data-fields-config.ts @@ -508,7 +508,7 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */ }, planning_historic_area_assessment_url: { category: Category.Planning, - title: "Does it have any other type of Historic Area Assessment?", + title: "Does it have an Historic Area Assessment?", example: "", //tooltip: , }, From f610e0346b6d22e025db50459fd847bd4119a8d6 Mon Sep 17 00:00:00 2001 From: Mateusz Konieczny Date: Fri, 25 Nov 2022 10:18:39 +0100 Subject: [PATCH 5/6] reword community_expected_planning_application --- app/src/frontend/config/category-maps-config.ts | 2 +- app/src/frontend/config/data-fields-config.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/frontend/config/category-maps-config.ts b/app/src/frontend/config/category-maps-config.ts index c28fb4c5..5b790b24 100644 --- a/app/src/frontend/config/category-maps-config.ts +++ b/app/src/frontend/config/category-maps-config.ts @@ -143,7 +143,7 @@ export const categoryMapsConfig: {[key in Category]: CategoryMapDefinition[]} = mapStyle: 'community_expected_planning_application_total', legend: { title: 'Expected planning application', - description: 'People who think the building will be affected by a planning application in the near future', + description: 'Sites identified by users as likely to be subject to planning application over the next six months', elements: [ { color: '#bd0026', text: '100+' }, { color: '#e31a1c', text: '50–99' }, diff --git a/app/src/frontend/config/data-fields-config.ts b/app/src/frontend/config/data-fields-config.ts index c29267bf..bddd225e 100644 --- a/app/src/frontend/config/data-fields-config.ts +++ b/app/src/frontend/config/data-fields-config.ts @@ -109,7 +109,7 @@ export const buildingUserFields = { community_expected_planning_application: { perUser: true, category: Category.Community, - title: "Do you expect this site to be affected by a planning application in the near future?", + title: "Select any building that you think may be subject to a planning application over the next six months and tick the box below to colour it.", example: true } }; From aac52876283d77f3909cc584c86404ccc7e7c96c Mon Sep 17 00:00:00 2001 From: Mateusz Konieczny Date: Mon, 28 Nov 2022 11:02:41 +0100 Subject: [PATCH 6/6] rebuild Building protection, Zone menus --- .../building/data-containers/planning.tsx | 451 +++++++++--------- app/src/frontend/components/info-box.tsx | 2 +- 2 files changed, 232 insertions(+), 221 deletions(-) diff --git a/app/src/frontend/building/data-containers/planning.tsx b/app/src/frontend/building/data-containers/planning.tsx index 3c3a495b..8bba6c21 100644 --- a/app/src/frontend/building/data-containers/planning.tsx +++ b/app/src/frontend/building/data-containers/planning.tsx @@ -3,6 +3,7 @@ import React, { Fragment } from 'react'; import InfoBox from '../../components/info-box'; import { dataFields } from '../../config/data-fields-config'; import CheckboxDataEntry from '../data-components/checkbox-data-entry'; +import { LogicalDataEntry } from '../data-components/logical-data-entry/logical-data-entry'; import NumericDataEntryWithFormattedLink from '../data-components/numeric-data-entry-with-formatted-link';import DataEntry from '../data-components/data-entry'; import { DataEntryGroup } from '../data-components/data-entry-group'; import SelectDataEntry from '../data-components/select-data-entry'; @@ -71,245 +72,66 @@ const PlanningView: React.FunctionComponent = (props) => ( /> */} - - - { return "https://historicengland.org.uk/listing/the-list/list-entry/" + id + "?section=official-list-entry" } } - linkDescriptionFunction={(id: String) => { return "ID Link" } } - /> - - - - - - { return "https://whc.unesco.org/en/list/" + id } } - linkDescriptionFunction={(id: String) => { return "ID Link" } } - /> - - - - - - - - - - - - - - - - - - + + Data in this section comes from the Greater London Authority's Planning London Datahub. Please check the original GLA source when using for planning purposes. + + - - + + + */} + - - + + + */} + - - + + + */} + - + {/* +
+ +
+ */} {/* = (props) => ( /> */}
- + + + This section provides information on heritage assets and building protection. To produce the most accurate spatial map possible we need to combine official data with crowdsourced data. Help us create this map together by checking, verifying and adding information. + + { return "https://historicengland.org.uk/listing/the-list/list-entry/" + id + "?section=official-list-entry" } } + linkDescriptionFunction={(id: String) => { return "ID Link" } } + /> + + + + + + { return "https://whc.unesco.org/en/list/" + id } } + linkDescriptionFunction={(id: String) => { return "ID Link" } } + /> + + + + + {/* + + + */} + + {/* + + + */} + + + + + + + + This section is designed to provide information on land parcels and their ownership type. Can you help us to crowdsource this information? + = ({msg, children, type = 'info'}) => (