From 79adb2d49d59fe8081382cf58142fa06349cdb50 Mon Sep 17 00:00:00 2001 From: Mike Simpson Date: Tue, 25 Jul 2023 17:05:20 +0100 Subject: [PATCH 01/12] New Keys for Typology category - Keys for all subcategories (except original building use) - Buttons to change key/visible layer Re: Issue #1212 --- app/map_styles/polygon.xml | 151 ++++++++++++++++++ .../building/data-containers/typology.tsx | 56 +++++++ .../frontend/config/category-maps-config.ts | 76 +++++++-- app/src/frontend/config/data-fields-config.ts | 2 +- app/src/frontend/config/tileserver-config.ts | 5 +- app/src/tiles/dataDefinition.ts | 21 +++ 6 files changed, 298 insertions(+), 13 deletions(-) diff --git a/app/map_styles/polygon.xml b/app/map_styles/polygon.xml index 652f698d..d90205d5 100644 --- a/app/map_styles/polygon.xml +++ b/app/map_styles/polygon.xml @@ -973,4 +973,155 @@ + + + diff --git a/app/src/frontend/building/data-containers/typology.tsx b/app/src/frontend/building/data-containers/typology.tsx index 3a8e33e0..430943db 100644 --- a/app/src/frontend/building/data-containers/typology.tsx +++ b/app/src/frontend/building/data-containers/typology.tsx @@ -11,6 +11,7 @@ import { CategoryViewProps } from './category-view-props'; import InfoBox from '../../components/info-box'; import { DataEntryGroup } from '../data-components/data-entry-group'; import { MultiDataEntry } from '../data-components/multi-data-entry/multi-data-entry'; +import { useDisplayPreferences } from '../../displayPreferences-context'; const AttachmentFormOptions = [ "Detached", @@ -23,9 +24,37 @@ const AttachmentFormOptions = [ * Type view/edit section */ const TypeView: React.FunctionComponent = (props) => { + const { darkLightTheme } = useDisplayPreferences(); + + const switchToClassificationMapStyle = (e) => { + e.preventDefault(); + props.onMapColourScale('typology_classification') + } + const switchToStylePeriodMapStyle = (e) => { + e.preventDefault(); + props.onMapColourScale('typology_style_period') + } + const switchToDynamicClassificationMapStyle = (e) => { + e.preventDefault(); + props.onMapColourScale('typology_dynamic_classification') + } + const switchToAttachmentMapStyle = (e) => { + e.preventDefault(); + props.onMapColourScale('building_attachment_form') + } + return ( + {(props.mapColourScale == "typology_classification") ? + + : + + } = (props) => { } + {(props.mapColourScale == "typology_style_period") ? + + : + + } = (props) => { } + {(props.mapColourScale == "typology_dynamic_classification") ? + + : + + } = (props) => { } + {(props.mapColourScale == "building_attachment_form") ? + + : + + } 0 OR dynamics_has_demolished_buildings = FALSE`, + typology_classification: ` + SELECT + geometry_id, + typology_classification + FROM + buildings + WHERE typology_classification IS NOT NULL`, + typology_style_period: ` + SELECT + geometry_id, + typology_style_period + FROM + buildings + WHERE typology_style_period IS NOT NULL`, + typology_dynamic_classification: ` + SELECT + geometry_id, + typology_dynamic_classification + FROM + buildings + WHERE typology_dynamic_classification IS NOT NULL`, }; const GEOMETRY_FIELD = 'geometry_geom'; From b9e9db4bc2de30fb43cb6f1ba50c6e179e72d715 Mon Sep 17 00:00:00 2001 From: Mike Simpson Date: Tue, 25 Jul 2023 17:06:38 +0100 Subject: [PATCH 02/12] Tweak key text size #1212 --- app/src/frontend/map/legend.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/frontend/map/legend.css b/app/src/frontend/map/legend.css index 2b95cfbe..e412cace 100644 --- a/app/src/frontend/map/legend.css +++ b/app/src/frontend/map/legend.css @@ -57,7 +57,7 @@ padding: 0.5rem 0.25rem; margin: 0.25rem 0.5rem; width: auto; - font-size: 18px; + font-size: 17px; border: 1px solid; border-radius: 4px; } From 5e1db5a5890e7988c531cc1ee0d4582beb675b0c Mon Sep 17 00:00:00 2001 From: Mike Simpson Date: Wed, 26 Jul 2023 13:34:32 +0100 Subject: [PATCH 03/12] Changes to Architectural Styles as requested in #1212 --- app/map_styles/polygon.xml | 24 ++++--------------- .../frontend/config/category-maps-config.ts | 12 ++++------ app/src/frontend/config/data-fields-config.ts | 12 ++++------ 3 files changed, 12 insertions(+), 36 deletions(-) diff --git a/app/map_styles/polygon.xml b/app/map_styles/polygon.xml index d90205d5..20bb9c0c 100644 --- a/app/map_styles/polygon.xml +++ b/app/map_styles/polygon.xml @@ -1028,13 +1028,9 @@ - [typology_style_period] = "Early Medieval (410-1066)" + [typology_style_period] = "Medieval (410-1485)" - - [typology_style_period] = "Mid-Late Medieval (1066-1485)" - - [typology_style_period] = "Tudor (1485-1603)" @@ -1044,7 +1040,7 @@ - [typology_style_period] = "Georgian/William IV (1714-1837)" + [typology_style_period] = "Georgian (1714-1837)" @@ -1056,17 +1052,9 @@ - [typology_style_period] = "World War I (1914-18)" + [typology_style_period] = "WWI - WWII (1914-45)" - - [typology_style_period] = "Interwar (1918-39)" - - - - [typology_style_period] = "World War II (1939-45)" - - [typology_style_period] = "Post war (1945-1975)" @@ -1080,13 +1068,9 @@ - [typology_style_period] = "2000s/2010s" + [typology_style_period] = "2000s" - - [typology_style_period] = "2020s" - - 17061 diff --git a/app/src/frontend/config/category-maps-config.ts b/app/src/frontend/config/category-maps-config.ts index d9d575dd..19815c58 100644 --- a/app/src/frontend/config/category-maps-config.ts +++ b/app/src/frontend/config/category-maps-config.ts @@ -323,21 +323,17 @@ export const categoryMapsConfig: {[key in Category]: CategoryMapDefinition[]} = title: 'Architectural style', elements: [ { color: '#00B2CB', text: 'Roman (43AD-410)' }, - { color: '#00A9C6', text: 'Early Medieval (410-1066)' }, - { color: '#00A0C1', text: 'Mid-Late Medieval (1066-1485)' }, + { color: '#00A9C6', text: 'Medieval (410-1485)' }, { color: '#0097BC', text: 'Tudor (1485-1603)' }, { color: '#008EB7', text: 'Stuart (1603 -1714)' }, - { color: '#0085B2', text: 'Georgian/William IV (1714-1837)' }, + { color: '#0085B2', text: 'Georgian (1714-1837)' }, { color: '#007CAD', text: 'Victorian (1837-1901)' }, { color: '#0073A8', text: 'Edwardian (1901-1914)' }, - { color: '#006AA3', text: 'World War I (1914-18)' }, - { color: '#00619E', text: 'Interwar (1918-39)' }, - { color: '#005899', text: 'World War II (1939-45)' }, + { color: '#006AA3', text: 'WWI - WWII (1914-45)' }, { color: '#004F94', text: 'Post war (1945-1975)' }, { color: '#00468F', text: 'Postmodern (1975-1990)' }, { color: '#003D8A', text: '1990s' }, - { color: '#003485', text: '2000s/2010s' }, - { color: '#002C7C', text: '2020s' }, + { color: '#003485', text: '2000s' }, ] } }, diff --git a/app/src/frontend/config/data-fields-config.ts b/app/src/frontend/config/data-fields-config.ts index d90e16ce..91ddb459 100644 --- a/app/src/frontend/config/data-fields-config.ts +++ b/app/src/frontend/config/data-fields-config.ts @@ -1501,21 +1501,17 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */ example: "High rise: Not part of a group/cluster", items: [ 'Roman (43AD-410)', - 'Early Medieval (410-1066)', - 'Mid-Late Medieval (1066-1485)', + 'Medieval (410-1485)', 'Tudor (1485-1603)', 'Stuart (1603 -1714)', - 'Georgian/William IV (1714-1837)', + 'Georgian (1714-1837)', 'Victorian (1837-1901)', 'Edwardian (1901-1914)', - 'World War I (1914-18)', - 'Interwar (1918-39)', - 'World War II (1939-45)', + 'WWI - WWII (1914-45)',, 'Post war (1945-1975)', 'Postmodern (1975-1990)', '1990s', - '2000s/2010s', - '2020s', + '2000s', ] }, typology_style_period_source_type: { From b55617aaae118cbd97d9addcafcdc83851522e7f Mon Sep 17 00:00:00 2001 From: Mike Simpson Date: Wed, 26 Jul 2023 13:46:31 +0100 Subject: [PATCH 04/12] Add label pointing to Age data #1212 --- app/src/frontend/building/data-containers/typology.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/frontend/building/data-containers/typology.tsx b/app/src/frontend/building/data-containers/typology.tsx index 430943db..4180df45 100644 --- a/app/src/frontend/building/data-containers/typology.tsx +++ b/app/src/frontend/building/data-containers/typology.tsx @@ -131,6 +131,9 @@ const TypeView: React.FunctionComponent = (props) => { user_verified_as={props.user_verified.typology_style_period} verified_count={props.building.verified.typology_style_period} /> +
+ For building age by year see Age & History. +
Date: Wed, 26 Jul 2023 13:54:57 +0100 Subject: [PATCH 05/12] Changes to Dynamic classification subcategory --- app/map_styles/polygon.xml | 6 +++--- app/src/frontend/building/data-containers/typology.tsx | 2 +- app/src/frontend/config/category-maps-config.ts | 6 +++--- app/src/frontend/config/data-fields-config.ts | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/map_styles/polygon.xml b/app/map_styles/polygon.xml index 20bb9c0c..b472d134 100644 --- a/app/map_styles/polygon.xml +++ b/app/map_styles/polygon.xml @@ -1085,15 +1085,15 @@