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

Task: Release Candidate v1.7.7 #242

Merged
merged 82 commits into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
f11b44e
Update deployment.yaml
jonrandahl Apr 30, 2024
496cdf5
updates the readme for local development
DanielCouzens Aug 6, 2024
11483a5
fixes fieldset and contrast input border accessibility issues
DanielCouzens Aug 7, 2024
de215fe
fixes programatic label issues
DanielCouzens Aug 7, 2024
151def9
updates changelog and version cadence
DanielCouzens Aug 7, 2024
da45e9d
Merge pull request #222 from epimorphics/issue/217-incorrectly-associ…
DanielCouzens Aug 7, 2024
d1621a4
fixes flow control on search modal
DanielCouzens Aug 8, 2024
d4b29dc
Merge branch 'dev' into issue/216-modal-not-in-focus
DanielCouzens Aug 8, 2024
afb111f
updates changelog
DanielCouzens Aug 8, 2024
5d3acd9
adds focus trap logic to share results modal
DanielCouzens Aug 8, 2024
60cda00
updates js syntax
DanielCouzens Aug 8, 2024
408b6e7
updates js syntax
DanielCouzens Aug 8, 2024
c496313
updates changelog and removes depricated js
DanielCouzens Aug 8, 2024
b0eb437
creates a focus trap for help modal
DanielCouzens Aug 8, 2024
bf5b8ee
updates js to take into account second action button for modal
DanielCouzens Aug 8, 2024
7600ea7
Merge branch 'issue/218-focus-on-help-modal' into issue/216-plus-218-…
DanielCouzens Aug 8, 2024
fbc2955
combines help and search modals into one js file
DanielCouzens Aug 8, 2024
cb9d6f3
updates changelog
DanielCouzens Aug 8, 2024
1e255d1
updates syntax
DanielCouzens Aug 8, 2024
62bf9f6
updates js syntax to fix build issue
DanielCouzens Aug 8, 2024
8ae0b22
increases icon size to meet accessibility standards
DanielCouzens Aug 9, 2024
e3a8dd6
updates changelog
DanielCouzens Aug 9, 2024
49cf958
Merge pull request #224 from epimorphics/issue/216-plus-218-fix-modal…
DanielCouzens Aug 9, 2024
e33aeee
Merge branch 'dev' into issue/225-target-size-icon-too-small
DanielCouzens Aug 9, 2024
bba6e39
Merge pull request #227 from epimorphics/issue/225-target-size-icon-t…
DanielCouzens Aug 9, 2024
e60b1eb
adds buttons to the top of the page
DanielCouzens Aug 9, 2024
36111a3
Merge branch 'dev' into issue/226-help-link-position
DanielCouzens Aug 9, 2024
912f96e
removes show results from top of the page
DanielCouzens Aug 9, 2024
d1fd02e
deletes partial
DanielCouzens Aug 9, 2024
b4f0b96
adds blank line
DanielCouzens Aug 9, 2024
0cf6d91
Merge pull request #228 from epimorphics/issue/226-help-link-position
DanielCouzens Aug 12, 2024
a5299df
updates page titles
DanielCouzens Aug 16, 2024
90e2fba
removes html_safe
DanielCouzens Aug 16, 2024
a170461
Merge pull request #229 from epimorphics/issue/220-page-titles
DanielCouzens Aug 16, 2024
19cefdf
updates gemfile lr_common_styles
DanielCouzens Aug 19, 2024
3f1d8d8
updates changelog
DanielCouzens Aug 19, 2024
ff761cc
Merge branch 'dev' into spike/updates-gemfile
DanielCouzens Aug 19, 2024
85e28ad
Merge pull request #230 from epimorphics/spike/updates-gemfile
DanielCouzens Aug 19, 2024
67c0aaf
style: rubocop linting rule update
jonrandahl Aug 20, 2024
e05eb6d
style: rubocop rule reordering
jonrandahl Aug 20, 2024
f370153
style: renaming `registry` to `prometheus`
jonrandahl Aug 20, 2024
d8c8ffd
feat: additional thread specific metrics
jonrandahl Aug 20, 2024
3d88672
updates page titles for PPD
DanielCouzens Aug 20, 2024
211c34c
Merge branch 'dev' into issue/220-page-titles
DanielCouzens Aug 20, 2024
fdf76c9
removes extra title
DanielCouzens Aug 20, 2024
b445e53
updates changelog
DanielCouzens Aug 20, 2024
7be7d66
updates syntax
DanielCouzens Aug 20, 2024
0258924
Merge pull request #231 from epimorphics/issue/220-page-titles
DanielCouzens Aug 20, 2024
c5e4a22
Merge remote-tracking branch 'origin/dev' into spike/prometheus-metri…
jonrandahl Aug 20, 2024
dd201bd
fixes search results bug
DanielCouzens Aug 23, 2024
0df239b
updates changelog
DanielCouzens Aug 23, 2024
2c300e6
Merge pull request #234 from epimorphics/issue/232-bug-search-results…
DanielCouzens Aug 23, 2024
df63977
Merge remote-tracking branch 'origin/dev' into spike/prometheus-metri…
jonrandahl Aug 28, 2024
8dbd0f8
build: updated .gitignore
jonrandahl Aug 28, 2024
cc79d0a
build: updated makefile
jonrandahl Aug 28, 2024
8a46123
build: Updated `lr_common_styles` gem version
jonrandahl Aug 28, 2024
5648e9e
style: rubocop lint update
jonrandahl Aug 28, 2024
abf8129
build: additional puma metrics
jonrandahl Aug 28, 2024
ea2b068
feat: adding process_threads metric
jonrandahl Aug 28, 2024
f016a57
refactor: rubocop linting fixes
jonrandahl Aug 28, 2024
0859f12
refactor: reorganising of methods
jonrandahl Aug 28, 2024
d1e7725
fix: reorganising error handlers
jonrandahl Aug 28, 2024
e09ef8e
build: updated version patch cadence
jonrandahl Aug 28, 2024
5b1066e
docs: Updated CHANGELOG
jonrandahl Aug 28, 2024
58f52b7
Update Gemfile
jonrandahl Sep 3, 2024
6b309ae
Update Gemfile
jonrandahl Sep 3, 2024
9476cd0
Update Gemfile
jonrandahl Sep 3, 2024
5709f22
Update Gemfile
jonrandahl Sep 3, 2024
4efe25f
Merge pull request #235 from epimorphics/spike/prometheus-metrics-update
jonrandahl Sep 3, 2024
da43604
Merge branch 'dev' into spike/2024-09-security-patch
jonrandahl Sep 4, 2024
6b41a68
docs: Updated CHANGELOG
jonrandahl Sep 4, 2024
5b3e377
build: removed comment from prod step
jonrandahl Sep 4, 2024
165c4c8
Merge pull request #239 from epimorphics/spike/2024-09-security-patch
bogdanadrianmarc Sep 4, 2024
c23ba55
build: Updated `LR_Common_Styles.gem` to v.1.9.7
jonrandahl Sep 4, 2024
1f5a60c
Merge pull request #240 from epimorphics/spike/update-common-styles-g…
jonrandahl Sep 4, 2024
fc0235d
build: application configuration unification
jonrandahl Sep 5, 2024
8c0bba9
docs: Updated CHANGELOG
jonrandahl Sep 5, 2024
d1dd11a
build: update to `lr_common_styles` gem v1.9.8
jonrandahl Sep 5, 2024
cc3717e
Merge pull request #241 from epimorphics/spike/application-configurat…
jonrandahl Sep 5, 2024
7be0ec5
Update CHANGELOG.md
jonrandahl Sep 6, 2024
c92c849
Update CHANGELOG.md
jonrandahl Sep 6, 2024
2f28b4a
Merge pull request #243 from epimorphics/task/release-condidate-1.7.8
jonrandahl Sep 6, 2024
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
48 changes: 39 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,51 @@
# or operating system, you probably want to add a global ignore instead:
# git config --global core.excludesfile '~/.gitignore_global'

# Ignore vscode config
.vscode

## Ignore bundler configuration:
/.bundle
/vendor/bundle
/lib/bundler/man/

# Ignore all logfiles and tempfiles.
/log/*
/tmp/*
!/log/.keep
!/tmp/.keep

# Ignore Byebug command history file.
.byebug_history
.github-token
.tags
/.bundle
/db/*.sqlite3
/db/*.sqlite3-journal
/log/*.log
/tmp

# Ignore node_modules
node_modules/

# Ignore precompiled javascript packs
/public/packs
/public/packs-test
/public/assets/
coverage/
/public/assets

# Ignore uploaded files in development
/storage/*
!/storage/.keep
/public/uploads

### Rails specific ###
.byebug_history
/public/system
/coverage/
tmp

# Ignore files specific to the development environment
fc.json
fc_simple.json
index-names.txt
index.json
tags

# Ignore dot files used by environment or IDE tools
.tags
.tool-versions
.github-token
.npmrc
29 changes: 19 additions & 10 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,33 +13,42 @@ Layout/LineLength:
- config/**/*
- test/**/*

Metrics/ClassLength:
Lint/ConstantDefinitionInBlock:
Exclude:
- test/**/*

Lint/DuplicateBranch:
Enabled: false

Metrics/AbcSize:
Max: 30
Exclude:
- test/**/*
- lib/tasks/**/*

Metrics/BlockLength:
Max: 30
Exclude:
- test/**/*
- lib/tasks/**/*

Metrics/ClassLength:
CountAsOne: ['array', 'hash', 'heredoc', 'method_call']
Exclude:
- test/**/*

Metrics/MethodLength:
CountAsOne: ['array', 'hash', 'heredoc', 'method_call']
Exclude:
- test/**/*
- lib/tasks/location.rake

Style/FormatStringToken:
Enabled: false

Style/Documentation:
Exclude:
- test/**/*

Style/OptionalBooleanParameter:
Style/FormatStringToken:
Enabled: false

Lint/ConstantDefinitionInBlock:
Exclude:
- test/**/*

Lint/DuplicateBranch:
Style/OptionalBooleanParameter:
Enabled: false
43 changes: 40 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,42 @@ This app allows the user to explore HMLR price-paid open linked data.

## Changelog

## 1.7.8 - 2024-09

- (Jon) Moved all mirrored configuration settings from individual environments
into the application configuration to reduce the need to manage multiple
sources of truth
- (Jon) Implemented improved boilerplate metrics integration to offer analysis
of current application usage stats
- (Jon) Additional metrics from the Puma server to be exposed in the /metrics
endpoint via the puma-metrics gem
- (Jon) Tweaked the application controller to improve error handling and
ensuring additional filtering for specific errors completes when able
- (Jon) Reorganised makefile targets alphabetically as well as mirrored other
improvements from the other applications in the suite
- (Jon) Updated .gitignore file to mirror the current approach in the other HMLR
apps
- (Jon) Updated .rubocop.yml file with rules to reduce the need to set overrides
inline
- (Jon) Updated the `lr_common_styles` gem to the latest 1.9.6 patch release.
- (Dan) Fixes the bug search results not displaying
[232](https://github.com/epimorphics/ppd-explorer/issues/232)
- (Dan) Adds page titles to download page and error page. Improves code dryness
[220](https://github.com/epimorphics/ppd-explorer/issues/220)
- (Dan) Updates gemfile to use v1.9.5 lr_common_styles
- (Dan) Adds more descriptive page titles
[220](https://github.com/epimorphics/ppd-explorer/issues/220)
- (Dan) Adds search actions buttons to the top of the page
[226](https://github.com/epimorphics/ppd-explorer/issues/226)
- (Dan) Increases target size of clickable elements to meet accessibility
requirments [GH-225](https://github.com/epimorphics/ppd-explorer/issues/225)
- (Dan) updates the search results modal focus flow to meet accessibility
requirments [GH-216](https://github.com/epimorphics/ppd-explorer/issues/216)
- (Dan) updates the form to meet various accessibility requirments
[GH-217](https://github.com/epimorphics/ppd-explorer/issues/217)
- (Dan) updates the help modal focus flow to meet accessibility requirments
[GH-218](https://github.com/epimorphics/ppd-explorer/issues/218)

## 1.7.7 - 2024-09

- (Jon) Updated search query processing and rendering to santise supplied input
Expand Down Expand Up @@ -31,7 +67,8 @@ This app allows the user to explore HMLR price-paid open linked data.

- (Jon) Updated the `app/controllers/application_controller.rb` to include the
`before_action` for the `change_default_caching_policy` method to ensure the
default `Cache-Control` header for all requests is set to 5 minutes (300 seconds).
default `Cache-Control` header for all requests is set to 5 minutes (300
seconds).

## 1.7.3 - 2023-06-07

Expand All @@ -58,8 +95,8 @@ This app allows the user to explore HMLR price-paid open linked data.
Epimorphics specific gems locally during the development of those gems.
- (Jon) Updated the production `data_services_api` gem version to be at least
the current version`~>1.3.3` (this is to cover out of sync release versions)
- (Jon) Updated the production `json_rails_logger` gem version to be at least the
current version `~>1.3.5` (this is to cover out of sync release versions)
- (Jon) Updated the production `json_rails_logger` gem version to be at least
the current version `~>1.3.5` (this is to cover out of sync release versions)
- (Jon) Updated the production `lr_common_styles` gem version to be at least the
current version `~>1.9.1` (this is to cover out of sync release versions)
- (Jon) Refactored better guards in `entrypoint.sh` to ensure the required env
Expand Down
7 changes: 5 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,20 @@ gem 'prometheus-client', '~> 4.0'
gem 'sentry-rails', '~> 5.2'
gem 'yajl-ruby', require: 'yajl'

gem 'puma-metrics'


# rubocop:disable Layout/LineLength
# TODO: While running the rails app locally for testing you can set gems to your local path
# ! These "local" paths do not work with a docker image - use the repo instead
# gem 'data_services_api', '~> 1.3.3', path: '~/Epimorphics/shared/data_services_api/'
# gem 'json_rails_logger', '~>1.0.0', path: '~/Epimorphics/shared/json-rails-logger/'
# gem 'lr_common_styles', '~> 1.9.3', path: '~/Epimorphics/clients/land-registry/projects/lr_common_styles/'
# gem 'lr_common_styles', '~> 1.9.0', path: '~/Epimorphics/clients/land-registry/projects/lr_common_styles/'
# rubocop:enable Layout/LineLength

# TODO: In production you want to set this to the gem from the epimorphics package repo
source 'https://rubygems.pkg.github.com/epimorphics' do
gem 'data_services_api', '~> 1.3.3'
gem 'json_rails_logger', '~>1.0.0'
gem 'lr_common_styles', '~> 1.9.3'
gem 'lr_common_styles', '~> 1.9.0' # set as this version as bundler breaks otherwise
end
10 changes: 7 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,9 @@ GEM
public_suffix (5.0.0)
puma (5.6.7)
nio4r (~> 2.0)
puma-metrics (1.2.5)
prometheus-client (>= 0.10)
puma (>= 5.0)
racc (1.6.2)
rack (2.2.8)
rack-test (1.1.0)
Expand Down Expand Up @@ -345,14 +348,14 @@ GEM
json
lograge
railties
lr_common_styles (1.9.3)
lr_common_styles (1.9.8)
bootstrap-sass (~> 3.4.0)
font-awesome-rails (~> 4.7.0.1)
govuk_elements_rails (~> 2.0.0)
govuk_frontend_toolkit (~> 4.18.1)
govuk_template (~> 0.18.1)
haml-rails (~> 2.0.0)
jquery-rails (~> 4.3.5)
jquery-rails (>= 4.3.5, < 4.7.0)
lodash-rails (~> 4.17.14)
modernizr-rails (~> 2.7.1)
modulejs-rails (~> 2.2.0.0)
Expand Down Expand Up @@ -386,7 +389,7 @@ DEPENDENCIES
json_expressions
json_rails_logger (~> 1.0.0)!
libv8-node (>= 16.10.0.0)
lr_common_styles (~> 1.9.3)!
lr_common_styles (~> 1.9.0)!
memory_profiler
minitest-rails
minitest-reporters
Expand All @@ -395,6 +398,7 @@ DEPENDENCIES
mocha
prometheus-client (~> 4.0)
puma
puma-metrics
rails (< 6.0.0)
rb-readline
rubocop
Expand Down
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ BUNDLER_VERSION?=$(shell tail -1 Gemfile.lock | tr -d ' ')
ECR?=${ACCOUNT}.dkr.ecr.eu-west-1.amazonaws.com
GPR_OWNER?=epimorphics
NAME?=$(shell awk -F: '$$1=="name" {print $$2}' deployment.yaml | sed -e 's/[[:blank:]]//g')
SHORTNAME?=$(shell echo ${NAME} | cut -f2 -d/)
PAT?=$(shell read -p 'Github access token:' TOKEN; echo $$TOKEN)
PORT?=3001
RUBY_VERSION?=$(shell cat .ruby-version)
Expand All @@ -29,14 +28,14 @@ REPO?=${ECR}/${IMAGE}
GITHUB_TOKEN=.github-token
BUNDLE_CFG=.bundle/config

all: image

${BUNDLE_CFG}: ${GITHUB_TOKEN}
@./bin/bundle config set --local rubygems.pkg.github.com ${GPR_OWNER}:`cat ${GITHUB_TOKEN}`

${GITHUB_TOKEN}:
@echo ${PAT} > ${GITHUB_TOKEN}

all: image

assets: auth
@./bin/bundle config set --local without 'development test'
@./bin/bundle install
Expand All @@ -49,6 +48,7 @@ check: lint test

clean:
@[ -d public/assets ] && ./bin/rails assets:clobber || :
@@ rm -rf bundle coverage log node_modules

image: auth
@echo Building ${REPO}:${TAG} ...
Expand Down Expand Up @@ -112,7 +112,6 @@ vars:
@echo "ECR = ${ECR}"
@echo "GPR_OWNER = ${GPR_OWNER}"
@echo "NAME = ${NAME}"
@echo "SHORTNAME = ${SHORTNAME}"
@echo "RUBY_VERSION = ${RUBY_VERSION}"
@echo "SHORTNAME = ${SHORTNAME}"
@echo "STAGE = ${STAGE}"
Expand Down
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,36 @@ required configuration is captured in the `Makefile`.

### Locally

Create a .bundle directory in the root of the application

```sh
mkdir .bundle

cd bundle
```

Add a config file to the .bundle directory

```sh
touch config
```

Then edit the config file

```sh
nano config
```

In the config file add the following details

BUNDLE_RUBYGEMS__PKG__GITHUB__COM: "epimorphics:< your git hub personal access token >"

Then run

```sh
bundle install
```

For developing rails applications you can start the server locally using the
following command:

Expand Down
61 changes: 61 additions & 0 deletions app/assets/javascripts/modal.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
document.addEventListener("DOMContentLoaded", function () {
function handleModal(
modalSelector,
focusableElementsSelector,
openButtonsSelector,
focusOnOpenIndex
) {
if (focusOnOpenIndex === undefined) focusOnOpenIndex = 0

var modal = document.querySelector(modalSelector)
var focusableElements = modal.querySelectorAll(focusableElementsSelector)
var firstFocusableElement = focusableElements[0]
var lastFocusableElement = focusableElements[focusableElements.length - 1]
var focusOnOpenElement = focusableElements[focusOnOpenIndex]
var openButtons = document.querySelectorAll(openButtonsSelector)

function onModalOpen() {
if (modalSelector === "#help-dialog") {
setTimeout(function () {
focusOnOpenElement.focus()
}, 10)
}

document.addEventListener("keydown", function (e) {
var isTabPressed = e.key === "Tab"

if (!isTabPressed) {
return
}

if (e.shiftKey) {
if (document.activeElement === firstFocusableElement) {
lastFocusableElement.focus()
e.preventDefault()
}
} else {
if (document.activeElement === lastFocusableElement) {
firstFocusableElement.focus()
e.preventDefault()
}
}
})
}

openButtons.forEach(function (button) {
button.addEventListener("click", function (event) {
event.preventDefault()
onModalOpen()
})
})
}

handleModal("#bookmark-dialog", "input, .btn, .close", ".action-bookmark")

handleModal(
"#help-dialog",
".close, .trouble-shooting, .email-address, .btn",
".action-help",
1
)
})
Loading