Uncaught TypeError: $storeElementRoot is undefined
Hi! Encountering the following error when trying to resize an application based on a TJSApplicationShell. Exception:
11 Replies
The svelte app:
The outer application:
If by chance you can setup a minimal reproduction case / repo that would be handy since I don't have as much time to work on things at the moment. I'll have a ~4 hour window tomorrow to take a look.
Try things with a normal
ApplicationShell
as well. You should probably be using ApplicationShell
usually anyway. TJSApplicationShell
exists to provide a mechanism to separately style the window and content from a given systems styles. IE if you want to create a module / window that appears the same across game systems without assuming the styles of the game system / any theming modules. It should work the same as ApplicationShell
otherwise.
You might remove some of the unnecessary options like zIndex: null
. You might also try removing the positionOrtho: false
/ transformOrigin: null
options. Also removing the transition from the application shell component. Basically, try and reduce the amount of options / configuration to a minimal set and still see if an error is produced.
On a cursory look at the source there does appear to be an issue, but I need to setup a full test case / figure out what is going on tomorrow.I'll try to pare it down, thanks. Wasn't really sure the difference between ApplicationShell and TJSApplicationShell - this is for a system
I do see the issue, but not sure how it made it through testing / compiling against
essential-svelte-esm
/ and another module I have yet to release that uses TJSApplicationShell
which should have been compiling against the latest TRL.The extra options were just copied from our initial exploration at moving the lancer system to tjs
Totally unrelated but while you're here: is there a way to update an ApplicationShell's props after it's been constructed from outside the application?
Yes.. From SvelteApplication you can retrieve the mounted application shell via.
this.svelte.applicationShell
then should have accessors for each prop. This will also be the SvelteComponent instance so you have access to the rest of the client side API: https://svelte.dev/docs/client-side-component-apiThanks
This is definitely a curious bug as quite a while ago I refactored the internal stores to the application shells. In the ResizableHandle component:
should be:
You can make that change locally to TRL and see if things work.
It does look like I'll need to push out a TRL 0.1.1 release tomorrow. Not sure how this wasn't caught in testing, but I was up against some time pressures and possibly didn't do correct end to end testing after merging the branch where all the work was done to after the merge.
Strange thing is that there are resizable windows in
essential-svelte-esm
and another module using TJSApplicationShell and I recall compiling against TRL 0.1.0, but perhaps not.It's a fairly easy thing to miss :)
No rush. I know you're still doing the ski thing
Indeed. First big training day yesterday. I have about 30 min to answer questions in the morning before getting on the bus. I'll get in 2 ~4 hour sessions a week though of more focused time.
So the line above in ResizableHandle actually has to be:
The error in TRL
0.1.0
will only be raised when an app has width
or height
set to auto
and is resizable / drag the resize icon. Due to time constraints my final testing before release was more of a spot check, so I simply didn't resize an app that fit that pattern though there are a couple in essential-svelte-esm
. Simple fix and I'll spend a bit more time fuzzing / testing before the 0.1.1
release.
Fixed w/ TRL 0.1.1
release!