Closed btheado closed 1 year ago
I think the issue is related to the save filter I'm using. Specifically this part: -[is[shadow]!is[tiddler]]
. Without it, installing a plugin results in all the shadow tiddlers in that plugin to "explode" individually into browser storage. However, I suspect this filter is also preventing the overwritten shadow tiddler from being deleted from local storage. I need to investigate more.
Thanks @btheado this is an interesting problem. If nothing else it would be good to update the docs to note any pitfalls in composing the browser storage save filter.
I created a PR which has what I think is a reasonable fix. I changed the javascript to prevent shadow tiddlers from being saved to local storage. That seems reasonable to me...I haven't been able to think of a use case for saving shadow tiddlers. Hopefully I'm not missing anything. Of course, saving overwritten shadow tiddlers is useful and that still works fine.
Describe the bug
When using the browser storage plugin and a shadow tiddler is overwritten and that tiddler is written to browser storage, then deleting the tiddler does not remove it from local storage. The only way to remove it is to use developer tools and manually remove the local storage entry.
Expected behavior
When an overwritten shadow tiddler is deleted, it should also be deleted from local storage.
I haven't fully thought through how to fix yet. It might work to check if the changed tiddler only exists as a shadow tiddler, then its key should be deleted from local storage.
To Reproduce
[all[]] -[is[shadow]!is[tiddler]] -[prefix[$:/state/popup/]] -[prefix[$:/temp/]] -[prefix[$:/HistoryList]]
$:/config/DefaultMoreSidebarTab
shadow tiddler. This will cause the overwritten shadow tiddler to be saved to local storageScreenshots
No response
TiddlyWiki Configuration
5.2.6 prerelease (the issue is nothing new to this version...it has always been there)
Additional context
No response