Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 8.5.0 #755

Merged
merged 29 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "flood-app",
"version": "8.4.0",
"version": "8.5.0",
"description": "Flood risk app",
"main": "index.js",
"repository": "github:defra/flood-app",
Expand Down Expand Up @@ -96,7 +96,7 @@
"husky": "^8.0.3",
"jsdom": "^22.1.0",
"mockdate": "^3.0.5",
"node-html-parser": "^6.1.11",
"node-html-parser": "^6.1.13",
"nodemon": "^3.0.1",
"proxyquire": "^2.1.3"
}
Expand Down
28 changes: 28 additions & 0 deletions release-docs/CFF-8.5.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Check For Flooding Release

* Version: 8.5.0
* Proposed Release Date: 17th July 2024
* Jira Release Overview: https://eaflood.atlassian.net/projects/FSR/versions/17136/tab/release-report-all-issues


## Tickets



* FSR-1208 | river and sea levels search redirects (#723)

* FSR-1207 | update page title to use place name



## Instructions


1 - Execute LFW_{STAGE}_04_UPDATE_FLOOD_APP_AND_SERVICE_PIPELINE


Execute smoke tests and forward results

## Related Infrastructure Changes Required

* None
41 changes: 22 additions & 19 deletions server/models/views/alerts-and-warnings.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,39 @@ const { bingKeyMaps } = require('../../config')
const config = require('../../config')

class ViewModel {
constructor ({ location, place, floods, station, error }) {
constructor ({ q, location, place, floods = [], station, canonical, error }) {
Object.assign(this, {
q: location,
q,
station,
map: station ? 'map-station' : 'map',
station: station || null,
placeName: place ? place.name : '',
placeBbox: place ? place.bbox2k : [],
placeCentre: place ? place.center : [],
placeName: place?.name || '',
placeBbox: place?.bbox2k || [],
placeCentre: place?.center || [],
timestamp: Date.now(),
error: error ? true : null,
metaCanonical: canonical,
canonicalUrl: canonical,
error: !!error,
displayGetWarningsLink: true,
displayLongTermLink: true,
isEngland: place ? place.isEngland.is_england : null,
isDummyData: floods ? floods.isDummyData : false,
isEngland: place?.isEngland?.is_england,
isDummyData: floods?.isDummyData,
floodRiskUrl: config.floodRiskUrl
})

if (this.station && this.station.agency_name) {
this.pageTitle = `${this.station.agency_name} - flood alerts and warnings`
} else {
const pageTitle = place?.name ?? location

this.pageTitle = `${pageTitle ? pageTitle + ' - f' : 'F'}lood alerts and warnings`
}

if (error) {
this.pageTitle = 'Sorry, there is currently a problem searching a location'
} else {
if (this.station && this.station.agency_name) {
this.pageTitle = `${this.station.agency_name} - flood alerts and warnings`
} else {
this.pageTitle = `${location ? location + ' - f' : 'F'}lood alerts and warnings`
}
}
this.countFloods = floods ? floods.floods.length : 0
this.floods = floods
? floods.groups.map(item => item)
: []

this.countFloods = floods?.floods?.length ?? 0
this.floods = floods?.groups?.map(item => item)

this.expose = {
station: this.station,
Expand Down
12 changes: 7 additions & 5 deletions server/models/views/river-and-sea-levels.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ function referencedStationViewModel (referencePoint, stations) {
}
}

function placeViewModel ({ location, place, stations = [], queryGroup }) {
function placeViewModel ({ location, place, stations = [], queryGroup, canonical, q }) {
let distStatement, title, description

const isEngland = place ? place.isEngland.is_england : true
Expand All @@ -128,10 +128,10 @@ function placeViewModel ({ location, place, stations = [], queryGroup }) {
deleteUndefinedProperties(stations)

if (location && isEngland) {
title = `${location} - ${pageTitle}`
title = `${place.name ?? location} - ${pageTitle}`
description = `Find river, sea, groundwater and rainfall levels in ${location}. Check the last updated height, trend and state recorded by the measuring station.`
} else {
title = location ? `${location} - ${pageTitle}` : pageTitle
title = place ? `${place.name} - ${pageTitle}` : pageTitle
description = metaDescription
}

Expand All @@ -141,13 +141,15 @@ function placeViewModel ({ location, place, stations = [], queryGroup }) {
filters,
floodRiskUrl,
distStatement,
q: location,
q: q || location,
clientModel: getClientModel(isEngland ? place.bbox10k : []),
queryGroup: activeFilter,
placeAddress: place.address,
...getDataJourneyClickStrings(),
pageTitle: title,
metaDescription: description
metaDescription: description,
metaCanonical: canonical,
canonicalUrl: canonical
}
}

Expand Down
Loading
Loading