Skip to content

Document dynamic ALDocumentBundle elements - #642

Draft
nonprofittechy wants to merge 4 commits into
mainfrom
document-dynamic-bundle-elements
Draft

nonprofittechy wants to merge 4 commits into
mainfrom
document-dynamic-bundle-elements

Conversation

@nonprofittechy

@nonprofittechy nonprofittechy commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Closes #349.
Cross-references AssemblyLine PR SuffolkLITLab/docassemble-AssemblyLine#1120.

Summary

Documents how to handle dynamic document bundles (where the list of documents is determined dynamically at runtime, e.g. per-child or per-job), distinguishing between the finite toggleable list (using enabled) and dynamic runtime lists.

Provides two clean options for dynamic bundles, both of which support lazy gathering without requiring imperative assignment in the mandatory interview order block:

  1. Option 1 (Recommended): Defining the bundle entirely in a code block.
  2. Option 2: Declaring the bundle in an objects block with gathered=None and defining elements and gathered = True in a companion code block.

Also documents handling changes on review screens via reconsider: True (Option 1) or al_court_bundle.reset_gathered() (Option 2), and adds a cross-reference tip in the Weaver document bundles authoring page.

Verification

  • Tested both code patterns on localhost with docassemble running the patched AssemblyLine package.
  • Verified npm run build succeeds cleanly with 0 broken links.

- Distinguish between fixed bundles with conditional on/off inclusion via 'enabled' vs. dynamic bundles whose document membership is contingent on runtime lists.
- Document Option 1: building the bundle dynamically in a code block with list comprehensions.
- Document Option 2: declaring the bundle in an objects block and populating elements at runtime using reset_gathered() following PR #1015 in docassemble-AssemblyLine.
- Add guidance on refreshing bundle contents on review screens.
- Add Weaver documentation tip linking to the dynamic bundle guide.

Fixes #349
@nonprofittechy
nonprofittechy marked this pull request as draft October 13, 2026 16:47

This branch has not been deployed

No deployments
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.

Document how to define the elements of an ALDocumentBundle at run time

1 participant