Adapted Zoomin Storyview without Navigation Animations breaks in 5.3.0

I’m not sure what’s going wrong here, but I’ve noticed that @Yaisog’s adapted Zoomin Storyview without Navigation Animations breaks in 5.3.0.

I mention this mostly in case it’s tied to some broader issue; I can of course go back to using plain Zoomin if necessary.

Hi @etardiff, I’ll take a look at what’s going on shortly.

Meanwhile, I have also made a “real” single storyview that not only hides other tiddlers by misusing zoomin, but only truly shows a single tiddler. This is what I am currently using and that definitely works with 5.3.0-prerelease. I thought I had posted this here somewhere. If not yet, I will soon.

Have a nice day
Yaisog

3 Likes

I cannot find it in TiddlyWiki Talk.

Hi @etardiff, after a lot of head-scratching I finally figured out what’s going on. PR 6699 introduces a change that breaks backwards compatibility in some cases. One of those cases is the storyviews. Unfortunately, I didn’t follow the PR on GitHub and the Release Notes didn’t mention the potentially breaking change, so it was a little tough to track down.
The necessary change to the storyviews is not very complicated, but I need to test it carefully and I’ll also need to fix the “truly” single storyview, so I can post it here on TWTalk. Since I’ll be travelling the next few days, it will likely be Friday before I can deliver.

Also, @jeremyruston, could you please add a note about the breaking change due to PR 6699 to the Release Notes?

2 Likes

@linonetwo wrote the PR and @jeremyruston approved/merged it, but they might not realize it is a breaking change. You might be the expert on this since you’ve gone through it. Could you share some details on how it broke your storyview so we can all understand?

Hi @btheado, reading through the PR, it was discussed there that the change might break a small number of plugins. It might not have been on Jeremy’s mind when he wrote the release note, though.
The PR also includes corresponding changes to the storyviews, which I (probably) have yet to apply to the custom views:

Currently, with my single storyview, the error is that closed tiddlers will remain in view, but inaccessible. I think that the modified zoomin view will show similar weird behavior.

1 Like

I have also raised a bug on destroy method [BUG] widget destroy() method fails testing. · Issue #7460 · Jermolene/TiddlyWiki5 · GitHub

Does this mean you have to release two version of plugin, one targeting pre-5.3.0; one use widget.destroy() and targeting 5.3.0+?

@etardiff this should only affect a small group of plugin, as long as most of my plugin didn’t use this mechanism.

Hi @linonetwo, I think that’s what it would come down to, yes.

However, there might be more changes coming if I understand the discussion in the above linked issue #7460 correctly. Since it doesn’t make sense to keep adapting my code to the core as long as it is in flux, I’ll keep an eye on the situation and make a 5.3.0-compatible version when we go into the bug-fixing-only phase.

@etardiff, if you really need a version that works now, you might want to try and replace removeChildDomNodes() with destroy() in single.js. Ideally, this might be all.

1 Like

I’m not in a hurry. I’ve been experimenting with the prerelease just to see what will break, but I don’t intend to upgrade any of my working wikis until the official release, and you certainly shouldn’t waste your time chasing a moving target.

I do appreciate your research and willingness to share! I’d been contemplating figuring out how to implement a true single-tiddler view for a while now, so if you’re already working on it, I’m happy to wait patiently.

Thanks @etardiff your testing is very helpful.

Given these problems I’m going to revert PR 6699 pending the discussion at PR 7460.

@Yaisog

There is a new PR at GitHub with a new preview-wiki at THost which can be downloaded with: Destroy Plugin V2 tests

You could test the plugin, if it works there.

1 Like

Hi @etardiff, I got around to making a real plugin, see https://talk.tiddlywiki.org/t/plugin-singletiddlerview/7071

This only works with the 5.3.0-prerelease, because I’m using some clever parameterized transclusion code by btheado.

I hope to have made it agnostic to the whole destroy() discussion, by calling the new function if it exists and the old one if it doesn’t:

if(typeof widget.destroy === 'function') {
	widget.destroy();
} else {
	widget.removeChildDomNodes();
}

I’ve subscribed to the relevant PR so that I don’t get surprised by breaking changes again.

I’d love if you could give it a whirl and let me know if everything works smoothly.

Yaisog

1 Like