-
Notifications
You must be signed in to change notification settings - Fork 71
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
VATEAM-90652: Create List & Loop pattern #19816
VATEAM-90652: Create List & Loop pattern #19816
Conversation
Checking composer.lock changes... |
GitHub Workflows (.github/workflows/*.yml)Have you...
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sense in the context of the approach you have mentioned (i.e. all List-and-Loop paragraphs will map to Employment History at the moment).
I do still have some questions/hesitations around that mental model, but I do agree that it can work. I think my biggest hesitation is that there's nothing immediately obvious here that this will be an Employment History component once it makes its way to the browser. But perhaps we just need to be ok with that for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This screenshot makes me wonder some more about the relationship between this general List-and-Loop component and the specific instance of it that we are interested in currently (Employment History). This screenshot makes sense here, but I think we might need one specific to Employment History for the Form Builder.
This is, of course, very speculative and dependent upon design decisions. But this is making me wonder about the more general underlying implementation of specific instances of List and Loop. For example, let's assume we'll offer an Employment History pattern in the Form Builder (this has been debated, to be clear). In that case, would we have a pre-defined Employment History paragraph, or would we map that Form-Builder component to an underlying List-and-Loop paragraph with generated/mapped fields?
None of this is critical right now. Just some things that come to mind as I look at this screenshot that looks much different than the others. The others show web-facing UI components. This shows something much different and caught my eye, which made me think about some of the deeper implications.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I don't think I documented this anywhere other than my mind, which is not the best. I see Employment History and all other List & Loop "variations" as options within the List & Loop Paragraph type. Initially, that may just be a single field called "variation" or something that has options like "Employment History" and "Treatment records." Eventually, I would expect us to need to support a "Custom" option that will require adding individual fields within it, but that would be an enhancement down the line.
Now, even though all these variations would live within the List & Loop Paragraph type, we can still present them as separate "Steps" in the Form Builder UI if we wish to do so. As you mentioned above, the Steps would map to a certain configuration of the List & Loop Paragraph.
Creates a Paragraph type in Drupal for the "List & Loop" pattern. The Paragraph type includes an "Optional?" boolean field. Adds the new Paragraph type to the list of available Paragraph types in the "Steps" field of the Digital Form content type.
* VATEAM-90582: Add 21-4140 Digital Form to seed script (#19047) * Add create_digital_forms * Add 21-4140 to digital forms script * Switch includeDob to snake case * VATEAM-90628: Add Identification Information Paragraph type (#19190) * Add OMB info fields to Digital Form (#19078) * Add Identification Information pattern * Add OMB Info to digital-forms script * Add Identification Information to digital-forms script * VATEAM-90650: Create Address Digital Form Pattern (#19331) Creates a Paragraph type in Drupal for the "Address" pattern. The Paragraph type includes an "Include military address checkbox?" boolean field. Adds the new Paragraph type to the list of available Paragraph types in the "Steps" field of the Digital Form content type. * VATEAM-90651: Create Phone and Email Digital Form pattern (#19464) Creates a Paragraph type in Drupal for the "Phone and Email Address" pattern. The Paragraph type includes an "Include email address?" boolean field. Adds the new Paragraph type to the list of available Paragraph types in the "Steps" field of the Digital Form content type. * VATEAM-94366: Create "Your personal information" Paragraph type (#19534) Create a new Paragraph type called "Your personal information" that contains the "Name and Date of Birth" and "Identification Information" Paragraph types within it. Remove "Name and Date of Birth" and "Identification Information" as selectable Steps. Update the Digital Forms script to use the new Paragraph type. * VATEAM-90652: Create List & Loop pattern (#19816) Creates a Paragraph type in Drupal for the "List & Loop" pattern. The Paragraph type includes an "Optional?" boolean field. Adds the new Paragraph type to the list of available Paragraph types in the "Steps" field of the Digital Form content type. --------- Co-authored-by: Derek Houck <derek@derekhouck.com> Co-authored-by: Derek Houck <derek.houck@agile6.com> Co-authored-by: Derek Houck <12766168+derekhouck@users.noreply.github.com>
Description
Creates a Paragraph type in Drupal for the "List & Loop" pattern. (See the Multiple responses documentation for more details on the pattern.) The Paragraph type includes an "Optional?" boolean field. Adds the new Paragraph type to the list of available Paragraph types in the "Steps" field of the Digital Form content type.
Testing done
Screenshots
The "List & Loop" pattern as part of the "Add Step" modal:
![Screenshot 2024-11-06 at 2 46 22 PM](https://private-user-images.githubusercontent.com/12766168/383720599-3875d227-b246-46ba-a8fb-0572f649560d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNzUzMjksIm5iZiI6MTczOTM3NTAyOSwicGF0aCI6Ii8xMjc2NjE2OC8zODM3MjA1OTktMzg3NWQyMjctYjI0Ni00NmJhLWE4ZmItMDU3MmY2NDk1NjBkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDE1NDM0OVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTIwOTM0YmMyM2M3NTIyMWIzNTc3N2MxMmE3MGU0NjMwMTdhYmRmMWI3NmU2Y2MxZjIxYTU5ZTZmNDIzMTUwODAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.qVTGmZkV27axQtbORThhVtFsRoYt3uvidQ-VeN5FjkA)
An expanded "List & Loop" Paragraph inside the "Steps" field of a Digital Form:
![Screenshot 2024-11-06 at 2 47 56 PM](https://private-user-images.githubusercontent.com/12766168/383721050-dae0f1c6-cf24-4bc8-a539-01e6cbdb2565.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNzUzMjksIm5iZiI6MTczOTM3NTAyOSwicGF0aCI6Ii8xMjc2NjE2OC8zODM3MjEwNTAtZGFlMGYxYzYtY2YyNC00YmM4LWE1MzktMDFlNmNiZGIyNTY1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDE1NDM0OVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWVjYjc2MmU4ZDE2YmU4YTQ4Y2MyMWVjNjk2NmY5MzY4ZGExMjEzMDc2MGUzM2FhZGM3MDViMTJlZGY4YTllNTMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.shC4w9FVUcisdbhXV0solK_3nHktinD50uD2rRpLzjI)
QA steps
As an administrator
Definition of Done
Select Team for PR review
CMS Team
Public websites
Facilities
User support
Accelerated Publishing
Is this PR blocked by another PR?
DO NOT MERGE
Does this PR need review from a Product Owner
Needs PO review
CMS user-facing announcement
Is an announcement needed to let editors know of this change?