alleyinteractive / alleyinteractive/wp-liveblog

Automatically Refresh Front-End for Logged-In Users

Aperta
#10 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
enhancement php typescript
Lingua principale
PHP
Stelle
0
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

### Description

- Ensure that new liveblog entries are displayed for users where the liveblog is active once per minute.
- For the purposes of this implementation, “active” liveblogs are defined as a post with a liveblog block where there has been a new liveblog post within the last 6 hours.
- Ensure that the liveblog entry content is populated using the same templating system that is used on initial load. (This likely means having the REST API for a liveblog post return a custom key that is an array of strings containing HTML for each liveblog entry to display which were rendered by the backend.)
- Minimize re-render of content where possible, but respond to updates (edited liveblogs should update and deleted liveblogs should delete, not just add new ones). A possible solution here is to have React take over the area that shows the liveblog entries, reading its initial state from the HTML that was put on the page when the page initially loaded, and then polling the REST API for updates every minute and adding/removing/updating items as necessary based on what changed, but without rerendering the entire list. Alternately, if it is more straightforward to use vanilla JS for this, that's also fine.

### Use Case

Users who are following the liveblog should be able to see new entries show up automatically on the front end without reloading the page.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.