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

  • Advanced Date and Time Editing

    Latest updates to edit.scrivito.com

    After receiving feedback from power users, we’ve extended the date and time editing options. Manual date input Some editors need to provide many dates in their daily work. For these users, pointing and clicking again and again becomes tiresome after a while. With the new option to specify a date...

  • Deleting Website Sections in One Step

    Latest updates to edit.scrivito.com

    Sometimes, a section or subsection of a website becomes obsolete, for example, if a product is no longer sold, or part of the documentation isn’t needed anymore. In this situation, you can still delete the pages one by one, starting at the lowest hierarchy level of the section concerned, but you...

  • Modernized Buttons and Icons

    Latest updates to edit.scrivito.com

    We made the editing interface more attractive and user-friendly by brushing up its icon set. The icons are now easier to distinguish and more consistent in style. Some details have been removed from them so that the buttons work better for more editors, especially those with lower resolution...

  • Scrivito Editing Interface Improvements

    Latest updates to edit.scrivito.com

    Adding users to a working copy has become easier. The “Collaborators” selection box now also includes editors whose email address matches the search term. In the German-language Scrivito UI, you can now enter floating numbers in the standard German format, in which a comma instead of a period is...

  • 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")...

  • All Publish Buttons Now Work the Same

    Latest updates to edit.scrivito.com

    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 content that was altered. Thank you...

  • 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...