What is the problem? (Here is where you provide a complete Traceback.)
Currently, in the GUI the object resourceNodeDataMap is populated while recursing through and displaying the ResourceTreeNode components. These should be decoupled for use in separate applications.
Please provide some information about your environment.
At minimum we would like the following information on your platform and Python environment:
Any OFRAK
If you've discovered it, what is the root cause of the problem?
In #334 filtering is accomplished by opting to not display the ResourceTreeNodes that do not appear in searchFilter. In this implementation, the children of each node still contain ResourceTreeNodes that should be filtered out. In working to get j and k hotkeys to ignore filtered nodes (see selectNextSibling and selectPreviousSibling in ResourceTreeNode.svelte) I attempted to filter out the children fro each node entirely.
In ResourceTreeNode.svelte each {#await childrenPromise} would be rewritten to:
In doing this I created an infinite loop due to svelte reactivity.
After investigation the reason for this is as follows:
In ResourceTreeToolbar.svelte, there is a large reactive block that will regather children from the backend when certain actions are performed, for instance Unpack.
This block reacts to resourceNodeDataMap and alters childrenPromise.
The new childrenPromise is awaited in ResourceTreeNode.svelte.
The results of childrenPromise are then filtered based on searchFilter.
resourceNodeDataMap is then rebuilt based on the filtered results of childrenPromise.
The reactive block in ResourceTreeToolbar.svelte re-runs because it reacts to resourceNodeDataMap
See bullet 2.
How would you implement this fix?
To fix this, resourceNodeDataMap should be populated separately from the GUI display, and be assumed to always contain the full data map of the resource. This means it should only update when the OFRAK Resource is modified or updated in some way.
What is the problem? (Here is where you provide a complete Traceback.) Currently, in the GUI the object
resourceNodeDataMap
is populated while recursing through and displaying theResourceTreeNode
components. These should be decoupled for use in separate applications.Please provide some information about your environment. At minimum we would like the following information on your platform and Python environment:
If you've discovered it, what is the root cause of the problem? In #334 filtering is accomplished by opting to not display the
ResourceTreeNode
s that do not appear insearchFilter
. In this implementation, the children of each node still contain ResourceTreeNodes that should be filtered out. In working to getj
andk
hotkeys to ignore filtered nodes (seeselectNextSibling
andselectPreviousSibling
inResourceTreeNode.svelte
) I attempted to filter out the children fro each node entirely.In
ResourceTreeNode.svelte
each{#await childrenPromise}
would be rewritten to:In doing this I created an infinite loop due to svelte reactivity.
After investigation the reason for this is as follows:
ResourceTreeToolbar.svelte
, there is a large reactive block that will regather children from the backend when certain actions are performed, for instanceUnpack
.resourceNodeDataMap
and alterschildrenPromise
.childrenPromise
is awaited inResourceTreeNode.svelte
.childrenPromise
are then filtered based onsearchFilter
.resourceNodeDataMap
is then rebuilt based on the filtered results ofchildrenPromise
.ResourceTreeToolbar.svelte
re-runs because it reacts toresourceNodeDataMap
How would you implement this fix? To fix this, resourceNodeDataMap should be populated separately from the GUI display, and be assumed to always contain the full data map of the resource. This means it should only update when the OFRAK
Resource
is modified or updated in some way.