Test your website performance for free
Test your website performance

Scrivito JS SDK 1.4.0 Is Available

Editing interface improvements

Changes dialog displays last editor

On the changes dialog of a working copy, the individual items now include the name of the user who most recently edited them. So, should questions arise regarding the changes made to a page (for example when publishing), instead of navigating to the page and opening its properties, you can simply use the changes dialog to determine the person most recently involved.

Binaries can be renamed

You asked for this, and now it’s possible: Images and other binaries can be renamed. Just open the Content Browser, find and select the image to rename, and click the pen button next to the name!

In the page properties, on the “Linked by” tab of a page, the Scrivito UI now opens a source page in a new window instead of navigating the UI to this page. This way, the Content Browser doesn’t need to be reopened to visit another linking page.


Content Browser is faster with large SVGs and GIFs

Content Browser users will no longer experience slowdowns when scrolling through SVG and GIF image collections containing large files. If an SVG or GIF is too large to be shown as a thumbnail, the Content Browser now displays a simple placeholder instead.

Working copies sidebar panel remembers scroll position

For better usability, the scroll position of the working copies panel in the sidebar now stays in effect when closing and reopening the sidebar. Previously, the scroll position was lost on every close.

API improvements

Customizable page menu

Customizing Scrivito’s top-right menu can make the life of editors easier and increase productivity. Using our new API, Scrivito.extendMenu, you can now add your own commands, links, custom dialogs (see below), etc., to this menu.

The new API in action.

Custom dialogs

For adding custom functionality to Scrivito’s editing interface, the SDK now provides a function for opening dialogs with custom content, Scrivito.openDialog. Please refer to the API documentation for details about this new function.

Changes to the Scrivito.urlFor API

With Scrivito.urlFor, the fragment key in the options prop (for specifying the hash value to be appended to the URL) has been renamed to hash; fragment is now deprecated.
If the target is a Scrivito.Link, urlFor now includes the link’s query and hash information in the returned URL unless they are overridden by the options. So, if you don’t want urlFor to append a query or hash to the URL, use { query: '', hash: '' } as the value of options.

Introducing preloading

In conjunction with pre-rendering, the new Scrivito.preload API serves to pre-warm the Scrivito cache. This speeds up the process of making a pre-rendered page interactive and avoids flicker when changing from the pre-rendered HTML markup to the live React page. To support this preloading, the Scrivito.renderPage API now returns a preloadDump, which contains all the CMS content needed for rendering the page concerned. The dump can be stored along with the pre-rendered HTML markup and be used later with Scrivito.preload.

As prerendering is a brand new feature, neither usage examples nor a tutorial are available as of now but will be soon!

Scrivito’s Link objects now have a rel attribute which can be set using the API.

New API method Widget#destroy

For programmatically deleting widgets from pages more easily, the Widget#destroy method has been provided. It allows you to remove a widget from the widgetlist attribute containing it without having access to this attribute.

More flexible widget hierarchy restrictions

Previously, when defining a widget class using createWidgetClass or provideWidgetClass, instances of this widget could (and still can) be restricted to a single parent widget class using the onlyInside parameter. For example, if you wanted ButtonWidgets to be contained only in BoxWidgets, you would specify onlyInside: "BoxWidget" for the ButtonWidget class.
Starting at this release, it is now possible to alternatively specify a list of parent widgets instead of just a single one:
onlyInside: ["BoxWidget", "SectionWidget"]

SDK package is significantly smaller

The Scrivito JS SDK is now compiled with webpack 4. Compared to webpack 3, the package size is around seven percent smaller now, causing it to be downloaded faster.

Bugfixes

The Scrivito.LinkTag component erroneously allowed specifying a Scrivito.Binary as the value of the to prop. The LinkTag was even rendered, but the link was not followed when clicked. The Binary value type is now refused and throws an error.
If you have been using this combination in your code, please use Scrivito.urlFor instead to obtain the URL of a binary value.

More great blog posts from Andreas Viebke

  • Scrivito Enterprise CMS - Product Illustration

    Scrivito JS SDK 1.31.0 Released

    Server-side access to restricted content via Node.js You can now also access restricted Scrivito content on a server, e.g. for archiving your website content. For this, the apiKey option was added to Scrivito.configure . See also Using Scrivito with Node.js. Scrivito = require("scrivito")...

  • Scrivito Editing Interface Improvements

    Latest updates to edit.scrivito.com

    All publish buttons now work the same The behavior of the “Publish” buttons in Scrivito’s editing interface has been improved and aligned: All of these buttons now directly open the confirmation dialog which now also includes a button for opening the “Changes” list and getting an overview of the...

  • Scrivito Editing Interface Improvements

    Latest changes to edit.scrivito.com

    The active Content Browser tab is preserved The Content Browser sometimes prevented editors from quickly inspecting the properties of multiple objects one after the other. When the user selects another object of the same type, the active tab now remains open. Thank you for using Scrivito! Please...

  • Scrivito Editing Interface Improvements

    Latest changes to edit.scrivito.com

    A distinctive icon for new and changed images Editors mainly have to deal with two types of content objects: pages and images. To make it easier to spot such objects for reviewing them, a dedicated icon for images is now displayed in the “Changes” sidebar and dialog. Thank you for using Scrivito!...

  • Scrivito Enterprise CMS - Product Illustration

    Scrivito JS SDK 1.30.0 Released – Featuring Layout Components

    Introducing layout components, optionally with editable content You can now implement page-type-specific layout components and optionally have them render attributes for editor-defined content. If such layouts are present for a page that is part of the page hierarchy, the layout components of the...

  • Scrivito for Rails SDK 1.18.0 Released

    Added support for Ruby on Rails 7.0 The Scrivito for Rails SDK now supports Ruby on Rails 7.0. It requires Ruby 2.7 or later. Earlier Rails versions are no longer supported by Scrivito. Note that during the upgrade you will need to migrate from Rails 5.2 (with Scrivito 1.17.0 ) directly to Rails...

  • Scrivito JS SDK 1.29.0 Released

    Reducing the payload for your website visitors You’ve probably already noticed that Scrivito’s editing interface is highly configurable through editing configurations that allow the developer to specify, for example, which page properties the editors should be able to adjust. Since website...

  • Scrivito Enterprise CMS - Product Illustration

    Scrivito JS SDK 1.28.0 Released

    Duplicating parent pages For the convenience of editors, pages with subpages, i.e. page hierarchies as a whole, can now be duplicated, obviating the need to copy and then paste the pages individually. Email address as a tooltip when hovering over a user’s name For identifying users better...

  • Scrivito JS SDK 1.27.1 Bugfix Release

    Bugfixes obj.copy() now works again In previous Scrivito JS SDK versions, the obj.copy() instance method did not always work as designed. Now it does. Please accept our apologies for any inconvenience caused by this issue.

  • Scrivito JS SDK 1.27.0 Released

    More versatile “Changes” sidebar Like on the “Hierarchy” sidebar, the pages listed on the “Changes” panel now also feature a menu command for opening their respective properties, meaning that you no longer need to navigate to a page just to open its properties. Furthermore, the items on the...