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

[#1465, #1771, #1774] Add ability to move advancements from one item to another #1780

Merged
merged 7 commits into from
Jan 20, 2023

Conversation

arbron
Copy link
Collaborator

@arbron arbron commented Sep 7, 2022

This adds a few tools to improve the usability of advancements, specifically to aid in the process of adding advancements to an item that is already on a character sheet.

This adds the ability to use drag-and-drop to copy a single advancement from one item to another. It also allows for dragging an entire item onto the Advancement tab of another to copy all advancements over. Regardless of which method is used, the system will check to ensure that each advancement doesn't already exist on the target (by comparing IDs) and that it is valid (only one Hit Points Advancement allowed). If the whole item is dragged over, it will display a prompt to give users an option of only copying over certain advancements.

If the item the advancements are being copied onto is embedded, the system will then show the Advancement Manager to apply any new advancements.

In addition, deleting an advancement from an embedded item will now unapply that advancement before deletion.

Resolves #1465
Resolves #1771
Resolves #1774

@arbron arbron added ux User experience related features or bugs system: advancement labels Sep 7, 2022
@arbron arbron added this to the D&D5E 2.1.0 milestone Sep 7, 2022
@arbron arbron requested a review from Fyorl September 7, 2022 21:25
@arbron arbron self-assigned this Sep 7, 2022
@akrigline
Copy link
Collaborator

akrigline commented Sep 9, 2022

likely to conflict with #1766 because we're both adding dragDrop to ItemSheet
I'd recommend splitting your drop handling of Advancement Data into a method dedicated to that _onDropAdvancement to mitigate those conflicts.

I'd also recommend the switch way of handling which method to call as it's more extensible.

@arbron arbron force-pushed the advancement/migration branch from d6d84b2 to 5b385b8 Compare September 9, 2022 19:23
@arbron arbron changed the base branch from 2.0.x to 2.1.x September 24, 2022 02:12
@arbron arbron force-pushed the advancement/migration branch 2 times, most recently from fd1ab1e to 33b381a Compare September 24, 2022 03:16
@arbron arbron force-pushed the advancement/migration branch 3 times, most recently from b2bd749 to f8ed8d0 Compare October 19, 2022 17:58
@arbron arbron force-pushed the advancement/migration branch from f8ed8d0 to bd6f365 Compare December 2, 2022 20:12
@arbron arbron force-pushed the advancement/migration branch from bd6f365 to 9b86a8a Compare December 21, 2022 00:25
@arbron arbron force-pushed the advancement/migration branch from 9b86a8a to 0775750 Compare December 29, 2022 21:23
@arbron arbron modified the milestones: D&D5E 2.1.0, D&D5E 2.1.1 Jan 3, 2023
Copy link
Contributor

@Fyorl Fyorl left a comment

Choose a reason for hiding this comment

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

Looks good to me, only minor suggestions, and one point of clarification: Where we talk about 'migrating' advancements here, we mean manual, UI-based migrations with users dragging and dropping individual advancements or advancement-containing-items onto other items? We're not attempting to perform automated migrations on users worlds at all?

module/applications/advancement/advancement-manager.mjs Outdated Show resolved Hide resolved
module/applications/advancement/advancement-manager.mjs Outdated Show resolved Hide resolved
module/applications/advancement/advancement-manager.mjs Outdated Show resolved Hide resolved
module/applications/item/item-sheet.mjs Show resolved Hide resolved
@arbron arbron force-pushed the advancement/migration branch from 0775750 to 898d914 Compare January 15, 2023 22:51
@arbron
Copy link
Collaborator Author

arbron commented Jan 15, 2023

Looks good to me, only minor suggestions, and one point of clarification: Where we talk about 'migrating' advancements here, we mean manual, UI-based migrations with users dragging and dropping individual advancements or advancement-containing-items onto other items? We're not attempting to perform automated migrations on users worlds at all?

This PR is just for manually dragging advancements to an item.

Fully-automated migrations on advancements aren't going to be possible because they require per-player action, but I was thinking we could implement a system in the UI to notify players that there are new advancements available and make it easy to apply them. That feature if we decide to implement it will be built on this foundation.

@arbron arbron requested a review from Fyorl January 15, 2023 22:54
@Fyorl
Copy link
Contributor

Fyorl commented Jan 16, 2023

This PR is just for manually dragging advancements to an item.

Fully-automated migrations on advancements aren't going to be possible because they require per-player action, but I was thinking we could implement a system in the UI to notify players that there are new advancements available and make it easy to apply them. That feature if we decide to implement it will be built on this foundation.

That makes sense, thanks, just making sure I understood the context.

@Fyorl Fyorl merged commit d9b6be7 into foundryvtt:2.1.x Jan 20, 2023
@arbron arbron deleted the advancement/migration branch January 20, 2023 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
system: advancement ux User experience related features or bugs
Projects
None yet
3 participants