Skip to content

[#4708] Rebuild AdvancementFlow, SubclassFlow, & TraitFlow for V2#6053

Merged
arbron merged 7 commits into
5.3.xfrom
advancement/flow-v2
Feb 5, 2026
Merged

[#4708] Rebuild AdvancementFlow, SubclassFlow, & TraitFlow for V2#6053
arbron merged 7 commits into
5.3.xfrom
advancement/flow-v2

Conversation

@arbron

@arbron arbron commented Aug 19, 2025

Copy link
Copy Markdown
Collaborator

Adds a new version of AdvancementFlow based on ApplicationV2 and implements SubclassFlow & TraitFlow using it. Adds some modified rendering for AdvancementManager to support either application version.

The design of SubclassFlow remains the same, but TraitFlow has been reworked to use a separated list and display icons for each trait.

Trait Flow V2 Saves Trait Flow V2 Skills

The V2 version of advancement flows are designed to submit on change, rather than only submitting during the forward process. This will generally require changes to the coresponding advancement's application method to handle piecemeal application. In order to keep everything in the correct state, this also means that apply is called once before the initial rendering of the flow to give the advancement a chance to populate initial data.

This change involves some modification to the Advancement API for the apply, restore, reverse, and automaticApplicationValue methods:

  • apply, restore, and reverse get a new options object
  • automatic option is passed when the automatic application process is being applied
  • initial option is passed when the apply method is called initially before the flow is first rendered
  • automaticApplicationValue has been made async (this change applies when using both V1 or V2 flows)

All of these changes have been made in a way to allow V1 and V2 advancement flows to coexist for a time, but should support future changes to the advancement manager allowing for grouped flows.

@arbron arbron added this to the D&D5E 5.2.0 milestone Aug 19, 2025
@arbron arbron self-assigned this Aug 19, 2025
@arbron arbron added epic ui User interface related features or bugs in progress api system: advancement labels Aug 19, 2025
@arbron arbron changed the title [#4708] Rebuild AdvancementFlow and SubclassFlow for V2 [#4708] Rebuild AdvancementFlow, SubclassFlow, & TraitFlow for V2 Aug 19, 2025
@arbron
arbron marked this pull request as draft August 19, 2025 22:35
@arbron
arbron changed the base branch from 5.1.x to 5.2.x September 10, 2025 23:08
@arbron
arbron changed the base branch from 5.2.x to advancement/instances September 24, 2025 21:18
@arbron
arbron force-pushed the advancement/flow-v2 branch from 3455080 to 9fb8eaf Compare September 24, 2025 21:19
@arbron
arbron marked this pull request as ready for review September 24, 2025 21:19
@arbron
arbron force-pushed the advancement/flow-v2 branch from 9fb8eaf to 5afe465 Compare September 26, 2025 22:47
@arbron

arbron commented Sep 26, 2025

Copy link
Copy Markdown
Collaborator Author

Adjusted the design to be more compact like the proposed new item choice flow design:

Trait V2 Tweaks 2

@arbron arbron modified the milestones: D&D5E 5.2.0, D&D5E 5.3.0 Oct 7, 2025
@arbron
arbron force-pushed the advancement/instances branch from e602e8f to 748e824 Compare October 15, 2025 22:11
@arbron
arbron force-pushed the advancement/flow-v2 branch from 5afe465 to ab9c58a Compare October 15, 2025 22:14
@arbron
arbron force-pushed the advancement/instances branch from 2a916ff to 42f31e7 Compare January 29, 2026 19:11
@arbron
arbron force-pushed the advancement/flow-v2 branch from ab9c58a to d9fa863 Compare February 3, 2026 01:13
@arbron
arbron changed the base branch from advancement/instances to 5.3.x February 3, 2026 01:13
@arbron
arbron requested a review from Fyorl February 3, 2026 01:13
Adds a new version of `AdvancementFlow` based on `ApplicationV2`
and implements `SubclassFlow` & `TraitFlow` using it. Adds some
modified rendering for `AdvancementManager` to support either
application version.

The design of `SubclassFlow` remains the same, but `TraitFlow`
has been reworked to use a separated list and display icons
for each trait.

The V2 version of advancement flows are designed to submit on
change, rather than only submitting during the forward process.
This will generally require changes to the coresponding
advancement's application method to handle piecemeal application.
In order to keep everything in the correct state, this also means
that `apply` is called once before the initial rendering of the
flow to give the advancement a chance to populate initial data.

This change involves some modification to the `Advancement` API for
the `apply`, `restore`, `reverse`, and `automaticApplicationValue`
methods:

- `apply`, `restore`, and `reverse` get a new `options` object
- `automatic` option is passed when the automatic application
  process is being applied
- `initial` option is passed when the `apply` method is called
  initially before the flow is first rendered
- `automaticApplicationValue` has been made `async` (this change
  applies when using both V1 or V2 flows)

All of these changes have been made in a way to allow V1 and V2
advancement flows to coexist for a time, but should support future
changes to the advancement manager allowing for grouped flows.
@Fyorl
Fyorl force-pushed the advancement/flow-v2 branch from d9fa863 to b89ae52 Compare February 4, 2026 01:12
Comment thread module/applications/advancement/advancement-flow-v2.mjs Outdated
Comment thread module/applications/advancement/advancement-flow-v2.mjs Outdated
Comment thread module/applications/advancement/advancement-flow-v2.mjs Outdated
Comment thread module/applications/advancement/advancement-manager.mjs
Comment thread module/applications/advancement/subclass-flow.mjs Outdated
Comment thread module/data/advancement/item-grant.mjs Outdated
Comment thread module/documents/advancement/subclass.mjs
Comment thread module/documents/item.mjs Outdated
Comment thread module/documents/advancement/subclass.mjs
@arbron
arbron requested a review from Fyorl February 4, 2026 18:19
Comment thread module/documents/advancement/advancement.mjs Outdated
@arbron
arbron merged commit 353cebe into 5.3.x Feb 5, 2026
@arbron
arbron deleted the advancement/flow-v2 branch February 5, 2026 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants