-
Notifications
You must be signed in to change notification settings - Fork 196
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
[#1405] Migrate existing class saves/skills data to TraitAdvancement #2546
Conversation
cef72cd
to
acd500a
Compare
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.
Some additional considerations:
- We should consider doing the trait migration as a full migration to ensure the data gets persisted. In-memory migrations are fine for changing names or types, but since we're writing full advancement objects I'd feel more comfortable doing it as a full migration.
- I think we can also strip out some code related to configuring skills and saves from
ItemSheet5e
, and potentially also trim some functionality fromTraitSelector
, though I'm less sure about that.
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.
Thanks for making those changes, Jeff. I think this is a good opportunity to build up some framework for persisting source migrations that we can make more use of in the future.
Two things I want to make absolutely sure of when testing this:
- If the migration is run a second time, items do not repeat the 'persist source migration' workflow with
diff: false
. - After the migration is performed, no items are left with
dnd5e.needsMigration
flags.
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.
Looking good, Jeff, just a couple of things flagged. I have one issue raised in my testing that I hope you can reproduce:
- (on 2.4.x branch) Create a new world
- Create a new actor
- Create a new class on that actor
- Edit the class and give it any advancement (I used HitPointAdvancement)
- Under its details tab, configure 2 saving throws and some skills (I used 6 skills)
- Select 2 skills (also under the details tab)
- Close down the world and switch to the trait-migration branch
- Launch the world and run
migrateWorld
- Open the class item on the actor and select 'modify choices'
- Advance to the skill trait flow
- Observe no saved choices or choices to make
Also noticed a small display issue with the alignment of the icons in the advancement table. If you happen to know what the issue is there, feel free to make a quick fix directly. Otherwise I will take a look in due course.
…hanges are persisted
That is because this branch was created before
Not sure what you're referring to. Is it because the icons are aligned at the top with the title? |
…ted trait advancements
f3f0a7a
to
fe46390
Compare
Just that they seem completely flush as to be touching the border of the element above them. I think it might just be a property of these particular icons though. I think others seem to have a bit of space baked in at the top so that I didn't notice it before. |
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.
Was able to do some further testing after the rebase, and it looks pretty good to me, thanks
Migrates existing entries from the
saves
andskills
sections on class items intoTraitAdvancement
.