Skip to content

[#4708] Redesign ScaleValueConfig for V2#4767

Merged
arbron merged 2 commits into
4.2.xfrom
advancement/scale-v2
Jan 17, 2025
Merged

[#4708] Redesign ScaleValueConfig for V2#4767
arbron merged 2 commits into
4.2.xfrom
advancement/scale-v2

Conversation

@arbron

@arbron arbron commented Nov 23, 2024

Copy link
Copy Markdown
Collaborator

Converts ScaleValueConfig to ApplicationV2 and the V2 system styles. In order to take advantage of new form rendering this now automatically creates all the necessary fields in the scale value list using the schema data, rather than manually handling each scale value type.

Config V2 Scale Value

@arbron arbron added ui User interface related features or bugs system: advancement labels Nov 23, 2024
@arbron arbron added this to the D&D5E 4.2.0 milestone Nov 23, 2024
@arbron arbron self-assigned this Nov 23, 2024
@arbron
arbron force-pushed the advancement/asi-v2 branch from c2b5acf to 0e11138 Compare January 10, 2025 16:22
@arbron
arbron force-pushed the advancement/scale-v2 branch from e2deffe to 5f7fd29 Compare January 10, 2025 16:40
@arbron
arbron requested a review from Fyorl January 10, 2025 16:40
Base automatically changed from advancement/asi-v2 to 4.2.x January 16, 2025 23:28
Converts `ScaleValueConfig` to `ApplicationV2` and the V2 system
styles. In order to take advantage of new form rendering this now
automatically creates all the necessary fields in the scale value
list using the schema data, rather than manually handling each
scale value type.
@Fyorl
Fyorl force-pushed the advancement/scale-v2 branch from 5f7fd29 to 4caacc0 Compare January 17, 2025 16:47
return levels.reduce((obj, level) => {
obj[level] = { placeholder: this._formatPlaceholder(lastValue), value: null };
const value = this.advancement.configuration.scale[level];
const value = this.advancement.configuration.scale[level]?.clone();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We didn't have to clone before?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I believe we previously had a small issue where _mergeScaleValues was making changes to the data on the advancement rather than just preparing changes for preview.

Comment thread templates/advancement/scale-value-config-levels.hbs Outdated
@arbron
arbron force-pushed the advancement/scale-v2 branch from 4caacc0 to 9ecfad5 Compare January 17, 2025 17:30
@arbron
arbron merged commit 8b07b80 into 4.2.x Jan 17, 2025
@arbron
arbron deleted the advancement/scale-v2 branch January 17, 2025 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

system: advancement ui User interface related features or bugs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants