Release Notes: September 2017 Release
Repositories
A release consists of new versions of the livingdocs-server
, the livingdocs-editor
and the livingdocs-framework
.
Livingdocs Server
How to require the server in your package.json:
"dependencies": {
"@livingdocs/server": "61.2.1",
}
- Link to the release branch: https://github.com/livingdocsIO/livingdocs-server/tree/maintenance-v61.2.x
Patches
- 61.2.1 - hooks: Log errors instead of crashing on registration
Livingdocs Editor
How to require the editor in your package.json:
"dependencies": {
"@livingdocs/editor": "20.10.4",
}
- Link to the release branch: https://github.com/livingdocsIO/livingdocs-editor/tree/maintenance-v20.10.x
Patches
- 20.10.1 - add archived state to articles details pages
- 20.10.2 - spellchecker: unload editable when removing the main (interactive) view
- 20.10.3 - reinitialise componentTree events when removing the mainView
- 20.10.4 - guard resrc image service call via framework
Livingdocs Framework
The framework is already integrated in the package.json of the upstream server and editor. It’s not necessary to integrate the framework from your side.
The framework does not have a release branch.
How to require the framework in your package.json:
dependencies: {
"@livingdocs/framework": "7.12.2"
}
Component changes
Component | Type | Description | PRs | Issues |
---|---|---|---|---|
Server | Bugfix | Enable cdata after updating xml2js to 0.4.18 | bae17234 | - |
Server | BREAKING CHANGE, Feature | Categories API. Read more | #1566 | #1288 |
Server | Bugfix | Remove new channel configuration (accidentally slipped in) | #1607 | - |
Server | Bugfix | Enable metadata in import. Read more | #1615 | #1490 |
Server | Feature | Channel configuration: Hooks are now registered on the feature. | #1589 | #1348 |
Server | BREAKING CHANGE | Removе deprecated doc-include methods and pusher endpoint. Read More | #1613 | #1430 |
Server | Feature | Add getRoyaltyRecipients endpoint | #1606 | - |
Server | BREAKING CHANGE, Feature | grunt-setup works now properly within a Docker container. Read More | #1617 | #1041 |
Server | Feature | Add document count to document-list endpoint. | #1627 | #1471 |
Server | Bugfix | Log errors instead of crashing on registration | #commit | - |
Editor | Bugfix | Show build settings on admin screen. | #1646 | - |
Editor | Bugfix | Update to new framework api. Read More | #1651 | - |
Editor | Bugfix | Use the correct package for semantic-release on maintenance branches | #1654 | - |
Editor | Bugfix | Allow print template selection on hugo import. | #1656 | #1490 |
Editor | Bugfix | Apply print layout change to document metadata. Read more | #1658 | #1469 |
Editor | Feature | Enhance the list’s dashboard with document count | #1661 | #1471 |
Editor | Feature | Define default image component on containers for drag & drop Read more | #1663, #255 | #1264 |
Editor | Bugfix | When a focus image component gets deleted the image upload icon disappears | #1663 | #1383 |
Editor | Bugfix | view: cannot transition from viewing to viewing | #commmit | #1432 |
Editor | Bugfix | As an editor I would like to see if I’m working on an archived article | #commmit | #1432 |
Editor | Bugfix | Components are not shown on drag and drop | #1680 | #1516 |
Editor | Bugfix | Uncaught TypeError: Cannot read property ‘configure’ of undefined | #1689 | #1527 |
Editor | Bugfix | TypeError: Cannot read property ‘rangeCount’ of null | #1678 | #1497 |
Framework | Feature | ComponentModel Api Improvements Read more | #241 | - |
Framework | Feature | Integrate Livingdocs release tools Read more | #241 | #1363 |
Framework | Bugfix | Image order on multi-upload from local machine Read more | #259 | #326 |
Known issues
Component | Type | Description | Issue |
---|---|---|---|
Editor | Bug | The controller with the name ‘TasksController’ is not registered. | #1481 |
In detail
Categories API
BREAKING CHANGE
We’re adding an experimental Categories api and did some renaming in the event sourcing setup.
Additionally to the new database table which is created by the database migration script, we also renamed some columns on the menu and groups tables.
If your setup automatically applies the migration, there’s nothing you have to do. If that’s not the case, you’ll need to run grunt migrate
.
API
const categories = liServer.features.api('li-categories')
categories.getCategoryTrees({projectId, channelId}, cb)
categories.getPublishedCategoryTree({projectId, channelId}, cb)
categories.getPublishedCategoryTrees({projectId, channelId, categoryTreeId}, cb)
// required params for all methods: {action, projectId, channelId, categoryTreeId, data}
//` action` must equal the method name
categories.createCategoryTree({params..., data: {label}, cb)
categories.publishCategoryTree(params, cb)
categories.deleteCategoryTree(params, cb)
categories.addCategory({params..., data: {id, label, slug, pathToHere, metadata}}, cb)
categories.updateCategory({params..., data: {id, label, slug, pathToHere, metadata}}, cb)
categories.removeCategory({params..., data: {id}}, cb)
categories.moveCategory({params..., data: {id, previous, parent}}, cb)
Enable metadata in import
The data object passed to the HugoImportApi can now contain a metadata object. E.g. NZZ can use it to pass their print metadata to the importer so an imported print article can be exported correctly.
Removing deprecated doc-include methods
BREAKING CHANGES
The
registerServiceRenderer
method on theserver.features.api('li-includes')
feature was removed. Please use theregisterService
method, which was introduced in https://github.com/livingdocsIO/livingdocs-server/pull/1470The method
includeApi.getServiceRendererMethod
got removed. Please useincludeApi.resolveInclude
to render an include.We’ve removed the deprecated
/authenticate/pusher
endpoint. Please make sure your editor is up to date and that your pusher configuration isn’t using that endpoint.The url you should use is
/pusher/authorize
:pusher: isEnabled: true endpoint: '/pusher/authorize'
grunt-setup
works now properly within a docker container
The config option
config.docker.enabled
has been replaced byconfig.db.run_db_setup_commands_within_docker_container
.config.db.run_db_setup_commands_within_docker_container
defaults totrue
and executes the db commands duringgrunt setup
in a Docker container.grunt setup
is not supported, when you start Docker containers withdocker-compose
and point to a container by a dns name.config.db.run_db_setup_commands_within_docker_container = false
executes the db commands duringgrunt setup
on the host system. For thatcreatedb
anddropdb
needs to be available as binaries on the host system.the documentation has been updated as well: https://github.com/livingdocsIO/livingdocs/pull/136/files.
Update to new framework api
The framework’s livingdoc
objects has changed its signature with regard to removing event listerners. The following code does not work anymore:
livingdoc.off()
It was replaced by:
livingdoc.removeListener()
Apply print layout change to document metadata
Each time when the metadata was applied to the document (e.g. document.update()
) the metadata reference which was passed to the MetadataService
in the Workspace
went stale and metadata updates didn’t arrive on the document.
Define default image component on containers for drag & drop
Feature: New defaultComponents configuration option
Image components can now also be defined as default components. A use case may be an image gallery where a different component should be used for images by default.
Example component configuration
in a Livingdocs design:
{
name: 'gallery',
label: 'Image Gallery',
directives: {
children: {
defaultComponents: {
image: 'image-slide'
}
}
}
}
Feature: Browser Drag API
Interactive pages have a new startBrowserDrag()
method. This method has an onDrop
callback that provides a dropLocation
.
livingdoc.createView({host, interactive, wrapper}).then ({iframe, renderer}) => {
renderer.page.startBrowserDrag({
event: event,
onDrop: ({event, dropLocation}) => {
// getDefaultComponent() will return the defaultComponent for the droplocation.
// Possible types are `editable` and `image`.
const imageComponentName = dropLocation.getDefaultComponent({type: 'image'})
const component = livingdoc.createComponent(imageComponentName)
// insert can be called multiple times. It will append each inserted component at the
// end of the dropLocation.
dropLocation.insert(component)
}
})
}
ComponentModel Api Improvements
ComponentModel
Allow to call setContent
with an object:
componentModel.setContent({
title: 'Moby Dick',
tagline: 'Whaling Weekly'
})
Allow to call getContent
without passing a directive name:
componentModel.getContent()
// returns
// {
// title: 'Moby Dick'
// tagline: 'Whaling Weekly'
// }
ComponentTree
Allow to pass content when creating a component:
componentTree.createComponent('title', {
title: 'Moby Dick'
})
(this also works for livingdoc.createComponentTree()
)
Integrate Livingdocs release tools
With the introduction of the
release-tools
it’s possible to create and maintain a maintenance branch for an old version with a proper semantic-release approach. You can read more here.We introduced a check to verify that on a
maintenance
branch only patch commits are allowed.
Image order on multi-upload from local machine
This is a framework fix and you need to ensure that your framework version is at least 7.12.1
. Since the editor and the server consumes the framework with ^
, they both should get the latest framework version.