Skip to content

@mawtex mawtex released this Aug 17, 2016 · 1542 commits to master since this release

Composite C1 5.1 (5.1.6072.17836)

Download

Download Composite C1 5.1, pre-compiled

What's new?

Version 5.1 is a service release, which brings bulk publishing, time zone support and UI enhancements to users, fixes for issues found in the v5 release and other minor improvements and optimizations.

With v5.1 developers can override the UI and logic used for add/edit/publish/... actions on pages/data, use dependency injection for parameters in the Function system, use new widgets and create Packages that can update existing data.

Bulk Publishing

Users can now execute content workflow actions, like publish and approve, in bulk. The feature is available on the “Websites” node via the “List Unpublished Pages” command.

bulk publication

Time Zone setting support

You can now override the time zone used for managing date time values in the administrative interface. The setting can be changed from the “Global Settings” menu. When not configured, the time zone of the web server is used.

time zone config

You can preview / browse to pages and content items when you link to them

The internal link selection dialog provides you with a rendering of the page / media you are about to link to, giving you a visual confirmation. You can also navigate to the element you want to by browsing to it, in addition to selecting it in the tree.

browser in link selection

Add Page now a drop down where users select the page type

The ability to select a specific page type when creating new pages was added. Users will now see a drop down button with page type options, and select a page type via this drop down.

add page dropdown

Customizing the flows of data actions (like “add page”)

Developers can now attach customized add/edit/delete workflows to a specific data type, making them either default or conditional based on data field values. This allows developers to do things like customizing the “Add Page” experience, presenting the user with a wizard customized to the type of page they are creating.

For details please see http://docs.composite.net/Console/Override-Data-Actions

Hierarchical Selector, new widget

A new widget that lets users select N elements from a hierarchical structure was added.

hierarchical selector

The widget is fed preselected values and a hierarchical structure – in the form markup you can invoke it using the following:

<cms:binding name="SelectedKeys" type="System.Collections.Generic.IEnumerable`1[System.Object]"/>
<cms:binding name="TreeNodes" type="System.Collections.Generic.IEnumerable`1[Composite.C1Console.Forms.CoreUiControls.SelectionTreeNode]"/>
…
<HierarchicalSelector AutoSelectChildren="true" Required="true"> 
                <HierarchicalSelector.SelectedKeys>
                                <cms:bind source="SelectedKeys" />
                </HierarchicalSelector.SelectedKeys>
                <HierarchicalSelector.TreeNodes>
                                <cms:read source="TreeNodes" />
                </HierarchicalSelector.TreeNodes>
</HierarchicalSelector>

Icon Selector, new widget

A new widget enables users to select an icon from an SVG sprite sheet. The widget is configured with a path to the SVG file containing icons.

console icon widget

Example of an SVG sprite file:

<svg xmlns="http://www.w3.org/2000/svg">
    <defs>
        <g id="accept-green" viewBox="0 0 32 32" stroke="none" fill="green">
          <polygon points="4,16 8,12 14,18 26,6 30,10 14,26  "/>
        </g>
        <g id="accept" viewBox="0 0 32 32" stroke="none">
          <polygon points="4,16 8,12 14,18 26,6 30,10 14,26  "/>
        </g>
    </defs>
</svg> 

Example of form markup to invoke widget:

<SvgIconSelector Label="Icon" SvgSpritePath="~/Frontend/sprite.svg">
    <SvgIconSelector.Selected>
        <cms:bind source="bindingVariableNameHere" />
    </SvgIconSelector.Selected>
</SvgIconSelector>

The widget will enumerate all /svg/defs/g elements (which has an id attribute) – in the above example, this is 2 elements.

A specialized widget - ConsoleIconSelector – has also been introduced. This is a specialized version of SvgIconSelector, preset to display the icons available in the Console.

icon widget

Package Installer features – support for data default values and data update

Making DataPackageFragmentInstaller (the component typically responsible for adding data as part of a package install) take default value attributes into account when validating data to install. This allows you to skip data for columns that has a default value specified on them, and also enables older packages to install on a new data schema, provided added columns have default values.

DataPackageFragmentInstaller also respects two new attributes when configured in the install.xml script: Setting "allowOverwrite" to true will ensure that a data item – if already existing – will be updated (and otherwise added). Setting "onlyUpdate" to true will explicitly require that the data item should be already existing, and it will be updated by the package.

<mi:Add installerType="Composite.Core.PackageSystem.PackageFragmentInstallers.DataPackageFragmentInstaller, Composite" uninstallerType="Composite.Core.PackageSystem.PackageFragmentInstallers.DataPackageFragmentUninstaller, Composite">
    <Types>
        <Type type="Composite.Community.Blog.Tags" allowOverwrite="true" onlyUpdate="false">
            <Data dataScopeIdentifier="public" locale="?" dataFilename="~\Datas\Composite.Community.Blog.Tagss_public.xml" />
        </Type>
    </Types>
</mi:Add>

Function previews – optional and more responsive UI

The images that represent Function calls in Visual Editor – previews of the HTML generated by the function – are now optional and can be globally disabled via the configuration. Locate the “functionPreviewEnabled” in Composite.config and set it to 'false' to use generic function representations.

The process generating function preview images have been optimized in a number of ways:

  • support for external images has been added
  • Console user cookies are now passed to the process
  • old images are used while updates are generated (calmer UI experience),
  • and logging in case of issues has improved.

Startup code can force an abort

The ApplicationStartupAttribute used to mark that code in a class should be executed as part of the application startup now accepts the parameter “AbortStartupOnException”, which makes the core re-throw exceptions from the startup code and effectively block the system from starting.

    [ApplicationStartup(AbortStartupOnException = true)]
    public static class SampleStartupClass
    {
        public static void OnBeforeInitialize()
        {
        }

        public static void OnInitialized()
        {
        }
    }

Dependency Injection support for function parameters

Developers who wish to use DI to set Functions' parameters can now do so, using a new service collection. When your Function is invoked with unset parameters, the service collection is probed for the same type (typically interface based) and an object is retrieved/constructed and assigned to the function parameter.

A typical use case for this is abstracting implementation away from the Function code and instead, letting them communicate via an interface. During the application startup, you register said interfaces with concrete implementations. You can switch these implementations later on, if the environment (like staging or live) or external dependencies (like a data source) changes.

The UI for defining Function calls will treat parameters that can be invoked via the service container as optional (hidden) and thus allow users to add such functions.

See http://docs.composite.net/Functions/Dependency-Injections-on-Parameters for more information.
The Service Container is based on Microsoft.Extensions.DependencyInjection.

Fixed Issues

The following issues reported on GitHub were fixed in this release:

entering area 5_1

Assets 4
You can’t perform that action at this time.