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

The realtime replies added after displaying the previous posts are not auto-expanded #18

Open
beholder4096 opened this issue Feb 3, 2023 · 2 comments
Assignees

Comments

@beholder4096
Copy link

beholder4096 commented Feb 3, 2023

Hi, the realtime replies to previous posts are not being auto-expanded. These replies are not a part of code which is shown when whole discussion is displayed. They display only after they have been submitted by their authors and it looks like the button to display them is added to HTML only after they have been submitted.

Here is a sample of the button code when the realtime reply was submitted and when the button is displayed:

<li class="realtime" data-role="realtime-notification:6106146035"><a href="#" class="realtime-button realtime-button--refresh reveal dax-tagged" style="" title="[tagged] " data-luid="1675413255706-46"><span class="indicator indicator--refresh"></span>+1 new reply</a></li>

I suggest fixing this by continuous checking for the presence of these buttons in the discussion ONLY WHEN THEY ARE ON SCREEN and immediately clicking them for the new replies to be auto-displayed.

realtime-replies

@John30013
Copy link
Owner

Hi @beholder4096. Thanks for your comment.

The extension actually did recognize the "+1 new" button. You can see the title="[tagged]" in that button's source code. That title attribute is added by the extension. The extension uses an IntersectionObserver to be notified when new items that need to be clicked (such as the button you mentioned, as well as "Show more" links, etc.) enter the viewport.

What should have happened next is that the currently "tagged" items should be clicked (the extension fires each target element's click event), after which the title attribute's value is changed to "[clicked]".

I just watched it work (correctly) on a Disqus discussion in both Chrome and Firefox. It took a few seconds after the "+1 new" button appeared before it was "clicked" and showed the new comment, but it did work as expected.

Are you using Firefox or Chrome? And what site did you see this behavior on? I can try to look at the same site and see if there's anything else going on there that might interfere with the extension's code.

@John30013 John30013 self-assigned this Feb 4, 2023
@beholder4096
Copy link
Author

I am using Vivaldi, the newest official version. It's based on Chromium, so it should be working flawlessly but perhaps there is some merit to checking it out.
I will check and observe this behavior tomorrow, when I login to a busy site using Disqus. Right now everyone is asleep. Will then report back, perhaps I can observe some more about this bug.

From what I remember, the non-clicked button came up normally from scrolling down where there were still unseen posts. But I have to check it, it happens regularly to me so I will make sure I observe it correctly. If you happen to replicate it by yourself, do let me know, so I don't have to mess with it for too long.

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

No branches or pull requests

2 participants