All notable changes to this project will be documented in this file.
- Added noreferrer attribute to save and return confirmation
- Change page titles to include h1 text so each page is unique
- Updated Welsh translation of incorrect filetype error message
- Updated incorrect filetype error message to be clearer on what types are supported.
- Added new page when session is destroyed when progress is saved, prevents a bad state where form is continued with some previously entered answers missing.
- Updated copy on hide cookie message button for better screenreader accessibility
- Missing multi question headings when resuming saved forms
- Save and return error pages now include a "Start again" CTA button
- Required file upload error message changed from "Enter an answer for 'question name'" to "Choose a file to upload"
- Fixed an issue with the back link in save and return pages and prevented an error when access email confirmation page when session cannot be loaded
- Additional welsh locales (authorisation page and regex validation)
- Updated templates to improve accessible labelling when editing
- Fixed missing allowed mimetype for text/rtf in supported file list
- Fixed issue where going directly to a 404 page could cause a nil value exception
- Updated all editable headings to have a nested span for improved semantics when editing
- Make sure that the back link on a non existent page is referencing the previous page and not the precedent of the previous page
- Fix issue with validating autocomplete options containing ampersands
- Update some of the Cymreag localisations based on feedback and testing
- Adding regex pattern validation on text area
- Support for custom form authentication in the runner, replacing http basic auth.
- Fixed position of error summary in multi-question pages.
- Fixed an edge case with uploaded files with uncommon
image/jpeg
uppercase file extensions.
- Updated templates to allow components to be moved on any page type not just multiplequestion
- Fixed an issue where conditional content visibility would incorrectly return true if the first condition was
if
and was true.
- Fixed an issue where content wouldn't render on multiquestion pages with validation errors.
- Updated header to use the Tudor crown.
- Welsh locales and error message translations.
- Changes to templates to support moving components in the editor
- New method to serialise an address component.
- Fixed an issue where old default content in components created before recent changes was rendered
- Added a content area for the upload component.
- Added
Comparable
module toComponent
class to enable sorting of components based on theorder
property.
- When inquiring metadata attributes in the editor, return the original value (even if is empty or nil)
unless there is a default value for it set in
Rails.application.config.default_text
. This fixes an edge case where some old forms would have avalidation
attribute with empty hash value.
- Added schema definitions for order property to component.json to allow for ordering of components on multiquestion pages.
- Initial support for locales other than english in preparation for Welsh translation. A future gem version will update the
cy.yml
with the actual translations.
- External start page release. If a form is configured to use an external start page, the static start page will by pypassed using a redirect to the first question. The header link and back links will also be updated to use that external start page URL.
- Address component release.
- Minor change to pin versions to minor updates
- Minor copy change to the accessibility statement.
- Fixed issues with the
trim_pointers
method on the grid. It now runs if there are no branches, and correctly trims pointers on the@ordered
array.
- Updated accessibility statement standalone page body.
- Mitigate unfiltered params edge case. Adds logging and avoid user-facing errors.
- Remove extraneous
max_files
validation in number component. This is only required in the multi file upload component.
- Baseline date year upper/lower bound validation to catch obvious typos / fat finger errors.
- Some errors in the uploader were not being properly handled. This is now fixed by introducing a catch-all validator.
- Ensure if there is not a concrete validator for a given error, we use a catch-all validator.
- Some error messages like the virus scan were not properly showing the filename when triggered in a multiuploader component.
- Made the date validator more robust and in line with the submitter.
- Update the text in the session reset modal to only contain one line in order to pass WCAG accessibility criteria
- Updated the id attribute on content areas to enable tehm to be correcly focused in the editor
- Use latest
json-schema
version (4.1.1) which performs (since version 3.0.0) validation ofconst
attributes. - Removed
_id
const in page schema as pages inherit already an_id
of type string fromdefinition.data
- Attribute
_type
(const) in radios, checkboxes and date components was being wrongly validated against a duplicated_type
inherited fromdefinition.fieldset
. Removed this attribute from the fieldset definition. - Added missing
page.exit
to list of allowed types in base schema. - Fixed warning "character class has '-' without escape" in a pattern regexp.
- Updated the presenter logic for conditional content
- Added tests and tests fixtures for unit tests and editor acceptance tests
- Fixed an issue causing errors when resuming progress
- Disclaimer warning the user of the use of confirmation email is now being shown for multiple component page.
- Adding a disclaimer to inform form filler about the use of confirmation email
- Fixed a bug where load_conditional_components was returning
nil
causing pages to not render
- Fixed a bug where saving and returning could cause an error rendering invalid dates
- Updated copy within timeout modal to ensure that screenreader announcements are clear that answers will be deleted
- Manually add in form_authenticity token field into form_for blocks. This makes the authenticity token valid for when javascript is disabled and rails ujs is not duplicating the csrf meta tag into the form.
- Update header logo to link to GOV.UK in response to accessibility audit
- Updated test app default config to 7.0, deleted settings initialiser. Just part of cleanup after upgrading everything to rails 7.
- Add logic to evaluate the content conditionals
- Content components will always show if no conditionals are present or if in the editor preview mode
- Update content component schema to accept conditionals and expressions
- Update content page and check answers page schemas to remove 'body' attribute as we can not make this attribute conditional
- Show 'body' HTML on content or check answers page only if it has been modified
- Multifile upload component release
- Added helper to answers controller to prevent error when validating
- Disable save and return on file upload components
- Makes the notification banners on standalone pages only display if the page still requires edits
- Fixed an issue where save and return would 404 if using a custom check your answers page.
- Added notification banners to accessibility and privacy standalone pages.
- Added nonces to the GA scripts for CSP violations.
- Added a list of placeholders to the standalone pages, so wee can determine when they have been replaced using the new contains_placeholders? method on the page model.
- Replace inline event handlers with event listeners to meet CSP requirements
- Update Editable components to use custom element for simpler progressive enhancement and refactoring & improving in the editor.
- Update Editable Content areas to use a custom element - a more declarative and native solution. Works as an editor when JS is present, and a simple html output when the custom element is not upgraded by JS.
- Protect against XSS (reflected) attack.
- Ensure filenames with extension
jfif
orjpg
usejpeg
when uploaded. This is to match the file that is attached on submission/confirmation emails.
- Updated grid traversal to ensure traversal of all routes to fix bugs where pages were appearing disconnected when they shouldn't be.
- Implementation of retrieving the service slug has changed, we now call the
service_slug_config
method in the application controller.
- Add in submission complete template, to display on back navigation from confirmation page
- Update Rails dependency to >= 7.0
- Update confirmation page template, moving optional content components into the width container.
- Change
service_name
method to allow for backwards compatibility - Add
service_slug_config
method to check forSERVICE_SLUG
config in Runner and Editor
- Append a suffix to file upload names if they are duplicates
- Remove unwanted characters from file uploads
- Small fixes to session management and views
- Prevent submission of form when clicking save for later on check answers page
- Fix button html on check answers page
- Add resume saved progress flow - resume page, check secret answer, resume from start if newer version is published or return from resume point.
- Update copy on 404 error page. Remove head and body tags as this template is always loaded within a layout.
- Fix Editor preview footer links bug
- Fixed spacing between titles and components on multiple question pages.
- Update start page template to new content
- Fix bug in save and return flow
- Fix back link in save and return flow
- Add save and return submit error handling
- Add save and return submit functionality
- update helper method from
in_progress?
toallowed_page?
as it is a more accurate and less confusing name.
- Remove the save and return button temporarily
- Changed the templates for the cookie warning banner. We reload the page between the request and the accept or reject banner, so they need to be separated into separate partials with different conditions for being shown.
- Changed cookies statement to reflect updated session timeout length.
- Initial save and return page behind feature flag.
- Added session timeout warning modal. After 25 minutes of inactivity a warning modal will be shown with a 5 minute countdown. If no action is taken the session will be reset and the user redirected.
- Adding test fixture corresponding to the fix of the bug that shows multiple cya and confirmation pages
- Change the cookie statement and the session expired page to reflect updated session timeout length and behaviour.
- Update the output of the
@page.send_body
content in the template to use theto_html
helper like all other content components
- Use Ruby 3.1.3
- Update cookie statement from 30 to 60 minutes
- Added in a session expiry route and template to inform uses when their session has expired.
- Heading for the confirmation page not being updated when payment links are enabled
- Use Ruby 2.7.7
- Fix preview links when in the Editor
- Allow the use of fully qualified or relative URLs for the footer links
- Add continue to pay button to confirmation page if payment link is enabled
- Add logic to change confirmation page style based on whether payment link is enabled.
- Updated reference number confirmation page content and move to using locales.
- Updated Check your answers page to use H2 tags for multiquestion page titles to keep logical heading heirarchy correct for accessibility.
- Fixed error in MaxSizeValidator human_max_size when size was a string.
- Add reference number to confirmation page
- Provide methods to ensure reference number is correct when in the Editor and Runner apps
- Added the ability to display a maintenance page for an individual form, based on the presence of ENV config values.
- Updated previous commit to use a better value after an issue was found (same intention for change applies)
- Tweak to allow static Cookie content to be found in content searches
- Move locales into a presenter specific property scope
- Add content for footer pages
- Remove deprecated govuk-header__link--service-name class now govuk-frontend update is live in editor.
- Changes required by upgrading to govuk-frontend 4.3.1
- Standalone template to pull Cookie statement content from locales file as a temporary solution to centralise this content.
- Ability to manually inject properties into Global Analytics
- Autocomplete validator key is
autocomplete
- Add autocomplete validator for when a user answer is not a valid select item
- Add govuk 'accessible-autocomplete' component
- Reorganize scripts and styles
- Add autocomplete countries fixture
- Add ability to extract the text from an autocomplete answer when used on a checkanswers page
- Add 'autocomplete?' method to the component model
- Update autocomplete page schema to include an items property
- Remove items property from the select schema
- Change the AutocompleteItem model id method to return both the text and value as a JSON string
- Override to_json method on the component model to remove 'items' from the return JSON string
- Cookie banner should only show if MoJ analytics on or form owner has set
- Add
AutocompleteItem
model, this maps the metadata structure of an autocomplete item - Instantiate AutocompleteItem object when the component is of type autocomplete
- Assign the autocomplete items for the preview functionality, using the
autocomplete_items
method
- Fixed issue where page components were
nil
- Cookie banner always shows unless controlling cookie present
- Global (MoJ Forms) analytics always included, if analytics allowed
- Global (MoJ Forms) analytics ID is different from Form Owner settings
- Form Owner settings only shows if allowed and set
- Removed graphviz dependency and rake task which used it to build flows
- Moved the editable functionalties of the autocomplete component to the Editor app
- Added 2 new mime types
- Added meta tag to exclude from indexing
- Autocomplete view template
- Update autocomplete schema
- Update the start now button label to correct casing
- Check whether the global_ga4 has actually been set on the Rails config object
- Update button label for check answers page to 'Submit'
- Move button labels into locales file
- Changed analytics_tag to measurement_id
- Added MoJ Forms GA4 global analytics partials
- Move definitions to component level rather than definition level, this is in line with the existing component schemas.
- Rename autocomplete options to items.
- Allow for more specific lookup by JS
- Fixed issue where pages traversed based on user answers were incomplete and therefore missing from submission payloads and generated PDF files
- Pass analytics IDs as string literals in JS scripts
- Add google analytics tags to the application layout
- Add cookie banner to the application layout
- Updates to ensure character/word remaining count displays for textarea component
- Add autocomplete schemas and default metadata
- Format date validation configuration string to a human readable form of DD MM YYYY
- Update validation error message content
- Check whether answer is a number before validating minimum and maximum
- Check whether date is valid before validating after and before
- Coerce string length validators to integer before comparing user answers
- Fix date valdiators which were reversed
- Revert the removal of the application JS pack
- Fix incorrect error messages for the date before and date after validations
- date_before and date_after validations
- min_length and max_length default metadata
- Change number validation schema types to be strings
- Small design bug fix to Confirmation page
- Surface supported validations for each component
- Added Minimum validation for the number component
- Added default metadata for minimum validation
- Use file path as fallback for naming default metadata keys
- Add schema sub definitions as their own schemas to the JSON validator
- Lock json-schema to version 2.8.1
- Change method to ensure the confirmation page column coordinate is larger than the CYA page coordinate.
- Added the correct viewport meta tag from the design system so that the interface displays correctly on devices.
- Expose previous destination uuids for objects in the flow.
- Changed weight of radio buttons component labels.
- Add ability to check if page is a multiple question page.
- Add
contains
anddoes_not_contain
operators.
- Ensure the correct number of branch spacers are calculated when conditionals point to the same page, or when there are 'OR' conditionals in the branching point.
- Check Confirmation and CYA pages are in the correct column during grid placement.
- Remove excess Pointer objects in the detached grid.
- Update Branching 10 fixture to include 'is answered' branch.
- Fix page IDs and URLs in one of the branching fixtures
- Replace text component with email component in version fixture.
- Fix email schema
- Change order of components on multiple question page
- Change default heading for email component
- Add length validation to email component
- Added email component
- Added a page warning model to check whether the submitting pages will detached from the main flow
- Use Ruby 2.7.5
- Adjust row numbers for objects to match their corresponding Spacer row from the directly previous column
- Hold the position information for all branch object conditionals
- Do not force objects to always use the latest column number
- Allow the linking to objects behind in the flow without breaking it visually
- Add Warning object to Grid model. To be used if the CYA or Confirmation pages are not in the main flow.
- Do not allow the overwriting of previously placed Flow objects in the Grid model
- Add possibility to accept apostrophe in service names
- Make space for branch expressions if more than one branch occupy the same column
- Change grid model to only skip traversing a route if it has already done so
- Updated all fixtures to reflect the conditionals uuids
- Add UUID to conditional objects in a branch
- Make sure the grid for a service flow is at least a 1 x 1
- Remove any columns that only contain Spacer objects
- Grid model can now start creating flows from any object but defaults to the start page
- Use Pointer objects to reference any object that exists in the main service flow
- Surface flow UUIDs and page UUIDs that any grid object has interacted with
- Add methods to check if the page is the last page in a route.
- This helps determine whether we allow adding of pages or branches, or changes of destination from these pages.
- Add MetadataPresenter::Service#conditionals that returns all conditionals in the metadata
- Add MetadataPresenter::Service#expressions that returns all expressions
- Add exit only fixture
- Ensure the correct titles are used for exit pages
- Exit page schemas and default metadata
- Do not build the ordered flow twice
- Update the Branching fixture names for 7 and 8
- Added the Route and Grid models to figure out the row and column layout for a service flow
- Added all_destination_uuids method to Flow object
- Added an additional 7 branching fixtures of varying flows
- Stop pinning rubocop
- Use multiplequestions page title even when there is only one component
- Add change your answers feature
- Fix 'Before you start' section on Start page so the content is editable and retrievable.
- Fix spacing on 'Check your answers' page
- Memoize the Page and Component inside Expression objects
- Added titles to the branch objects in the fixtures
- Remove lede from the start page metadata
- Add flow_objects method to the service which returns all the service flow as MetadataPresenter::Flow objects
- Surface the page uuid for the related flow object
- Return all branches from a service
- The methods in the page model relating to input and content components were not actually returning those objects. They actually relate to supported components for a given page. Change the method names to better describe that
- Add input_components and content_components methods which actually return objects of those types
- Add question_page? method on the page model. Should only be true for single question and multiple questions pages
- Added method to the service which returns a page object containing a given component uuid
- Remove back links from standalone pages
- Use service flow objects exclusively
- Update all fixtures to use service flow
- Add title method to page to return the question, heading or component legend or label
- Begin to support branching with radio and checkbox components
- Breaking change
- Use conditionals and expressions as the properties for branching objects and logic
- Make sure traversed pages can be used in the submissions
- Added service and version fixtures for additional testing
- Display answers on the check your answers page based on branching.
- Base flow object schema to cater for dynamic UUID properties
- Remove '_id' property from flow objects default metadata
- Fallback to using '_type' as the key for default metadata that does not have a '_id' property
- Schemas and default metadata for all flow objects
- Calling flow on a service should now return all of the flow objects
- Added more pages to the branching fixture for checkboxes multiple conditions using "AND" / "OR".
- Change the generates the flow diagrams for multiple conditions.
- Add sanitise JavaScript so malicious code is not saved in the database
- Add multiple conditions (OR / AND) on multiple criterias for same condition
- Do not require ruby graphviz in runtime, only when you run the diagram rake task
- Simple branching back links
- Simple branching (single conditions) with checkboxes
- Simple branching (single conditions) with radio buttons
- Add open office spreadsheet to upload component default metadata
- Return and empty file object when there is no file to be uploaded
- Now the gem contains the upload behaviour logic in answers controller.
- Pass component id to remove user data
- Add ability to remove a previously uploaded file from user answers
- Add the allowed file types to the upload component default metadata
- Added file upload compononent and templates
- Use Ruby 2.7.3
- Remove section break from footer
- Remove section heading from start pages
- UUIDs in fixture version should be unique so
- Single question pages can also have optional section headings
- Default content text for collection component changed to be just "Option"
- Removed
/
from the URLs of standalone pages in test fixtures
- Removed optional hint text from collections in the test fixtures as they should not be there
Initial version 1 release of the Metadata Presenter for use in the MVP of the Editor. It includes:
- JSON schemas for representing form metadata across MoJ Forms
- Default Metadata used by the Editor when creating new pages and components
- Default Text used by the Editor for optional text elements
- Templates for different page types
- Templates for different component types
- Logic for handling user answers in the Runner
- Logic relating to visible components and elements dependent upon whether the Presenter is in use in the Editor or the Runner
- Metadata validation
- Test fixtures showing examples of metadata created by the Editor
- Test helpers