Skip to content

real-time updates on note detail view - #223

Ghost User requested to merge gh-b77c0252/246/unknown/refs/pull/246/head into develop

Created by: dakkar

useNoteCapture already subscribes to all updates for a note, so we can tell it when a note gets replied to, too

Since I'm not actually adding any extra subscription in the client, just an extra callback, there should be no overhead when replies are not coming in.

Also, all the timelines already call useNoteCapture for each note displayed, so we know the whole GlobalEventService thing works fine.

Many thanks to VueJS for taking care of all the DOM complications!

Tests done:

  • home timeline view updates normally when new notes are received (replies or not)
  • detailed view shows new replies in the right place (newer ones at the top, nested ones under their parent)
  • new replies in a detailed view don't cause weird scrolling problems

We still need to test this harder, though!

Possible improvement: showing "there are new notes" at the top like the timelines do.

Checklist

  • Read the contribution guide
  • Test working in a local environment
  • (If needed) Add story of storybook
  • (If needed) Update CHANGELOG.md
  • (If possible) Add tests

Merge request reports