Making zoomin story view scroll to the top of the tiddler

249 views
Skip to first unread message

Soren Bjornstad

unread,
Mar 20, 2021, 1:31:36 PM3/20/21
to TiddlyWiki
Hi all,

I've been considering using the zoomin story view for Grok TiddlyWiki to make life easier for people who aren't used to scrolling through a bunch of different tiddlers, but have noticed that when I click on a link within a tiddler, the browser doesn't scroll to the top of the newly opened tiddler. Given that sections consist of a number of tiddlers transcluded together, they are often larger than the screen, so I suspect this is enough to cancel out any benefit in behavior standardization.

Is there an easy way to adjust the scroll when using zoomin? I'm not in the mood to dive into rendering JavaScript today, but perhaps someone else has done this before.

Ste

unread,
Mar 20, 2021, 3:10:36 PM3/20/21
to TiddlyWiki
There is a plugin topstoryview by felix., no clue if works with zoom view but might offend inspiration? 

Soren Bjornstad

unread,
Mar 24, 2021, 7:37:05 AM3/24/21
to TiddlyWiki
So when I took a look at $:/core/modules/storyviews/zoomin.js, I found that seemingly the necessary code was already there, just commented out:

// Scroll the target into view
// $tw.pageScroller.scrollIntoView(targetElement);

I checked the blame view and it appears this has been commented out since it was first introduced in 2013. Is this intentional? Not a big deal either way, just curious.

Hubert

unread,
Apr 2, 2021, 6:00:23 AM4/2/21
to TiddlyWiki
Interesting observation, I'd like to know this too.

Jeremy Ruston

unread,
Apr 2, 2021, 10:55:35 AM4/2/21
to tiddl...@googlegroups.com
Hi Soren, Hubert, Ste,

I’m not 100% sure of any of this, but I think that the behaviour reported by Soren is a regression, and the zoomin view did at one point not have this problem.

But, invoking scrollIntoView() in zoomin.navigateTo() was/is not the fix because that affects all navigations, not just navigations to newly opened tiddlers. The reason why that is important is because the original goal of the zoomin storyview was the way that the links animate into the titles of the target tiddlers. I wanted to make traversing links be a visceral experience, evoking the feeling that the target of the link is underlayed beneath the link itself. Of course, nowadays, I think people mostly use it as an ersatz single tiddler view, and don’t care about the animation.

Anyhow, this is an area where I would love to see more experimentation.

Best wishes

Jeremy.

-- 
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/d6e70f10-a49e-47a9-94bb-080404861bd9n%40googlegroups.com.

David Gifford

unread,
Apr 2, 2021, 11:24:31 AM4/2/21
to TiddlyWiki
@Jeremy - oh, that's what it was for! :-) Since I always change my animations to 20 rather than 400 speed, I never noticed!

Gavin Gamboa

unread,
Dec 29, 2021, 4:23:41 PM12/29/21
to TiddlyWiki
I am experiencing similar odd zooming behavior Soren is describing with the zoomin story view (TW 5.2.1). If user has scrolled <50% of the viewport, a newly opened tiddler will open towards the bottom of its contents and not at the top of the story view.

Siniy-Kit

unread,
Jan 2, 2022, 1:58:57 PM1/2/22
to TiddlyWiki
I write the same here https://groups.google.com/g/tiddlywiki/c/3nfPRhWHmxM/m/77QDo1pTBAAJ  it was bug in new TW, so save my old $:/core/modules/storyviews/zoomin.js  before update to new TW version. and it works, but I don't know why....

четверг, 30 декабря 2021 г. в 00:23:41 UTC+3, gavin....@gmail.com:
Reply all
Reply to author
Forward
0 new messages