Decide how to handle block previews per user

Created on 8 November 2024, about 1 month ago

Overview

In #3484671-10: Add support for block derivatives I made the decision for now to render blocks as the anonymous user, and remove any user-related cache contexts. This improves cacheability of the components endpoint and avoids leaking any authenticated or user-specific data in the block previews.

At some point, we probably want the previews to be more realistic and actually render as they would to the current user.

Proposed resolution

Remove the anonymous user switch and cache each block preview separately.
Dynamically build the components endpoint on the fly for each user where necessary.

User interface changes

Block previews will become more accurate.

📌 Task
Status

Postponed

Version

0.0

Component

Page builder

Created by

🇬🇧United Kingdom longwave UK

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024