Skip to content

Commit

Permalink
Merge pull request #17 from eea/develop
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
avoinea authored Aug 30, 2021
2 parents f41dadd + 0ba1931 commit ef73244
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 7 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,17 @@ 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).

#### [3.3.0](https://github.com/eea/volto-accordion-block/compare/3.2.4...3.3.0)

- use custom title icons [`#16`](https://github.com/eea/volto-accordion-block/pull/16)
- Release 3.3.0 [`2cbb1d5`](https://github.com/eea/volto-accordion-block/commit/2cbb1d53ce62b9cb42751c4c4997577ba4165649)
- Add Sonarqube tag using forests-frontend addons list [`ab257ac`](https://github.com/eea/volto-accordion-block/commit/ab257acb0c2c8e38b906fcce8f6e148e4690d473)

#### [3.2.4](https://github.com/eea/volto-accordion-block/compare/3.2.3...3.2.4)

> 21 July 2021
- Set initial values based on default schema properties (#14) [`#15`](https://github.com/eea/volto-accordion-block/pull/15)
- set initial values based on default schema properties [`#14`](https://github.com/eea/volto-accordion-block/pull/14)

#### [3.2.3](https://github.com/eea/volto-accordion-block/compare/3.2.2...3.2.3)
Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pipeline {
environment {
GIT_NAME = "volto-accordion-block"
NAMESPACE = "@eeacms"
SONARQUBE_TAGS = "volto.eea.europa.eu"
SONARQUBE_TAGS = "volto.eea.europa.eu,forest.eea.europa.eu"
DEPENDENCIES = ""
}

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": "@eeacms/volto-accordion-block",
"version": "3.2.4",
"version": "3.3.0",
"description": "volto-accordion-block: Volto accordion block",
"main": "src/index.js",
"author": "European Environment Agency: IDM2 A-Team",
Expand Down
8 changes: 4 additions & 4 deletions src/components/manage/Blocks/Accordion/AccordionEdit.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { Icon } from '@plone/volto/components';
import downSVG from '@plone/volto/icons/down-key.svg';
import rightSVG from '@plone/volto/icons/right-key.svg';
import cx from 'classnames';
import React from 'react';
import AnimateHeight from 'react-animate-height';
import { Accordion, Input } from 'semantic-ui-react';
import config from '@plone/volto/registry';

export default (props) => {
const {
Expand All @@ -17,6 +16,7 @@ export default (props) => {
index,
} = props;
const [activeIndex, setActiveIndex] = React.useState([0]);
const { titleIcons } = config.blocks.blocksConfig.accordion;

const handleClick = (e, itemProps) => {
const { index } = itemProps;
Expand Down Expand Up @@ -59,11 +59,11 @@ export default (props) => {
})}
>
{isExclusive(index) ? (
<Icon name={downSVG} size="24px" />
<Icon name={titleIcons.down} size="24px" />
) : (
<Icon
size="24px"
name={rightSVG}
name={titleIcons.right}
className={cx({ 'rotate-arrow': data?.right_arrows })}
/>
)}
Expand Down
2 changes: 1 addition & 1 deletion src/components/manage/Blocks/Accordion/Schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export const accordionBlockSchema = () => ({
],
},
right_arrows: {
title: 'Arrows on the right',
title: 'Title Icon on the right',
type: 'boolean',
default: false,
},
Expand Down
6 changes: 6 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import {
AccordionLayoutSchema,
} from './components';
import { PanelsWidget } from '@eeacms/volto-accordion-block/components';
import rightSVG from '@plone/volto/icons/right-key.svg';
import downSVG from '@plone/volto/icons/down-key.svg';

const extendedSchema = (config) => {
const choices = Object.keys(config.blocks.blocksConfig)
Expand Down Expand Up @@ -40,6 +42,10 @@ const applyConfig = (config) => {
title: 'Accordion',
icon: accordionSVG,
group: 'common',
titleIcons: {
right: rightSVG,
down: downSVG,
},
view: AccordionBlockView,
edit: AccordionBlockEdit,
restricted: false,
Expand Down

0 comments on commit ef73244

Please sign in to comment.