Skip to content
This repository has been archived by the owner on Oct 25, 2022. It is now read-only.

Commit

Permalink
Merge pull request #232 from eea/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
avoinea authored Mar 8, 2022
2 parents 227866f + a4646ac commit 0ed38ac
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 32 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,16 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [5.3.5](https://github.com/eea/volto-slate/compare/5.3.4...5.3.5)

- Do not override the whole Title block, but only the view/edit components. [`#231`](https://github.com/eea/volto-slate/pull/231)
- Do not override the whole Title block, but only the view/edit components. (#231) [`#230`](https://github.com/eea/volto-slate/issues/230)

#### [5.3.4](https://github.com/eea/volto-slate/compare/5.3.3...5.3.4)

- Fix cypress to work with latest Plone 6 [`716c9c3`](https://github.com/eea/volto-slate/commit/716c9c368277ba459bf5193601d574ec7162a50a)
> 17 February 2022
- Fix cypress to work with latest Plone 6 [`#228`](https://github.com/eea/volto-slate/pull/228)

#### [5.3.3](https://github.com/eea/volto-slate/compare/5.3.2...5.3.3)

Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pipeline {
GIT_NAME = "volto-slate"
NAMESPACE = ""
DEPENDENCIES = "volto-slate:asCypressDefault"
SONARQUBE_TAGS = "volto.eea.europa.eu,climate-energy.eea.europa.eu,forest.eea.europa.eu,biodiversity.europa.eu,www.eea.europa.eu-ims,sustainability.eionet.europa.eu,clms.land.copernicus.eu,industry.eea.europa.eu,water.europa.eu-freshwater"
SONARQUBE_TAGS = "volto.eea.europa.eu,climate-energy.eea.europa.eu,forest.eea.europa.eu,biodiversity.europa.eu,www.eea.europa.eu-ims,sustainability.eionet.europa.eu,clms.land.copernicus.eu,industry.eea.europa.eu,water.europa.eu-freshwater,demo-www.eea.europa.eu"
}

stages {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "volto-slate",
"version": "5.3.4",
"version": "5.3.5",
"description": "Slate.js integration with Volto",
"main": "src/index.js",
"author": "European Environment Agency: IDM2 A-Team",
Expand Down
43 changes: 14 additions & 29 deletions src/blocks/Title/index.js
Original file line number Diff line number Diff line change
@@ -1,40 +1,25 @@
import React from 'react';
import titleSVG from '@plone/volto/icons/text.svg';
import TitleBlockView from './TitleBlockView';
import TitleBlockEdit from './TitleBlockEdit';

export default (config) => {
const className = 'documentFirstHeading';
const formFieldName = 'title';

config.blocks.blocksConfig.title = {
id: 'title',
title: 'Title',
icon: titleSVG,
group: 'text',
view: (props) => (
<TitleBlockView
{...props}
className={className}
formFieldName={formFieldName}
/>
),
edit: (props) => (
<TitleBlockEdit
{...props}
className={className}
formFieldName={formFieldName}
/>
),
restricted: true,
mostUsed: false,
blockHasOwnFocusManagement: true,
sidebarTab: 0,
security: {
addPermission: [],
view: [],
},
};
config.blocks.blocksConfig.title.view = (props) => (
<TitleBlockView
{...props}
className={className}
formFieldName={formFieldName}
/>
);
config.blocks.blocksConfig.title.edit = (props) => (
<TitleBlockEdit
{...props}
className={className}
formFieldName={formFieldName}
/>
);

return config;
};

0 comments on commit 0ed38ac

Please sign in to comment.