Large Time Gap Indicator disappears on delete


(Mr.Burns avatar therefor TDWTF) #1

So first spotted over on:

A spam post caused the time gap banner, was replied to and then deleted. This causes the time gap indicator to not show up.

here is an image of the issue:

and one explaining what our @Weng was responding to:


(PJH) #2

For clarification for those who are wondering, that second image is from a mod+ account with the deleted post(+account) expanded. TL4 and under wouldn’t normally have access to such posts.


Edit: Oh - and the following CSS in Stylish if they're wondering about the weird date format on them.
  a.post-date > span.relative-date:after {
    content: " [" attr(title) "]";
  }

#3

Maybe victim of this?


(Robin Ward) #4

This is quite tricky to fix. The current logic is based on sequential posts being shown. When I didn’t care about that, filtering posts would show the gaps between them and people found that confusing. However ensuring sequential posts while taking into account deleted is also hard.


(Mr.Burns avatar therefor TDWTF) #5

Wouldn’t that also lead to something like there being N posts before a necro which replies to N-4 being missed or am I misunderstanding the gap logic? Would there be a way to tell if a filter was applied and in that case not include the gap markers?


(Jeff Atwood) #6

I thought about that, but you actually want the gap markers on the unfiltered posts.

Not sure about the algorithm, but if it could handle the not-staff case correctly that’d be good. Because for regular users, they can’t even see the deleted posts!


(PJH) #7

The indicator isn’t there for people who can see the deleted posts though…

(That said, deleted posts aren’t initially displayed - only a placeholder indicating how many deleted posts it’s a placeholder for.)


(Alan Tan) #8

I was looking into a fix for this bug and Missing "x months ago" between posts when post numbers are not continuous.

I think we can just check whether the post-stream has the summary filter applied and remove the sequential logic all together? Is there something I am missing?


(Kane York) #9

There are more filters available I think:

  • Normal User (do not include deleted in the stream)
  • Staff User (collapse deleted posts)
  • Show Deleted Posts (staff only)
  • Summary
  • Username Filters

The top 3 want the time gaps, and the bottom 2 don’t.


(Alan Tan) #10

Hmm we could still check for the filters that we don’t want time gaps. I think time-gaps based on sequential post_number doesn’t work well here since users have the ability to move/delete posts which happens quite often.


(Alan Tan) #11

Submitted a PR

https://github.com/discourse/discourse/pull/3723


Missing "x months ago" between posts when post numbers are not continuous
(Sam Saffron) #12

Merged in :slight_smile: closing


(Sam Saffron) #13