Skip to content

Commit

Permalink
feat(slate-label): Allow tooltip to open by focus or click #263484 #26
Browse files Browse the repository at this point in the history
…from eea/develop
  • Loading branch information
ichim-david authored Feb 19, 2024
2 parents 96f0d77 + 65aa493 commit 1ec4a0c
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 30 deletions.
45 changes: 18 additions & 27 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,35 @@ 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).

### [0.6.0](https://github.com/eea/volto-slate-label/compare/0.5.9...0.6.0) - 19 February 2024

#### :rocket: New Features

- feat(label): added option to show label on hover or click #25 from eea/263484-label-hover [ichim-david - [`6a0dc07`](https://github.com/eea/volto-slate-label/commit/6a0dc07fcf0aec0202719e605f3fba281cd2a164)]
- feat: add logic to toggle tooltip message on hover [hazigabriel - [`572a890`](https://github.com/eea/volto-slate-label/commit/572a8906effe3d757e1733579a8c29a9b0bcd13f)]

#### :bug: Bug Fixes

- fix: change schema title [hazigabriel - [`8f03737`](https://github.com/eea/volto-slate-label/commit/8f0373702f31ee5dff268edc7859424e47fb9fc4)]

#### :house: Internal changes

- style: Automated code fix [eea-jenkins - [`8b93fea`](https://github.com/eea/volto-slate-label/commit/8b93fea555c7ebefae39033947adafc5f42bdfc5)]

#### :hammer_and_wrench: Others

- Update version in package.json [David Ichim - [`3f9a38b`](https://github.com/eea/volto-slate-label/commit/3f9a38b4941defa517b856ac0823978aeac8539e)]
### [0.5.9](https://github.com/eea/volto-slate-label/compare/0.5.8...0.5.9) - 18 January 2024

#### :house: Internal changes

- chore: [JENKINS] Refactor automated testing [valentinab25 - [`428cb54`](https://github.com/eea/volto-slate-label/commit/428cb54b660c8e5a974cda7752cbfbb27cd6613e)]

#### :hammer_and_wrench: Others

- test: [JENKINS] Use java17 for sonarqube scanner [valentinab25 - [`1af52c6`](https://github.com/eea/volto-slate-label/commit/1af52c65d7a4cc0bad42af4aa90684b30ecfe7f2)]
- test: [JENKINS] Run cypress in started frontend container [valentinab25 - [`104ad23`](https://github.com/eea/volto-slate-label/commit/104ad23fe3e822e5f5b8a21ffdadf60c241aad59)]
- test: [JENKINS] Add cpu limit on cypress docker [valentinab25 - [`e1c542c`](https://github.com/eea/volto-slate-label/commit/e1c542c0261c2af5423875ad9227600f5c49dc38)]
- test: [JENKINS] Increase shm-size to cypress docker [valentinab25 - [`15c7f19`](https://github.com/eea/volto-slate-label/commit/15c7f198e8ed52e23e9bbd553a871723c022d816)]
- test: [JENKINS] Improve cypress time [valentinab25 - [`58c0846`](https://github.com/eea/volto-slate-label/commit/58c0846d9760317fc031ad5910dcef57d8cf85d7)]
- test: [JENKINS] improve cypress time [valentinab25 - [`5c1dc4d`](https://github.com/eea/volto-slate-label/commit/5c1dc4d6b8bf2d2577458c0005e2fc41961a82a3)]
- test: increase timeout [valentinab25 - [`2ca8d7a`](https://github.com/eea/volto-slate-label/commit/2ca8d7a2cb4b37992b16f6e1e1076a7ae48c965d)]
- test: generate cypress code coverage [valentinab25 - [`8784584`](https://github.com/eea/volto-slate-label/commit/8784584b8933f310533288f36bf9a292b2433a73)]
- test: remove videos [valentinab25 - [`647977c`](https://github.com/eea/volto-slate-label/commit/647977c1f9b35ee511a653470cdb204c33063f92)]
- test: improve cypress testing time [valentinab25 - [`9237c03`](https://github.com/eea/volto-slate-label/commit/9237c034f2ae1bc10d43e320b2d9cdcb39347ae9)]
- Add Sonarqube tag using clms-frontend addons list [EEA Jenkins - [`c079112`](https://github.com/eea/volto-slate-label/commit/c0791125167e7bf01e521bf2558d49d039212b33)]
### [0.5.8](https://github.com/eea/volto-slate-label/compare/0.5.7...0.5.8) - 22 October 2023

#### :house: Internal changes
Expand Down Expand Up @@ -73,43 +83,27 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- test: Fix package.json scripts to use makefile [Alin Voinea - [`872eaf9`](https://github.com/eea/volto-slate-label/commit/872eaf9e16be65890e1ba942935c0a7a47ac2aca)]
- i18n: Add en [Alin Voinea - [`12ef506`](https://github.com/eea/volto-slate-label/commit/12ef506c27d8810836968f137d9e6a1711fdf64e)]
- test: Update Makefile and docker-compose to align it with Jenkinsfile [valentinab25 - [`e9b984b`](https://github.com/eea/volto-slate-label/commit/e9b984b42d3428ab737c02ffd480d2f6de393652)]
- Add Sonarqube tag using freshwater-frontend addons list [EEA Jenkins - [`c85d929`](https://github.com/eea/volto-slate-label/commit/c85d929a5637eb15bca13b4761b5ac08d8d29d79)]
### [0.5.2](https://github.com/eea/volto-slate-label/compare/0.5.1...0.5.2) - 14 June 2023

### [0.5.1](https://github.com/eea/volto-slate-label/compare/0.5.0...0.5.1) - 12 June 2023

#### :house: Internal changes

- chore: [JENKINS] Deprecate circularity website [valentinab25 - [`0d122e6`](https://github.com/eea/volto-slate-label/commit/0d122e663e43c46c3fced18727be0acd5a87c404)]

#### :hammer_and_wrench: Others

- test: jest should look for addons in node_modules Refs #253277 [valentinab25 - [`667fb86`](https://github.com/eea/volto-slate-label/commit/667fb860e064902b6db4efaffd3508217faec5cc)]
- test: Fix test config, coverage Refs #253277 [valentinab25 - [`25b23db`](https://github.com/eea/volto-slate-label/commit/25b23dbe1574ef332340593accee6c91157adcaf)]
- Add Sonarqube tag using industry-frontend addons list [EEA Jenkins - [`3f6b74d`](https://github.com/eea/volto-slate-label/commit/3f6b74d04eafec3cf0b46b781623f8b4d136c611)]
### [0.5.0](https://github.com/eea/volto-slate-label/compare/0.4.4...0.5.0) - 27 March 2023

#### :hammer_and_wrench: Others

- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`fbf669a`](https://github.com/eea/volto-slate-label/commit/fbf669ab11aab1ae0a5cb056a9f1dcbfef2459e2)]
- Add Sonarqube tag using ims-frontend addons list [EEA Jenkins - [`b8a123b`](https://github.com/eea/volto-slate-label/commit/b8a123bf98267d493ee5be52134719cde00eddee)]
- Add Sonarqube tag using advisory-board-frontend addons list [EEA Jenkins - [`3d7b7d4`](https://github.com/eea/volto-slate-label/commit/3d7b7d4ec275b8572fab5f45fc82dc00854ccede)]
- Add Sonarqube tag using advisory-board-frontend addons list [EEA Jenkins - [`283e9db`](https://github.com/eea/volto-slate-label/commit/283e9dbae39d3113066c3a5da7f3555c344f4a65)]
- Add Sonarqube tag using climate-energy-frontend addons list [EEA Jenkins - [`a47f640`](https://github.com/eea/volto-slate-label/commit/a47f6404717b2162fbb69c3bf2f1be5046397950)]
- test(Jenkins): Run tests and cypress with latest canary @plone/volto [Alin Voinea - [`7287269`](https://github.com/eea/volto-slate-label/commit/7287269bc4e718a6b66025e37bea024565bb7306)]
- Add Sonarqube tag using cca-frontend addons list [EEA Jenkins - [`847e792`](https://github.com/eea/volto-slate-label/commit/847e7928331e803e1c7b80aa662cfb21c3b2debb)]
- Add Sonarqube tag using bise-frontend addons list [EEA Jenkins - [`886d07a`](https://github.com/eea/volto-slate-label/commit/886d07a8b396e6b9810c378fbfd2dc8b7e3c9472)]
- yarn 3 [Alin Voinea - [`dad28ed`](https://github.com/eea/volto-slate-label/commit/dad28ed3f8225cda12ea1d8f059fe6b256fe6b5f)]
- Add Sonarqube tag using marine-frontend addons list [EEA Jenkins - [`f7dafe5`](https://github.com/eea/volto-slate-label/commit/f7dafe55c237813269e15a64f5c65bf4d3ea7519)]
- Add Sonarqube tag using clms-frontend addons list [EEA Jenkins - [`d30afde`](https://github.com/eea/volto-slate-label/commit/d30afde1b55457cabdcb51f016223d740ffb5518)]
- Add Sonarqube tag using demo-kitkat-frontend addons list [EEA Jenkins - [`d0a0724`](https://github.com/eea/volto-slate-label/commit/d0a0724848cd9c90f15747dba4ddffbe923b71b8)]
- Add Sonarqube tag using forests-frontend addons list [EEA Jenkins - [`5101f76`](https://github.com/eea/volto-slate-label/commit/5101f762987396651fb56504714a07754a8f76d0)]
### [0.4.4](https://github.com/eea/volto-slate-label/compare/0.4.3...0.4.4) - 16 November 2022

#### :hammer_and_wrench: Others

- test(estlint): Fix .project.eslintrc.js [Alin Voinea - [`2744fc0`](https://github.com/eea/volto-slate-label/commit/2744fc024024a9daae33607564e61141b2777c03)]
- Add Sonarqube tag using circularity-frontend addons list [EEA Jenkins - [`97bcd60`](https://github.com/eea/volto-slate-label/commit/97bcd60866db1c9f956871e183b98f6d79fbcdc6)]
### [0.4.3](https://github.com/eea/volto-slate-label/compare/0.4.2...0.4.3) - 25 October 2022

### [0.4.2](https://github.com/eea/volto-slate-label/compare/0.4.1...0.4.2) - 24 October 2022
Expand Down Expand Up @@ -138,7 +132,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- test(cypress): Fix volto version [Alin Voinea - [`511487e`](https://github.com/eea/volto-slate-label/commit/511487e39fdf88f2d32cff941c1c4bba19b2a6d6)]
- Revert "refactor(volto-slate): use @plone/volto-slate, latest volto compatibility refs #153447 (#6)" [Alin Voinea - [`88d2ee6`](https://github.com/eea/volto-slate-label/commit/88d2ee6390143c89a22fdebc8289dcd135f0e42f)]
- Release 0.3.0 [Alin Voinea - [`4f669e5`](https://github.com/eea/volto-slate-label/commit/4f669e538b962ea87a4b3a62a40b6e98c3a9adf2)]
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`438c326`](https://github.com/eea/volto-slate-label/commit/438c3265df1676a63ecdb378592bb2a1d48bf223)]
### [0.2.3](https://github.com/eea/volto-slate-label/compare/0.2.2...0.2.3) - 30 June 2022

### [0.2.2](https://github.com/eea/volto-slate-label/compare/0.2.1...0.2.2) - 13 April 2022
Expand All @@ -149,7 +142,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### :hammer_and_wrench: Others

- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`1cf44a6`](https://github.com/eea/volto-slate-label/commit/1cf44a6b9c62fadc06d73ea6f787c4720fdd5a7c)]
### [0.2.1](https://github.com/eea/volto-slate-label/compare/0.2.0...0.2.1) - 5 April 2022

#### :house: Documentation changes
Expand Down Expand Up @@ -183,5 +175,4 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### :hammer_and_wrench: Others

- yarn bootstrap [Alin Voinea - [`a1a0443`](https://github.com/eea/volto-slate-label/commit/a1a0443a38c213fa5a7b980e4ac1237d2d31192e)]
- Initial commit [Alin Voinea - [`190dd4a`](https://github.com/eea/volto-slate-label/commit/190dd4ab6ef74a24cfb19af4d6eb6f76c32aca47)]
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pipeline {
environment {
GIT_NAME = "volto-slate-label"
NAMESPACE = "@eeacms"
SONARQUBE_TAGS = "volto.eea.europa.eu,demo-www.eea.europa.eu,forest.eea.europa.eu,clmsdemo.devel6cph.eea.europa.eu,water.europa.eu-marine,biodiversity.europa.eu,climate-adapt.eea.europa.eu,climate-energy.eea.europa.eu,climate-advisory-board.devel4cph.eea.europa.eu,climate-advisory-board.europa.eu,www.eea.europa.eu-ims,www.eea.europa.eu-en,industry.eea.europa.eu,water.europa.eu-freshwater,land.copernicus.eu"
SONARQUBE_TAGS = "volto.eea.europa.eu,demo-www.eea.europa.eu,forest.eea.europa.eu,clmsdemo.devel6cph.eea.europa.eu,water.europa.eu-marine,biodiversity.europa.eu,climate-adapt.eea.europa.eu,climate-energy.eea.europa.eu,climate-advisory-board.devel4cph.eea.europa.eu,climate-advisory-board.europa.eu,www.eea.europa.eu-ims,www.eea.europa.eu-en,industry.eea.europa.eu,water.europa.eu-freshwater,land.copernicus.eu,insitu-frontend.eionet.europa.eu"
DEPENDENCIES = ""
BACKEND_PROFILES = "eea.kitkat:testing"
BACKEND_ADDONS = ""
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-slate-label",
"version": "0.5.9",
"version": "0.6.0",
"description": "@eeacms/volto-slate-label: Volto add-on",
"main": "src/index.js",
"author": "European Environment Agency: IDM2 A-Team",
Expand Down
3 changes: 2 additions & 1 deletion src/editor/LabelWrapper.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const LabelWrapper = (props) => {
const {
uid,
always_show,
show_on_hover,
label_type,
label_pointing,
tooltip_type,
Expand All @@ -34,7 +35,7 @@ const LabelWrapper = (props) => {
}
position={tooltip_pointing}
open={always_show || undefined}
on={!always_show ? 'click' : undefined}
on={show_on_hover ? 'hover' : 'click'}
trigger={
label_type !== undefined && label_type !== 'simple' ? (
<label
Expand Down
6 changes: 6 additions & 0 deletions src/editor/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export const LabelEditorSchema = {
'tooltip_type',
'tooltip_size',
'always_show',
'show_on_hover',
],
},
],
Expand Down Expand Up @@ -93,6 +94,11 @@ export const LabelEditorSchema = {
description: 'Always show the content label tooltip.',
type: 'boolean',
},
show_on_hover: {
title: 'Show tooltip on hover',
description: 'Show the content label tooltip on hover.',
type: 'boolean',
},
},
required: [],
};

0 comments on commit 1ec4a0c

Please sign in to comment.