Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style_text widget to use actionsInfoMap attribute #31

Merged
merged 4 commits into from
Oct 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 23 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +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).

### [1.0.0](https://github.com/eea/volto-listing-block/compare/0.6.8...1.0.0) - 25 October 2022
### [1.0.1](https://github.com/eea/volto-listing-block/compare/1.0.0...1.0.1) - 28 October 2022

#### :bug: Bug Fixes

- fix(listing): fix image margin on search item [kreafox - [`3e30ca0`](https://github.com/eea/volto-listing-block/commit/3e30ca0043c217e4c8301267bf8a79b36611105f)]

#### :nail_care: Enhancements

- refactor(volto-slate): use @plone/volto-slate refs#153447 [nileshgulia1 - [`a2aa572`](https://github.com/eea/volto-listing-block/commit/a2aa572c2d68c6fc842112c3d841986f5eeb857e)]
- change(listing): style_text widget to use actionsInfoMap attribute [David Ichim - [`8c28651`](https://github.com/eea/volto-listing-block/commit/8c2865155fe7722cbd4f85b0ac65d65b06a8f467)]

## [1.0.0](https://github.com/eea/volto-listing-block/compare/0.6.8...1.0.0) - 25 October 2022

#### :house: Documentation changes

Expand Down Expand Up @@ -37,6 +43,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
#### :hammer_and_wrench: Others

- linting fixes [David Ichim - [`331ce4a`](https://github.com/eea/volto-listing-block/commit/331ce4ad8ec2b9d598ff9b15ee46ea7a53de2c06)]
- Add Sonarqube tag using marine-frontend addons list [EEA Jenkins - [`36ef986`](https://github.com/eea/volto-listing-block/commit/36ef986f4f9809cc8881e81dfc58dc5c0f7ad543)]
### [0.6.7](https://github.com/eea/volto-listing-block/compare/0.6.6...0.6.7) - 28 September 2022

#### :nail_care: Enhancements
Expand Down Expand Up @@ -107,6 +114,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- fix cypress by defining color also in volto-listing-block [David Ichim - [`a5a1324`](https://github.com/eea/volto-listing-block/commit/a5a1324b1b80fca264342ff24f050b212a2505b3)]
- linting fixes [David Ichim - [`f082535`](https://github.com/eea/volto-listing-block/commit/f0825350da16338026c26622ad30911d5439d649)]
- Add styling schema demo [Tiberiu Ichim - [`9d95279`](https://github.com/eea/volto-listing-block/commit/9d952798bb9e80da2781091bc0c582d6a0809481)]
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`baf4b37`](https://github.com/eea/volto-listing-block/commit/baf4b37b4418d05f81605ac97cf7b1476701a02a)]
- Style adjusment for search item [kreafox - [`ab83a5f`](https://github.com/eea/volto-listing-block/commit/ab83a5f1adc6a2bde6740846e02bff58c7a633a9)]
- Remove unneeded style for search item [kreafox - [`a1fde0f`](https://github.com/eea/volto-listing-block/commit/a1fde0f5291176c5136314699f61033cbb62f6ea)]
- WIP search item [kreafox - [`c7d933c`](https://github.com/eea/volto-listing-block/commit/c7d933c2637965d7b93642c97ea8013f37cdc4cd)]
Expand Down Expand Up @@ -134,6 +142,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
#### :hammer_and_wrench: Others

- Remove useless Default theme option [Alin Voinea - [`3b7e8f8`](https://github.com/eea/volto-listing-block/commit/3b7e8f87ac88e02e3a7684088ea5f9f322c5753b)]
- Add Sonarqube tag using circularity-frontend addons list [EEA Jenkins - [`23b11b0`](https://github.com/eea/volto-listing-block/commit/23b11b00f2ce70fd275f4c675ba8443c2724903b)]
### [0.4.1](https://github.com/eea/volto-listing-block/compare/0.4.0...0.4.1) - 23 June 2022

### [0.4.0](https://github.com/eea/volto-listing-block/compare/0.3.2...0.4.0) - 10 June 2022
Expand All @@ -154,6 +163,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### :hammer_and_wrench: Others

- Add Sonarqube tag using clms-frontend addons list [EEA Jenkins - [`3862702`](https://github.com/eea/volto-listing-block/commit/3862702466bac959f3999a10842e3cd533dc6881)]
### [0.3.1](https://github.com/eea/volto-listing-block/compare/0.3.0...0.3.1) - 11 April 2022

#### :bug: Bug Fixes
Expand All @@ -162,12 +172,14 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### :hammer_and_wrench: Others

- Add Sonarqube tag using clms-frontend addons list [EEA Jenkins - [`f38c11e`](https://github.com/eea/volto-listing-block/commit/f38c11e37d6376713234a47ead1d0665f03c163f)]
### [0.3.0](https://github.com/eea/volto-listing-block/compare/0.2.0...0.3.0) - 9 March 2022

#### :hammer_and_wrench: Others

- bump version [Miu Razvan - [`a1cef0d`](https://github.com/eea/volto-listing-block/commit/a1cef0d692bc49a4aa1be5988d0c9cb0d25cb299)]
- add PreviewImage till https://github.com/plone/volto/pull/3122 is merged [Miu Razvan - [`4f8a6c2`](https://github.com/eea/volto-listing-block/commit/4f8a6c21517f29a20724f813f95b45511e557064)]
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`b6d612c`](https://github.com/eea/volto-listing-block/commit/b6d612cdb84b6f9f5ddc0485f7794005b2a09f3f)]
### [0.2.0](https://github.com/eea/volto-listing-block/compare/0.1.5...0.2.0) - 4 March 2022

#### :hammer_and_wrench: Others
Expand All @@ -194,11 +206,19 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### :hammer_and_wrench: Others

- Add Sonarqube tag using freshwater-frontend addons list [EEA Jenkins - [`28f1090`](https://github.com/eea/volto-listing-block/commit/28f10909e263378517ddde84d84c04512c3d2c0d)]
### [0.1.3](https://github.com/eea/volto-listing-block/compare/0.1.2...0.1.3) - 10 December 2021

#### :hammer_and_wrench: Others

- Refs #142010 - Optimize Volto-addons gitflow pipelines [valentinab25 - [`f8c8b64`](https://github.com/eea/volto-listing-block/commit/f8c8b642c0de6db65b7a67515164dcafae359686)]
- Add Sonarqube tag using industry-frontend addons list [EEA Jenkins - [`7b647c2`](https://github.com/eea/volto-listing-block/commit/7b647c206c1414633ec41d864c6499986161dab1)]
- Add Sonarqube tag using clms-frontend addons list [EEA Jenkins - [`d02020c`](https://github.com/eea/volto-listing-block/commit/d02020c4e9b1aa69cea1f75ef12d745e7c22004b)]
- Add Sonarqube tag using bise-frontend addons list [EEA Jenkins - [`ad9e8cd`](https://github.com/eea/volto-listing-block/commit/ad9e8cdecb00709db7bf2ac84fd055ed2e10f95d)]
- Add Sonarqube tag using forests-frontend addons list [EEA Jenkins - [`613e782`](https://github.com/eea/volto-listing-block/commit/613e782c438eaaea7d439299746bef1ceadb33b3)]
- Add Sonarqube tag using sustainability-frontend addons list [EEA Jenkins - [`b60cdde`](https://github.com/eea/volto-listing-block/commit/b60cdde6b5814ccfc484b4d2af1292cfd57d981a)]
- Add Sonarqube tag using climate-energy-frontend addons list [EEA Jenkins - [`1b6d68f`](https://github.com/eea/volto-listing-block/commit/1b6d68fd4009f4fea1602912760c746951823fc7)]
- Add Sonarqube tag using ims-frontend addons list [EEA Jenkins - [`8e44298`](https://github.com/eea/volto-listing-block/commit/8e442980d01e393fb4fce0d3db68348627a86464)]
### [0.1.2](https://github.com/eea/volto-listing-block/compare/0.1.1...0.1.2) - 17 June 2021

### [0.1.1](https://github.com/eea/volto-listing-block/compare/0.1.0...0.1.1) - 10 June 2021
Expand All @@ -216,4 +236,5 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### :hammer_and_wrench: Others

- yarn bootstrap [Alin Voinea - [`bac461d`](https://github.com/eea/volto-listing-block/commit/bac461d220dcb93173e48c9c21162dae084949eb)]
- Initial commit [Alin Voinea - [`3e20e5b`](https://github.com/eea/volto-listing-block/commit/3e20e5b483e4c3b826be44f4dd549ec445280b39)]
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-listing-block",
"version": "1.0.0",
"version": "1.0.1",
"description": "@eeacms/volto-listing-block: Volto add-on",
"main": "src/index.js",
"author": "European Environment Agency: IDM2 A-Team",
Expand Down
2 changes: 1 addition & 1 deletion src/blocks/Listing/SearchItemTemplate.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const BasicItem = (props) => {
{hasImage && (
<PreviewImage
item={item}
style={{ marginLeft: 'auto' }}
className="right"
preview_image_url={item.preview_image_url}
/>
)}
Expand Down
13 changes: 6 additions & 7 deletions src/blocks/Listing/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@ import messages from '@eeacms/volto-listing-block/messages';

import alignLeftSVG from '@plone/volto/icons/align-left.svg';
import alignCenterSVG from '@plone/volto/icons/align-center.svg';
import clearSVG from '@plone/volto/icons/clear.svg';

export const ALIGN_VALUE_MAP = [
['align_left', alignLeftSVG],
['align_center', alignCenterSVG],
['', clearSVG],
];
const ALIGN_INFO_MAP = {
align_left: [alignLeftSVG, 'Left'],
align_center: [alignCenterSVG, 'Center'],
};

export const CardStylingSchemaEnhancer = ({ schema }) => {
const styleSchema = schema.properties.styles.schema;
Expand All @@ -18,7 +16,8 @@ export const CardStylingSchemaEnhancer = ({ schema }) => {
text_align: {
title: 'Text align',
widget: 'style_text_align',
actions: ALIGN_VALUE_MAP,
actions: Object.keys(ALIGN_INFO_MAP),
actionsInfoMap: ALIGN_INFO_MAP,
},
};

Expand Down