Scrivito JS SDK 1.34.0 Released

Featuring data lists with placeholders

Posted on July 18, 2023

Placeholders in lists

In the previous Scrivito JS SDK release, we had introduced placeholders as a means to incorporate personalized data into textual content. Building upon that, we are excited to announce that in this release, we have expanded the functionality of placeholders so that they can be used in lists. This enhancement empowers editors to effortlessly style a list by defining a “template” that is applied to each list item. In this template, placeholders are dynamically replaced with the corresponding actual data.

This functionality is achieved by means of a new Scrivito.ContentTag prop, dataContext, also introduced in this release.

The JustRelate Console uses data lists with placeholders

Data lists

Another new feature in our previous release was the provideDataItem API that lets you retrieve specific data from a backend service. This includes fetching information such as the current user’s name and other personal details.

Now, we are happy to present an even more powerful API to you, provideDataClass. With this addition for retrieving data from backend services, you can now seamlessly integrate not only individual data items but also collections of multiple data items into your Scrivito app, e.g., user-specific data lists such as “my orders” or “my bills”. This combined with the “Placeholders in lists” feature gives editors the flexibility to design and customize these lists using placeholders.

Further improvements

Provided components are always rendered

Scrivito.provideComponent and Scrivito.provideLayoutComponent now rerender the component when they are called again. This helps with “Hot Module Replacement” (HMR) in vite and “Hot reloading” in parcel for Scrivito components.

Improved click handling

In-place editing is now better aligned with app-defined click handling. Developers no longer need to work around propagated (“bubbling”) clicks for elements that are clickable and editable at the same time, e.g. an ImageTag wrapped in a LinkTag, or a button with an editable label.

The HTML in-place editor now lets you create relative links containing “@” characters in their path. Such links were previously interpreted as email addresses.

Better control over prerendering

Scrivito.updateContent() now returns a promise that resolves once the content update is complete. Scrivito developers can use this to assert that the latest content is cached before prerendering is triggered. This is especially useful in projects in which prerendering is applied frequently.

Thanks again for using Scrivito!