Skip to content

Commit

Permalink
Merge pull request #8 from eea/develop
Browse files Browse the repository at this point in the history
Allow enabling and disabling of tag icon
  • Loading branch information
avoinea committed Dec 13, 2022
2 parents cf13db3 + c954277 commit 1ef0853
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 8 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@ 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).

### [1.0.2](https://github.com/eea/volto-tags-block/compare/1.0.1...1.0.2) - 13 December 2022

#### :rocket: New Features

- feat(tag): allow enabling and disabling of tag icon [David Ichim - [`8b94ab1`](https://github.com/eea/volto-tags-block/commit/8b94ab16a983b6d538a040793733ac488ce27037)]

#### :hammer_and_wrench: Others

- Add Sonarqube tag using bise-frontend addons list [EEA Jenkins - [`aec4766`](https://github.com/eea/volto-tags-block/commit/aec4766fa2a08fc24e9090251dcd98e29282c607)]
- yarn 3 [Alin Voinea - [`7086cbe`](https://github.com/eea/volto-tags-block/commit/7086cbe0ac57cc71fed897941c3b396451b139ac)]
- Add Sonarqube tag using marine-frontend addons list [EEA Jenkins - [`f77979e`](https://github.com/eea/volto-tags-block/commit/f77979eff94aeb78c3d47ba9292f991bfc2e345d)]
- Add Sonarqube tag using clms-frontend addons list [EEA Jenkins - [`fcaf2c8`](https://github.com/eea/volto-tags-block/commit/fcaf2c818a80a032501a37fdd9393de0474ab07e)]
- Add Sonarqube tag using demo-kitkat-frontend addons list [EEA Jenkins - [`0aec2c6`](https://github.com/eea/volto-tags-block/commit/0aec2c67bc1768d378bad484e8536306496dc0a7)]
- Add Sonarqube tag using forests-frontend addons list [EEA Jenkins - [`a3f92fd`](https://github.com/eea/volto-tags-block/commit/a3f92fd8f482df8c35031962c2c36966b27f1c48)]
### [1.0.1](https://github.com/eea/volto-tags-block/compare/1.0.0...1.0.1) - 16 November 2022

#### :hammer_and_wrench: Others
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-tags-block"
NAMESPACE = "@eeacms"
SONARQUBE_TAGS = "volto.eea.europa.eu,demo-www.eea.europa.eu,prod-www.eea.europa.eu,circularity.eea.europa.eu"
SONARQUBE_TAGS = "volto.eea.europa.eu,demo-www.eea.europa.eu,prod-www.eea.europa.eu,circularity.eea.europa.eu,forest.eea.europa.eu,demo-kitkat.dev2aws.eea.europa.eu,clmsdemo.devel6cph.eea.europa.eu,water.europa.eu-marine,biodiversity.europa.eu"
DEPENDENCIES = ""
VOLTO = "alpha"
}
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@eeacms/volto-tags-block",
"version": "1.0.1",
"version": "1.0.2",
"description": "@eeacms/volto-tags-block: Volto add-on",
"main": "src/index.js",
"author": "European Environment Agency: IDM2 A-Team",
Expand All @@ -16,10 +16,9 @@
"type": "git",
"url": "git@github.com:eea/volto-tags-block.git"
},
"dependencies": {},
"devDependencies": {
"@plone/scripts": "*",
"@cypress/code-coverage": "^3.10.0",
"@plone/scripts": "*",
"babel-plugin-transform-class-properties": "^6.24.1",
"md5": "^2.3.0"
},
Expand Down
4 changes: 2 additions & 2 deletions src/Tags/Tags.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ TagList.Content = ({ children }) => (
<div className="tags-content">{children}</div>
);

TagList.Tag = ({ children, href, openLinkInNewTab }) => {
TagList.Tag = ({ children, href, openLinkInNewTab, showTagIcon }) => {
return (
<UniversalLink
className="tag"
href={href}
openLinkInNewTab={openLinkInNewTab}
>
<Icon className={`icon`} name="hashtag" />
{showTagIcon && <Icon className={`icon`} name="hashtag" />}
<span className="name">{children}</span>
</UniversalLink>
);
Expand Down
3 changes: 2 additions & 1 deletion src/TagsBlock/View.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import TagList from '@eeacms/volto-tags-block/Tags/Tags';

const View = ({ data, mode }) => {
const { items = [], title, position } = data;
const { items = [], title, position, showTagIcon } = data;

if (!items.length && mode === 'edit') return <p>Add Tag items</p>;
return (
Expand All @@ -17,6 +17,7 @@ const View = ({ data, mode }) => {
color={item.color || 'teal'}
href={item.href || '#'}
openLinkInNewTab={!!item.openLinkInNewTab}
showTagIcon={showTagIcon}
key={item.category}
>
{item.category}
Expand Down
6 changes: 5 additions & 1 deletion src/TagsBlock/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default {
{
id: 'default',
title: 'Default',
fields: ['title', 'position', 'items'],
fields: ['title', 'position', 'showTagIcon', 'items'],
},
],

Expand All @@ -44,6 +44,10 @@ export default {
title: 'Alignment',
widget: 'align',
},
showTagIcon: {
title: 'Enable tag items icon',
type: 'boolean',
},
items: {
title: 'Tag items',
widget: 'object_list',
Expand Down

0 comments on commit 1ef0853

Please sign in to comment.