Page MenuHomePhabricator

Move indentation model to rendering
Open, LowPublic

Description

We implemented the new indentation model by changing where the reply links pointed.

However, this means clients using the API need to respect the reply link given, and use that to determine what the base post is. It's likely some would skip that step and compute the parameters to the reply API call themselves.

We could make this more reliable by having two separate trees:

  • Logical tree saying who actually replied to whom
  • Rendering tree generating the new indentation model from that (just requires who replied to whom and chronology).

For example:

A posts new topic (T). B replies to A. C replies to B. D replies to B.

Logical tree would be:

  T
  |
  A
  |
  B
 / \
C   D

From that plus chronology, rendering tree would be constructed:

   T
 / | \
A  B  C
   |
   D

This also paves the way for different rendering options at the same time, either via preferences or different apps (e.g. mobile may want to use a different indentation model when rendering due to limited screen space)

We could store a date where we cut-over to representing things internally in the new logical tree, so old topics still use the old model.

Event Timeline

Mattflaschen-WMF raised the priority of this task from to Needs Triage.
Mattflaschen-WMF updated the task description. (Show Details)
Mattflaschen-WMF updated the task description. (Show Details)
Mattflaschen-WMF set Security to None.
Mattflaschen-WMF renamed this task from Move reply logic to rendering to promote a consistent experience with third-party API users to Move reply logic to rendering to promote a consistent experience with third-party API users?.Jul 10 2015, 4:31 AM
Mattflaschen-WMF updated the task description. (Show Details)

I'm confused. What's wrong with using the replies and replyToId entries in the revisions? Do those not point to the correct posts?

Catrope triaged this task as Low priority.Jul 22 2015, 11:55 PM

@happy5214 Right now the tree parent is chosen at post time (hence why per T105439 you need to use the reply link at post time).

The replyToId shows the tree parent of an already-created post.

This is suggesting to do the logical tree differently and create the visual tree at render time.

Mattflaschen-WMF renamed this task from Move reply logic to rendering to promote a consistent experience with third-party API users? to Move reply logic to rendering.Aug 13 2015, 9:19 PM
He7d3r added a subscriber: He7d3r.
Mattflaschen-WMF renamed this task from Move reply logic to rendering to Move indentation model to rendering.Feb 18 2016, 8:04 PM
Restricted Application added a project: Growth-Team. · View Herald TranscriptMar 10 2019, 3:15 AM