Status badge and "Review changes" only update after ~10 seconds

Created on 26 February 2025, about 1 month ago

Overview

But both are less impressive due to the ~10 s delay between making changes and seeing those UI pieces react:

That's because both depend on the ~10s polling of /xb/api/autosaves/pending.

(The status badge changes from for an existing unmodified entity to after you make any modification, as you can see in the GIF. See @jessebaker's diagram at #3505118-6: The status badge should indicate if there are changes to the page β†’ .)

Proposed resolution

We already are updating XB's preview immediately, by doing POST /xb/api/layout/…. after any client-side change.

That response currently only returns

{"html": …}

We can just make that also return a list of auto-saves newly created during that request, that’d result in instantaneous updates to both the status badge and β€œReview changes”!

No websockets. Not even a new request 😊 We only need websockets for making those changes appear instantaneously for other users, but for those it’s fine if it only arrives every ~10s.

User interface changes

The same as in the GIF, but instantaneous!

πŸ“Œ Task
Status

Active

Version

0.0

Component

Page builder

Created by

πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

Live updates comments and jobs are added and updated live.
  • Usability

    Makes Drupal easier to use. Preferred over UX, D7UX, etc.

Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024