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

3.6.0 smooth scrolling with hotkey is not smooth #1087

Open
poblabs opened this issue Jun 19, 2023 · 13 comments
Open

3.6.0 smooth scrolling with hotkey is not smooth #1087

poblabs opened this issue Jun 19, 2023 · 13 comments

Comments

@poblabs
Copy link

poblabs commented Jun 19, 2023

  • CommaFeed version (or "commafeed.com"): 3.6.0
  • Browser [e.g. chrome, firefox]: Chrome 114.0.5735.134
  • Device [e.g. desktop, mobile]: Desktop, Windows 11

I am a long time user of self-hosted Commafeed 2.6.0 and I'm testing out 3.6.0 and the smooth scrolling is not smooth when using a hotkey. It's pretty choppy.

I noticed it happens more when there are a lot of unread articles. Right now I have 120 unread articles, and pressing the J or N hotkey results in a choppy scroll experience. In 2.6.0 this was very smooth so I thought I'd report it.

@poblabs poblabs changed the title 3.6.0 smooth scrolling is not smooth 3.6.0 smooth scrolling with hotkey is not smooth Jun 19, 2023
@Athou
Copy link
Owner

Athou commented Jun 20, 2023

It is indeed choppy with Chrome, thanks for reporting the issue. I'll see what I can do.

Athou added a commit that referenced this issue Jun 20, 2023
@Athou
Copy link
Owner

Athou commented Jun 20, 2023

Could you try with this change please? It seems to help.
The jar is available at https://github.com/Athou/commafeed/actions/runs/5320555387

@poblabs
Copy link
Author

poblabs commented Jun 20, 2023

It's better for sure! I had 1 bit of choppiness but that could be my Chrome. I'll have to give it some more testing throughout the day.

Another question for you with the hotkey scrolling. Would it be possible to always scroll the next article to the top even if it fits within the view?

For example in this screenshot, I hit j to go to the next unread but it didn't scroll my feed to the top so I keep thinking it didn't work. Again, slight difference between v2 and v3 that I noticed.

image

@Athou
Copy link
Owner

Athou commented Jun 20, 2023

Another question for you with the hotkey scrolling. Would it be possible to always scroll the next article to the top even if it fits within the view?

For example in this screenshot, I hit j to go to the next unread but it didn't scroll my feed to the top so I keep thinking it didn't work. Again, slight difference between v2 and v3 that I noticed.

Sure, could you open another issue though please?

@poblabs
Copy link
Author

poblabs commented Jun 20, 2023

Sure thing - #1088 , thanks again!

@Athou Athou closed this as completed Jun 23, 2023
@poblabs
Copy link
Author

poblabs commented Jun 24, 2023

Compared to 2.0, I'm still having a bit choppy with CommaFeed version 3.7.0 (7c226f4). Could it be the speed it's scrolling? Is there an option to adjust scroll speed?

@Athou
Copy link
Owner

Athou commented Jun 24, 2023

I profiled the app in Chrome and made some changes.
Does this help https://github.com/Athou/commafeed/actions/runs/5366267839 ?

@poblabs
Copy link
Author

poblabs commented Jun 25, 2023

so far so good! the only thing now is there's a delay (maybe 750ms?) from the keypress to the scroll event.

@Athou
Copy link
Owner

Athou commented Jun 25, 2023

I made more changes to help with the initial lag.
Could you test https://github.com/Athou/commafeed/actions/runs/5371503325 please?

@poblabs
Copy link
Author

poblabs commented Jun 26, 2023

It's getting better! Compared to 2.0, still a bit slow but making progress to make it feel less laggy

@Athou Athou reopened this Jun 26, 2023
@ehamiter
Copy link

ehamiter commented Aug 6, 2023

Is there an option to adjust scroll speed?

I am also curious about this. I would prefer to have no animation at all, and immediately cut to the next entry. In commafeed-client/src/app/slices.ts, I see this:

if (arg.scrollToEntry) {
    const entryElement = document.getElementById(Constants.dom.entryId(entry))
    if (entryElement) {
        const alwaysScrollToEntry = state.user.settings?.alwaysScrollToEntry
        const entryEntirelyVisible = Constants.layout.isTopVisible(entryElement) && Constants.layout.isBottomVisible(entryElement)
        if (alwaysScrollToEntry || !entryEntirelyVisible) {
            const scrollSpeed = state.user.settings?.scrollSpeed
            thunkApi.dispatch(entriesSlice.actions.setScrollingToEntry(true))
            scrollToEntry(entryElement, scrollSpeed, () => thunkApi.dispatch(entriesSlice.actions.setScrollingToEntry(false)))
        }
    }
}

Can I set alwaysScrollToEntry or scrollSpeed? If so, where?

Thanks for any info!

@Athou
Copy link
Owner

Athou commented Aug 6, 2023

Can I set alwaysScrollToEntry or scrollSpeed? If so, where?

Sure, those are the first two options in the user settings:

image

@ehamiter
Copy link

ehamiter commented Aug 6, 2023

🤦

@Athou thanks so much, I swear I looked through the settings a billion times but somehow never noticed those.

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

No branches or pull requests

3 participants