Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to Codidact Meta!

Codidact Meta is the meta-discussion site for the Codidact community network and the Codidact software. Whether you have bug reports or feature requests, support questions or rule discussions that touch the whole network – this is the site for you.

Comments on Notification popup does not close when link target is on the current page

Post

Notification popup does not close when link target is on the current page

+4
−0

When a Notification is selected for a comment that's on the current page, the service automatically forwards the user to the location of the comment — but it doesn't automatically close the notification popup. The result is that the popup covers a part of the comment and the user must scroll back to the top to close the popup, then scroll down again to read the comment. At a guess, the popup is relying on the page redraw to close itself — but no page redraw happens when you're already looking at the page.

History
Why does this post require moderator attention?
You might want to add some details to your flag.
Why should this post be closed?

1 comment thread

Affects notifications in general (not specific to comments) (4 comments)
Affects notifications in general (not specific to comments)
trichoplax‭ wrote about 1 year ago

I've just checked with a notification of an answer to one of my questions, and I see the same behaviour. If I am already at the URL for the answer (not the question) so that clicking the notification link does not change the URL, then it scrolls the window to the answer but leaves the notification panel open.

Scrolling back to the top is no longer necessary since "Clicking outside of notification popup does not close it" was fixed, but I still consider this a bug, just a less inconvenient one now.

Monica Cellio‭ wrote about 1 year ago

Oh! I think I know why I thought it was fixed. I went to a question URL where I had a notification about an answer, and clicking that notification dismissed the notification pane. Are you saying that the bug only occurs where there is an exact match of URL -- comment thread URL, question URL where the notification is from the question itself, answer URL if it's from an answer?

trichoplax‭ wrote about 1 year ago

Yes exactly! This is due to the way our answer URLs work. Currently a question is:

meta.codidact.com/posts/Q_ID

An answer is the same, but with the answer id added on the end (followed by a # to tell the browser where to scroll the page):

meta.codidact.com/posts/Q_ID/A_ID#answer-A_ID

The bit after # can be changed without a page reload (so you can follow internal links around a page without delay). However, including the answer id before the # means that this is a different URL (not just an internal link to a different location on the same URL). This forces the browser to reload. If we didn't do this the browser could just scroll rather than reload.

Although this would be smoother, it would no longer display the answer out of sorted order, with a message informing the user of this. Maybe in future we'll do this on the client side and remove the need for the reload, but I guess we should focus on the essential changes before this kind of fine tuning.

trichoplax‭ wrote about 1 year ago

(For now all we need is a line of code to close the notification panel before following the link, so it won't matter whether there is a page reload or not.)