Skip to content

Update save and exit config options#187

Merged
davidjamesstone merged 12 commits intofeat/DF-370-save-progressfrom
feat/DF-370-save-progress-config
Sep 4, 2025
Merged

Update save and exit config options#187
davidjamesstone merged 12 commits intofeat/DF-370-save-progressfrom
feat/DF-370-save-progress-config

Conversation

@davidjamesstone
Copy link
Copy Markdown
Contributor

@davidjamesstone davidjamesstone commented Sep 3, 2025

Proposed change

Update save and exit config options

Jira ticket:

https://eaflood.atlassian.net/browse/DF-370

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Misc. (documentation, build updates, etc)

Checklist

  • You have executed this code locally and it performs as expected.
  • You have added tests to verify your code works.
  • You have added code comments and JSDoc, where appropriate.
  • There is no commented-out code.
  • You have added developer docs in README.md and docs/* (where appropriate, e.g. new features).
  • The tests are passing (npm run test).
  • The linting checks are passing (npm run lint).
  • The code has been formatted (npm run format).

@davidjamesstone davidjamesstone changed the title Feat/df 370 save progress config feature/DF-370 save progress config Sep 3, 2025
@davidjamesstone davidjamesstone changed the title feature/DF-370 save progress config Update save and exit config options Sep 3, 2025
Copy link
Copy Markdown
Contributor

@jbarnsley10 jbarnsley10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. A lot of changes in order to change for FormResponseToolkit but makes the code cleaner.

@davidjamesstone
Copy link
Copy Markdown
Contributor Author

davidjamesstone commented Sep 3, 2025

Looks great. A lot of changes in order to change for FormResponseToolkit but makes the code cleaner.

Now we're starting to expose these types via the plugin options, I thought it better to clean them up a bit otherwise consumers of the plugin would have to type Pick<ResponseToolkit, 'redirect' | 'view'> too, which is a bit untidy.

I've done similar for the Requests to:

export type AnyFormRequest = FormRequest | FormRequestPayload
export type AnyRequest = Request | AnyFormRequest

@davidjamesstone davidjamesstone force-pushed the feat/DF-370-save-progress-config branch from dc857a3 to 762f4cd Compare September 4, 2025 07:50
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Sep 4, 2025

@davidjamesstone davidjamesstone merged commit accf644 into feat/DF-370-save-progress Sep 4, 2025
18 checks passed
@davidjamesstone davidjamesstone deleted the feat/DF-370-save-progress-config branch September 4, 2025 08:26
davidjamesstone added a commit that referenced this pull request Sep 5, 2025
* Export plugin schema

* Update save and exit options

* Update save and exit configuration options

* Update cacheService to remove old save and exit implementation

* Update save and exit tests

* Update save and exit docs

* Remove old save and return exit page

* Add FormResponseToolkit for convenience

* Refactor to use new FormResponseToolkit

* Add and export "AnyRequest" type

* Add, export and use "AnyFormRequest" type

* Add docs on restoring a saved session
davidjamesstone added a commit that referenced this pull request Sep 8, 2025
* Renamed saveAndReturn to saveAndExit

* Further rename to saveAndExit

* Line ending

* Update save and exit config options (#187)

* Export plugin schema

* Update save and exit options

* Update save and exit configuration options

* Update cacheService to remove old save and exit implementation

* Update save and exit tests

* Update save and exit docs

* Remove old save and return exit page

* Add FormResponseToolkit for convenience

* Refactor to use new FormResponseToolkit

* Add and export "AnyRequest" type

* Add, export and use "AnyFormRequest" type

* Add docs on restoring a saved session

* Allow Save and Exit from the summary page

* Accept new class for cache service input (#189)

* Renamed saveAndReturn to saveAndExit

* Further rename to saveAndExit

* Accept new class for cache service input

* Accept a CacheService instance instead of a cache name

* Export CacheService

* use kebab case to align cache service with file form service

* Add trailing newline to satisfy editorconfig

* Fix state leakage between tests

---------

Co-authored-by: Jez Barnsley <jbarnsley.github@gmail.com>

* chore(release): #major

---------

Co-authored-by: David Stone <davidjamesstone@gmail.com>
Co-authored-by: Alex Luckett <alexluckett@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants