Skip to content

Scroller: Review implementation for #currentItemWatcher() #289

@nexushoratio

Description

@nexushoratio

On the Messaging page, every conversation change results in the URL changing, which ends up triggering Scroller.activate() (and hence #currentItemWatcher()).

Also, the page has a filter that can switch between conversation collections like Focused, Other, and so on. This also updates the URL, triggering activate().


  1. In Focused, scroll down to some conversation.
  2. Change the collection to Other
    • Do NOT select a conversation
  3. Change the collection back to Focused

Now the #currentItemWatcher() will time out.


In this particular page, we accidentally work around it by calling the local #findActiveConvo() method (to support an initial page load). But still, #currentItemWatcher() should succeed.

Switching collections does cause the HTML to rebuild, losing the computing unique identifiers. But a quick test indicates that the values where the same (assuming the timestamps on the conversation cards are the same).

Unsure if this is due to messing something up while refreshing the page implementation, or a bug in Scroller.

The page does preload a lot of empty placeholder items. So maybe some odd interaction where there is a timeout before the card is loaded with content.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinglinkedin-toolFor the LinkedIn Tool userscript

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions