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

Submit actions #358

Merged
merged 9 commits into from
Nov 1, 2024
Merged

Submit actions #358

merged 9 commits into from
Nov 1, 2024

Conversation

danielnaab
Copy link
Contributor

@danielnaab danielnaab commented Oct 25, 2024

This branch continues work on #222, adding the ability to register multiple form submission handlers on the backend. Additionally, a "package download" pattern was added, which consists of a "Download PDF" submit button.

Actual PDF downloading is not working, due to binary/JSON serialization issues. There will be a follow-up PR to store PDF binaries in the database, outside of the form blueprint object.

This also unblocks #310.

@danielnaab danielnaab mentioned this pull request Oct 28, 2024
Base automatically changed from form-submission to main October 29, 2024 15:19
Copy link

github-actions bot commented Oct 29, 2024

Terraform plan for tts-10x-atj-dev

Plan: 0 to add, 2 to change, 0 to destroy.
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
!~  update in-place

Terraform will perform the following actions:

  # cloudfoundry_app.tts-10x-atj-dev-server-doj_tts-10x-atj-dev-server-doj-app_380DB029 will be updated in-place
!~  resource "cloudfoundry_app" "tts-10x-atj-dev-server-doj_tts-10x-atj-dev-server-doj-app_380DB029" {
!~      docker_image                    = "ghcr.io/gsa-tts/atj-platform/server-doj:266317897de2d31e9dd8524a066239bc3bb9be06" -> "ghcr.io/gsa-tts/atj-platform/server-doj:d8ad97c28e3d1a1e9223aa03f88e7a31bb7418c3"
        id                              = "6246c063-6cf4-423d-812a-4bfdeb62bcae"
        name                            = "tts-10x-atj-dev-server-doj-app"
#        (17 unchanged attributes hidden)

#        (3 unchanged blocks hidden)
    }

  # cloudfoundry_app.tts-10x-atj-dev-server-kansas_tts-10x-atj-dev-server-kansas-app_337A9CF1 will be updated in-place
!~  resource "cloudfoundry_app" "tts-10x-atj-dev-server-kansas_tts-10x-atj-dev-server-kansas-app_337A9CF1" {
!~      docker_image                    = "ghcr.io/gsa-tts/atj-platform/server-kansas:266317897de2d31e9dd8524a066239bc3bb9be06" -> "ghcr.io/gsa-tts/atj-platform/server-kansas:d8ad97c28e3d1a1e9223aa03f88e7a31bb7418c3"
        id                              = "f7c60971-bffd-4a6e-a0bb-af1191079918"
        name                            = "tts-10x-atj-dev-server-kansas-app"
#        (17 unchanged attributes hidden)

#        (3 unchanged blocks hidden)
    }

Plan: 0 to add, 2 to change, 0 to destroy.

📝 Plan generated in Post Terraform plan to PR comment #371

import { PatternBuilder } from '../../pattern';
import { type InputPattern } from '.';

export class Input extends PatternBuilder<InputPattern> {
Copy link
Contributor

Choose a reason for hiding this comment

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

I love the concept of the builder class here. Could we document the reasoning in an ADR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will do. As it's more technical, I think it might read better as README text.

const pattern = getPattern(form, result.data.patternId);
if (pattern === undefined) {
return failure(
`asdfPattern with id ${result.data.patternId} does not exist`
Copy link
Contributor

Choose a reason for hiding this comment

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

Home row for the win 🥇 :)

Copy link
Contributor

@ethangardner ethangardner left a comment

Choose a reason for hiding this comment

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

This was really nice work. There was one small issue with a typo in one file to correct, and I think an ADR that covers the need for and any plans we have for the the builder class and possibly the submit actions in this PR as a whole.

There was one commit where your message was

Add ability to register multiple handlers to the form platform, to later be registered at the plugin level. Wire this submission handler system up to the submit-form service

This might be good to document.

Copy link
Contributor

@ethangardner ethangardner left a comment

Choose a reason for hiding this comment

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

This is good to go! Thanks for these changes.

@danielnaab danielnaab merged commit 63a1ae5 into main Nov 1, 2024
4 checks passed
@danielnaab danielnaab deleted the submit-actions branch November 1, 2024 18:19
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.

2 participants