v11 Debug embedded collection changes
Just a post to track the v11 changes to embedded collections and what needs to be updated in an interim TRL release to support this change.
33 Replies
👌
I'll be getting started with debugging soon. Heh.. Can't even download v11 stable through the running software at the moment / too much server load. Maybe get things going w/ a direct download / re-install.
https://github.com/Pjb518/FoundryVTT-Level-Up-Official/tree/v11
here's a link to our system working v11 branch
in case you need a system for testing
the regex is correct 🤔
I tested it manually and it works
It's the previous line
if (!this.#embeddedNames.has(renderContext)) { return; }
that is likely causing things to abort early. So a possible change is:
will this be out as an interm update or should I update the files manually
Might as well try it and let me know it works. I'm just looking at the code.. Spinning up the next coding session imminently.
The less code that needs to change for the interim patch the better.
To make things easier on my side I'm going to alter the code manually before pushing the interim release out and not change it in the current committed code to avoid having to merge anything w/ my current dev branch.
I might have better luck testing with the package 🤣
vite caching is making a bit hard to change stuff and test locally 🙃
You can delete
.vite-cache
I actually changed the location in the Vite config that I provide to put the cache in an obvious top level location. Normally it's in node_modules/vite
or something like that.
Also just run production builds when testing this and not the dev server; just a head check here on that.still the same 🤔
it does get triggered properly though now
it's tripping here now
here's an accompanying video
Well.. I'll be getting to it soon. The
#name
Map holds the actual document name. IE Item
/ ActiveEffect
, so just making sure that the regex match and match[2]
is correct / IE log it and perhaps log the keys in #names
as a sanity case. I am getting things started here instead of looking at the code though, so hopefully figure it out soon.thanks a bunch ❤️
@mleahy
the former is
embeddedName
the latter is from this.#nameWell.... Here we go.. Some well thought out changes \s. ;P Turns out that it's the collection name. So instead of
createItem
or create.Item
it's create.items
... Oy vey!😄
Just a much larger headache and makes it harder to have compatibility across v10 / v11. Possible, but significantly more messy; about Foundry standard.. ;P
I wonder if its
create.effects
instead of create.activeEffects
yup
it isYeah.. It will be whatever the collection name is and not the document name anymore. However, I'm thinking I can just put into the
#embeddedNames
the document name and then lookup the associated collection for the document and also put in create.<collection name>
.
So hopefully not as crazy of a change; just an annoyance.yeah
Thankfully the embedded object in has key / value for the collection name.
very nice!!
OK... I have what I think is a working patch that keeps v10 compatibility. I have attached a full replacement for EmbededStoreManager that you can drop into the TRL _dist/svelte/store/index.js bundle. IE just copy / paste the whole class attached here and let me know if it works. I need to go test the v10 compatibility aspects before pushing things out.
👍
@mleahy that works 👌
Excellent. A bit of a minor annoyance. Just doing final v10 compat testing and then I'll push things out. Anything else by chance that you have seen not working? I'm not aware of anything else at least and don't see a problem with anything in
essential-svelte-esm
.
This is definitely an out of cadence release that is a bit awkward since I'll be checking out the v0.22
TRL version / building it / then manually replacing that code before pushing the release.I've been testing on v11 quite a bit and haven't noticed anything else
All good... Perhaps give TRL 0.0.23 a spin. As noted in the release notes it's a hot patch just for reactive embedded collections.
will do 😄
We've already finished updating our system for v11. Was a bit of work since there were a bunch of good changes for active effects but yeah this should allow us to release our system for v11 tyvm for the quick update ❤️