Everytime an item is deleted / archived, the list scrolls to the top

Issue #6 closed
scribbled_pixels created an issue

I don't remember seeing this in previous versions, which made it easy to open and delete a bunch of links. Now it's a bit annoying having to find the location again after each change.

Thank you for this cool add-on! :)

Comments (25)

  1. Pierre-Adrien Buisson repo owner

    Hi scribbled_pixels, I'm surprised, using the addon daily and I can't reproduce this bug. Could you please tell me which version of firefox you're running, and which settings are enabled in pocket (maybe paste a screenshot of your settings page)? So that I can try and debug this.

    Thanks!

  2. scribbled_pixels reporter

    Hi, I'm using Firefox 57.0.1 (64-bit) on Ubuntu 16.04.

    I don't think I've changed anything in the settings:

    Screenshot from 2017-12-23 18-01-23.png

    I don't know if this could have anything to do with it, but I have over 300 elements in my list.

    btw. Happy holidays! :)

  3. Pierre-Adrien Buisson repo owner

    Hum, I don't think the number of items has anything to do with this but it was worth mentioning, thanks. I don't reproduce this bug, but I notice it happens to me sometimes when I click an item. I have an idea where it happens in the code, but can't find a scenario to reproduce it for sure, which makes it a bit hard to fix for the moment. I keep it in mind though, I'll try to dig a bit deeper on this.

    Happy holidays to you as well, thanks ;)

  4. BubiBalboa

    I can reproduce this behavior with my setup. Win10, FF57.0.2, IMP 0.7.0 5000+ Items, Pagination enabled

    Let me know if I should test something.

  5. Pierre-Adrien Buisson repo owner

    Thanks for your feedback :)

    Honestly I don't get it for the moment. Marking an item as read or deleting it only adds a CSS class to the DOM, which triggers the "disappearing" animation. There should be no full re-creation of the items list involved at this point.

    Do you guys happen to have this issue when you click to open an item as well, like I sometimes do? And does it happen every time or only occasionally?

  6. Pierre-Adrien Buisson repo owner

    What could help me :

    • Enable "debug mode" in the addon preferences,
    • Open a browser console (press Ctrl+Shift+J or Cmd+Shift+J on a Mac) with "Journal" logs enabled,
    • Reproduce the bug in IMP,
    • Close IMP popup and send me the log output, filtered with "IMP" to only get the relevant lines.

    Actually I'm starting to have an idea why this might be happening. Seeing your logs could help me pinpoint that.

    Thanks for your help guys 🙂

  7. BubiBalboa

    Here is what I got when I deleted an item from page 3:

    IMP | (Authentication.isAuthenticated) access_token present, user is authenticated  popup.js:99
    IMP | (background.onMessage) eventData.action: retrieve-items  background.js:99
    IMP | (DomBuilder.buildAll)  popup.js:99
    IMP | (DomBuilder.buildAll) Request a 1st animation frame for buildBatch method  popup.js:99
    IMP | (DomBuilder.buildBatch) build a new batch of 50 items  popup.js:99
    IMP | (retrieveItems) timeout: 188 / 900  background.js:99
    IMP | (popup onMessage) : retrieved-items  popup.js:99
    IMP | (DomBuilder.buildAll)  popup.js:99
    IMP | (DomBuilder.buildAll) Request a 1st animation frame for buildBatch method  popup.js:99
    IMP | (DomBuilder.buildBatch) build a new batch of 50 items  popup.js:99
    IMP | (background.onMessage) eventData.action: delete-item  background.js:99
    IMP | (background.deleteItem) id to remove: 1240641167  background.js:99
    "IMP | (Request.fetch) response for https://getpocket.com/v3/send -  200"  background.js:99
    IMP | response OK, received data :   background.js:99
    IMP | [object Promise]  background.js:99
    IMP | onload - itemId = 1240641167  background.js:99
    IMP | (background.deleteItem) item 1240641167 has been found and removed  background.js:99
    IMP | (background.deleteItem) item has been removed, we will update all matching pageActions  background.js:99
    IMP | (popup onMessage) : deleted  popup.js:99
    
  8. Pierre-Adrien Buisson repo owner

    Thanks a lot for your help! Not the results I was expecting though 🤔 No other buildBatch after the last line?

    I'll keep on working on this anyway.

  9. scribbled_pixels reporter

    Thanks BubiBalboa!

    So far I have never seen it happen when clicking on an item, only removing one.

    Here's my log:

    IMP | (DomBuilder.buildBatch) build a new batch of 50 items  popup.js:99:9
    IMP | Will request an animation frame for another run of the buildBatch method  popup.js:99:9
    IMP | (DomBuilder.buildBatch) build a new batch of 50 items  popup.js:99:9
    IMP | All items are built -> break out of this loop, now!  popup.js:99:9
    IMP | (background.onMessage) eventData.action: read-item  background.js:99:9
    IMP | (background.tabsOnActivated) switching to a tab about:blank that ISN'T in my list...yet !  background.js:99:9
    IMP | (ContextMenu.enable) enable inmypocket-add-item context menu  background.js:99:9
    IMP | (ContextMenu.enable) disable inmypocket-archive-item context menu  background.js:99:9
    IMP | (ContextMenu.enable) disable inmypocket-delete-item context menu  background.js:99:9
    IMP | must display page action ? true background.js:99:9
    "IMP | (background.tabsOnUpdated) current tab is loading https://www.youtube.com/watch?v=ikUr-aS67ME&app=desktop that ISN'T in my list...yet"  background.js:99:9
    IMP | (ContextMenu.enable) enable inmypocket-add-item context menu  background.js:99:9
    IMP | (ContextMenu.enable) disable inmypocket-archive-item context menu  background.js:99:9
    IMP | (ContextMenu.enable) disable inmypocket-delete-item context menu  background.js:99:9
    IMP | must display page action ? true background.js:99:9
    IMP | (background.onMessage) eventData.action: delete-item  background.js:99:9
    IMP | (background.deleteItem) id to remove: 2003842656  background.js:99:9
    "IMP | (Request.fetch) response for https://getpocket.com/v3/send -  200"  background.js:99:9
    IMP | response OK, received data :   background.js:99:9
    IMP | [object Promise]  background.js:99:9
    IMP | onload - itemId = 2003842656  background.js:99:9
    IMP | (background.deleteItem) item 2003842656 has been found and removed  background.js:99:9
    IMP | (background.deleteItem) item has been removed, we will update all matching pageActions  background.js:99:9
    IMP | (popup onMessage) : deleted
    
  10. Pierre-Adrien Buisson repo owner

    Thanks guys. I'm still in the dark about this issue, and don't manage to reproduce it for now. I've been working on several improvements today, I have the intuition it might be slightly related to your issue.

    Could you please try the 0.7.1 alpha version I've just uploaded to addons.mozilla.org and tell me if you still encounter the same problem?

    Thanks for your help :)

  11. scribbled_pixels reporter

    Sure. Thank you for working on this bug (and the add-on) ! :)

    I installed 07.1 alpha and restarted the browser to be sure. Sadly, the bug is still there.

  12. Pierre-Adrien Buisson repo owner

    Arf, thanks for your help and trying 0.7.1a. I'll keep on testing and trying to reproduce this bug. At first, I though it was related to the number of items you have in Pocket, but @BubiBalboa is using pagination which should mitigate this kind of problems, so I'm not so sure.

    I'll make some tests with hundreds of items just to be sure and see if I can reproduce this.

  13. scribbled_pixels reporter

    Hey @BubiBalboa! I don't know what happened, but I got a mail that you left a comment here, but weirdly there is nothing here.

  14. BubiBalboa

    Not sure what is going on. I left a comment on 01.01.2018. I can see it but it has a gray background. Does it have to be approved or something?

  15. Pierre-Adrien Buisson repo owner

    Not that I know of. Personnally, I could see your message before your edit. But indeed, it has a grey background for me as well.

  16. scribbled_pixels reporter

    My only idea is that bitbucket has some security system that somehow thought the comment contained sensitive information and thus made it hidden for everyone except the repository owner. That doesn't make a lot of sense though, since the mail from bitbucket contains the full comment. 🤔

  17. scribbled_pixels reporter

    Hey.. I'm now using 0.8.0 and the bug seems to be gone. (It's possible this was already the case in previous versions. I've only checked now) :)

  18. Pierre-Adrien Buisson repo owner

    This is definitely very weird. Honestly it's hard to reproduce for me and I have no idea what happens for the moment (or happened?). It'd be great if this has been fixed but a bit scary too since I have no idea why you had the issue. I didn't ask but do you have any particular other addon that might "do something unexpected"?

  19. Pierre-Adrien Buisson repo owner

    Well... I'm glad it's gone then 😁 Don't hesitate to reactivate this issue in case it comes back.

  20. Pierre-Adrien Buisson repo owner

    Not sure it's 100% fixed yet. Will set this to "solved" in a few days if the bug is not reported anymore.

  21. Pierre-Adrien Buisson repo owner

    Oh! It looks exactly like it indeed. Good catch.

    I'm constantly using the nightly channel which is why I might not have been affected as long as other users did. The bug was fixed in Nightly 6 months ago but depending on the date, it might have taken weeks or months to get into main Firefox distribution channel.

  22. Log in to comment