Scrivito 1.6.0 Release Notes

Improvements

Introducing the sidebar

Over the past months, as we added notification icons and the display size switch to the Scrivito panel, we realized that the panel has become too small to nicely accommodate any further controls. So we complemented it with a sidebar for better accessibility and unique presentation of the available functions and pieces of information.

The working copy menu as well as all the buttons and notification icons in the top right corner of the Scrivito panel, except the page menu, have moved to the sidebar. (The page menu icon has been redesigned, too, by the way.)

To give you full control over the amount of space available for editing content, the sidebar can be minimized, left open, or hidden together with the Scrivito top panel. In the minimized state, there are four main buttons each of which represents a distinct set of functions: the Content Browser, working copies, notifications, and display sizes. The Content Browser is opened directly, but clicking one of the other buttons opens the sidebar, revealing the functions included in the corresponding set. Clicking the button once more minimizes the sidebar again.

The sidebar is automatically opened and closed as the mouse pointer enters or, respectively, leaves it unless the button of the currently open section is clicked to close it. In this case, hovering temporarily has no effect.

At the bottom right, there is a button for hiding the sidebar as well as the top panel. In this state, the only visible element is this button which, however, looks slightly different. Click it to have the panel and the sidebar displayed again.

We also redesigned the mode switch to make the selected mode better distinguishable from the other ones.

In the “Changes” position, the switch now has a meaningful background color reflecting the selected “Changes” mode: green for “Additions”, red for “Deletions”, and blue for “All changes”.

We hope you like the new sidebar as much as we do!

Better confirmation prompt on deletion

When deleting a CMS object, and this object is referenced by other objects via a link, linklist, reference, or referencelist attribute, or via an <a href> or an <img src> tag inside an html attribute, Scrivito now lets you know this, and also which objects contain these links.

If you're unsure about a CMS object referencing the one to delete, just click the given description to open this referencing object in the Content Browser.

The dialog uses the description_for_editor callback of the model classes of the referencing objects, making it possible to have the page titles displayed, for example.

Improved reference attribute editor

Users can now clear single references using a delete button.

To make this button appear in a reference editor, specify the data-scrivito-editors-allow-delete=true option in the call to scrivito_tag:

Introducing numeric attribute types

Scrivito has two new attribute types, integer and float, that make it easier to handle values of these types. You no longer need to use strings to represent them, validate these strings and convert them to a numeric type. Also, sorting objects by true numbers yields properly sorted lists as opposed to sorting them by numbers represented as strings.

Usage

First, add the desired attributes to the model class concerned:

To have the attribute values displayed and make them editable in a details view, render them as shown below.

For both types, the provided number editor supports a range and a step size you can specify using the min, max, and step options:

Syntactically invalid values (e.g. “2oo”) and values not in the given range are not stored and marked as an error.

Updated slider editor

The slider editor now supports these new attribute types. Here is an example of a slider for durations ranging from 1 to 10 seconds, in steps of 0.5 seconds:

Semi-automatic conversion of numbers stored as strings

If you have been using string attributes for representing numbers, you can simply change the type of these attributes to integer or float in the model classes without having to migrate the attribute values, i.e. change their format. When retrieving strings as values of integer or float attributes, Scrivito automatically converts them to the corresponding type.

However, converted integer and float attribute values are not automatically written back to the attributes, causing them not to be considered in searches.

CMS objects now have a backlinks method (via their base class, BasicObj). backlinks searches for CMS objects containing one or more attributes linking to a given CMS object. So the search returns the CMS objects in which at least one html, link, linklist, reference or referencelist attribute links to the CMS object.

For rendering such backlinks on details views, Scrivito includes a new helper, scrivito_backlinks:

The helper generates HTML markup that fits in with the general look and feel of Scrivito's user interface.

Establishing CMS object associations

The Scrivito SDK now includes helpers for establishing CMS object associations in the style of Active Record Associations. Three new methods, belongs_to, belongs_to_many and has_many, allow you to define one-to-one and one-to-many associations between CMS objects. See Modeling Object Associations for examples and further details.

Changelog

The changelog reflects minor improvements and bugfixes that were made in addition to the changes listed above.

Details

Minor improvements

  • The page and widget type browsers are now less crowded. Also, the sort order of the most recently used items doesn't change anymore after picking an item.
  • The widget browser is now populated faster, so adding a series of widgets to a page should be even less time consuming.
  • Scrivito now displays a proper message when trying to move a page to a different working copy.
  • The publishing history now includes the user name of the person who published a working copy.
  • Scrivito automatically adds margins to widgets and widget containers. However, some widgets may require special treatment regarding their margins. To support this, the scrivito_tag template helper now offers the disable_margins editing option you can use to prevent Scrivito from rendering margins.
  • Scrivito delivers binaries (e.g. images or PDF files) from a CDN using generated URLs that are valid only for a limited period of time. When editing content in place and pasting such a URL into an html attribute, or using it as a value of a link or linklist attribute, the URL doesn't work anymore after its validity period is over.
    To remedy this, Scrivito's in-place editing interface now converts such binary CDN URLs back to their corresponding CMS object IDs whenever it saves the contents of an attribute of one of the relevant types.
  • The Redactor editor is now deprecated. You can continue to use Redactor, but there won't be any updates in future Scrivito versions. See the in-place editors documentation for details.
  • While saving an edited image, Scrivito now displays an on-page saving indicator.

    Bugfixes

    • The link and linklist editors now correctly display the link query and link fragment for internal links.
    • We fixed a bug that rendered the Content Browser unusable when deleting an item while the details view was maximized.
    • It is now possible to negate the links_to and refers_to search operators.
    • When creating a page or selecting a widget for insertion, the items in the “All” section of the type browser are now always sorted alphabetically.
    • The second level cache is now properly used in multi-threaded processes.
    • Sometimes, a widget or list context menu was only partially visible because it was opened in the wrong direction. This release fixes the issue.
    • After editing the properties of a page and closing the dialog, Scrivito no longer removes the query and fragment parameters from the current URL.
    • With Safari and Firefox, files dropped onto a dropzone are now properly uploaded to Scrivito.
    • Scrivito is now compatible with jquery-ui-rails 6.

    More great blog posts from Andreas Viebke

    • Scrivito Enterprise CMS - Product Illustration

      Scrivito JS SDK 1.45.0 Released

      Interface Builder Supports Further Attribute Types for Filtering

      Interface Builder improvements Filtering data by enum, boolean, date, and number attributes The Interface Builder’s data editor now also lets you filter data by attributes of the enum , boolean , date , and number types. This makes it much more convenient and intuitive to select and present data...

    • Scrivito Enterprise CMS - Product Illustration

      Scrivito JS SDK 1.44.2 Released

      Bugfix Release An issue with Scrivito.useDataLocator has been fixed. It prevented filters with reference data attributes from being evaluated properly. We apologize for any inconvenience this issue may have caused! Thanks again for using Scrivito!

    • Scrivito Enterprise CMS - Product Illustration

      Scrivito JS SDK 1.44.1 Released

      Maintenance release This is a maintenance release with minor improvements. As always, we will keep you posted if there is anything interesting to report. Stay tuned! Thanks again for using Scrivito!

    • Scrivito Enterprise CMS - Product Illustration

      Scrivito JS SDK 1.44.0 Released

      Interface Builder improvements LinkTag supports data items The LinkTag component now supports data items as navigation targets. Passing a DataItem to the to prop causes the link to point to the details page of the item concerned. Accessing current data of a specific class The useDataScope and...

    • Scrivito Enterprise CMS - Product Illustration

      Scrivito JS SDK 1.43.0 Released

      Interface builder improvements Data attributes For the application to utilize the attributes selected by content editors, the Scrivito SDK now includes a (beta) API for representing data attributes, DataItemAttribute . A data item attribute can be accessed from a data item via...

    • Providing Data Classes with Custom Attributes

      Latest updates to edit.scrivito.com

      Defining custom attributes via the Interface Builder’s data editor The data editor now lets you add custom attributes to data classes. If, for example, you have a “Current user” data class that requires an attribute not specified in the editing configuration of this class, e.g., “email”, you can...

    • Scrivito Enterprise CMS - Product Illustration

      Scrivito JS SDK 1.42.1 Released

      Bugfixes Data integration issue > DataItem#get > no longer requires a loading context, i.e., > Scrivito.load > or > Scrivito.connect > . We apologize for any inconvenience the above issue may have caused! Thank you for using Scrivito!

    • Scrivito Enterprise CMS - Product Illustration

      Scrivito JS SDK 1.42.0 Released

      Interface Builder improvements DataScope#limit() API method The new DataScope#limit() method determines the maximum number of data items a DataScope may contain. It returns either a number indicating this limit, or undefined if no limit is set. Introducing Scrivito.currentLanguage()...

    • Introducing the ​New Data Editor

      Latest updates to edit.scrivito.com

      > > As you may have noticed, we have been continuously refining and expanding the Interface Builder. Now the time has come for a correspondingly enhanced data editor. > > The new data editor comes with an intuitive interface that provides a visual representation of a data locator as well as...

    • Scrivito Enterprise CMS - Product Illustration

      Scrivito JS SDK 1.41.0 Released

      Interface Builder improvements Accessing a data scope from the current data It is now possible to access a DataScope from the current data using the new Scrivito.useData hook (which supersedes the Scrivito.useDataItem hook). The new hook always returns a DataScope . In order to check whether this...