Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: disable the storyview scroll in the "Open" tab #8696

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

BurningTreeC
Copy link
Contributor

@BurningTreeC BurningTreeC commented Oct 20, 2024

This PR adds a variable tv-disable-storyview-scroll that, if set, disables the scrolling to the target element.
This is useful in the sidebar's "Open" tab for example, where under certain circumstances it can cause the sidebar to scroll when opening a new tiddler or the control panel

Opening a tiddler in the story-river makes the storyview navigate to that tiddler.
At the same time there's a storyview in the "Open" tab and also there a navigation occurs but it should not.

This PR fixes this issue

Copy link

Confirmed: BurningTreeC has already signed the Contributor License Agreement (see contributing.md)

@BurningTreeC
Copy link
Contributor Author

BurningTreeC commented Oct 20, 2024

to reproduce:

  • go to tiddlywiki.com
  • change the sidebarlayout to fixed-fluid
  • close the ControlPanel
  • open the dev tools
  • go to the Inspector
  • add the attribute dir="rtl" to the html element
  • open the "Open" sidebar tab
  • open the ControlPanel again or a New Tiddler
  • see how the sidebar scrolls

to compare, here's a build with this PR:
https://tv-disable-storyview-scroll.tiddlyhost.com/

@BurningTreeC
Copy link
Contributor Author

This fixes also the behavior of scrollIntoView in Chromium browsers (should we use scrollIntoView in the future for the pageScroller) - where a scrollIntoView stops the previous scrollIntoView ... so if we scrolled the ControlPanel into view and had the sidebar's "Open" tab open, the story-river wouldn't scroll to the ControlPanel (or just a bit)

@BurningTreeC
Copy link
Contributor Author

@Jermolene - can we consider this?

@saqimtiaz
Copy link
Member

@BurningTreeC I am struggling to understand the purpose of this PR despite having read the top post twice. Can you please provide a description of the problem that this is meant to fix?

@BurningTreeC
Copy link
Contributor Author

@BurningTreeC I am struggling to understand the purpose of this PR despite having read the top post twice. Can you please provide a description of the problem that this is meant to fix?

I've updated the description

@BurningTreeC
Copy link
Contributor Author

@Jermolene - could we consider this PR?

@Jermolene
Copy link
Member

Hi @BurningTreeC it's too late for inclusion in v5.3.6, I'm afraid.

I would like to fix the problem that the PR tackles – the symptom that I have run into in the past has been that the animation of the "open" tab interrupts that of the story river.

The impact of this PR is quite broad so I would like to give it more consideration for the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants