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

Activity list jumps to top after some short time #594

Closed
dfn-certling opened this issue Apr 8, 2020 · 8 comments · Fixed by #648
Closed

Activity list jumps to top after some short time #594

dfn-certling opened this issue Apr 8, 2020 · 8 comments · Fixed by #648

Comments

@dfn-certling
Copy link

If I list for example all activities for a month, the list is obviously larger than one screen. When I scroll down this list some way, the list jumps back to the top on its own after some time of waiting. Sometimes its 5 seconds, sometimes a minute.

I would expect the list to stay at the scrolled to position.

This is with hamster 3.0.1 on SUSE Tumbleweed using lightdm.

Anything else I can provide to help debug this?

@markferry
Copy link
Contributor

markferry commented Jul 5, 2020

Seems to be pretty much once a minute.

Comments in the output of strace indicate when I observed the UI jump back to the top:

hamster-issue-594-strace.txt

$ uname -a
Linux canard 5.7.2-arch1-1 #1 SMP PREEMPT Wed, 10 Jun 2020 20:36:24 +0000 x86_64 GNU/Linux
$ pacman  -Ss hamster
community/hamster-time-tracker 3.0.1-1 [installed]
    Time tracking application that helps you to keep track on how much time you have spent during the day on
    activities you choose to track

Arch linux on Dell XPS13 9370.

@mwilck
Copy link
Contributor

mwilck commented Jul 6, 2020

Thanks for the trace. Could you confirm (via ls /proc/$PID/fd) what fd 3 is? I suppose it's the X server socket but I'd like to be more certain.

@mwilck
Copy link
Contributor

mwilck commented Jul 6, 2020

Do you have the shell extension running? It seems that hamster receives a "GetFactsJSON" dbus method call just before this happens.

@mwilck
Copy link
Contributor

mwilck commented Jul 6, 2020

Do you have the shell extension running? It seems that hamster receives a "GetFactsJSON" dbus method call just before this happens.

Nonsense, the Shell extension doesn't use that method call. It's probably rather hamster-cli itself that sends it.

@mwilck
Copy link
Contributor

mwilck commented Jul 6, 2020

Thanks for the trace. Could you confirm (via ls /proc/$PID/fd) what fd 3 is? I suppose it's the X server socket but I'd like to be more certain.

Forget it, not necessary any more.

@mwilck
Copy link
Contributor

mwilck commented Jul 6, 2020

Please check out #623.

@dfn-certling
Copy link
Author

Yes, that seems to solve it. I'll keep using that version for the following days to see whether something else breaks.

I agree with your concern that now switching to the previous month it might be strange that the list doesn't jump to the top - but maybe that's just about getting used to. I certainly prefer no jumps to regular jumps =).

@dfn-certling
Copy link
Author

No problems with using this version for my use cases.

rhertzog added a commit to rhertzog/hamster that referenced this issue Nov 19, 2020
Right now FactTree.set_facts() is always resetting the position of the
view, bringing the user back to the top but this function is called
regularly to update with the latest data even when the user has not
changed anything in the selection widget... which is really annoying
when you are reviewing the list of facts.

Let's distinguish between both cases with a "reset=True" attribute that
we use when we generate an entirely new set of facts to be displayed.

This makes projecthamster#623 obsolete. Thanks to @mwilck for the initial analysis.

Fixes projecthamster#594
rhertzog added a commit to rhertzog/hamster that referenced this issue Nov 21, 2020
Right now FactTree.set_facts() is always resetting the position of the
view, bringing the user back to the top but this function is called
regularly to update with the latest data even when the user has not
changed anything in the selection widget... which is really annoying
when you are reviewing the list of facts.

Let's distinguish between both cases with a "reset=True" attribute that
we use when we generate an entirely new set of facts to be displayed.

This makes projecthamster#623 obsolete. Thanks to @mwilck for the initial analysis.

Fixes projecthamster#594
rhertzog added a commit to rhertzog/hamster that referenced this issue Nov 21, 2020
Right now FactTree.set_facts() is always resetting the position of the
view, bringing the user back to the top but this function is called
regularly to update with the latest data even when the user has not
changed anything in the selection widget... which is really annoying
when you are reviewing the list of facts.

Let's distinguish between both cases with a "scroll_to_top=True"
attribute that we use when we generate an entirely new set of facts to
be displayed.

This makes projecthamster#623 obsolete. Thanks to @mwilck for the initial analysis.

Fixes projecthamster#594
matthijskooijman pushed a commit that referenced this issue Dec 10, 2020
Right now FactTree.set_facts() is always resetting the position of the
view, bringing the user back to the top but this function is called
regularly to update with the latest data even when the user has not
changed anything in the selection widget... which is really annoying
when you are reviewing the list of facts.

Let's distinguish between both cases with a "scroll_to_top=True"
attribute that we use when we generate an entirely new set of facts to
be displayed.

This makes #623 obsolete. Thanks to @mwilck for the initial analysis.

Fixes #594
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants