Skip to content

Commit

Permalink
breaking(tabs): use DefaultEdit variation as base for responsive acco…
Browse files Browse the repository at this point in the history
…rdion edit refs #266327 #85 from eea/develop

We need to get the tab changed on the view only and by getting rid of the react-responsive-tab from the edit
we avoid a page crash when you focus on the tab panels and you resize the panel
  • Loading branch information
ichim-david committed Mar 7, 2024
2 parents f09d8aa + a4cb7fc commit 2f7fc23
Show file tree
Hide file tree
Showing 13 changed files with 86 additions and 258 deletions.
58 changes: 31 additions & 27 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,37 @@ 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).

### [7.5.0](https://github.com/eea/volto-tabs-block/compare/7.0.5...7.5.0) - 7 March 2024

#### :boom: Breaking Change

- breaking(tabs): menu-item-text markup is now span instead of p tag [David Ichim - [`5aa7981`](https://github.com/eea/volto-tabs-block/commit/5aa798140654b4b6e3487c082483640432eddd65)]

#### :bug: Bug Fixes

- fix(tests): after change from p tag to reference the .menu-item-text class [David Ichim - [`9a45825`](https://github.com/eea/volto-tabs-block/commit/9a45825f80162f734872786fd0fe9359dd57ad9f)]
- fix: update 'Add Tabs default template' cypress test - Default tabs text to be inside a span within the tab link instead of a p tag [Claudia Ifrim - [`4209573`](https://github.com/eea/volto-tabs-block/commit/4209573f6ab25019814902ec38685f908958f6a7)]
- fix: remove AccordionEdit import form index [Claudia Ifrim - [`24323cc`](https://github.com/eea/volto-tabs-block/commit/24323cc0e0c674697fddac62df22c646785ec41b)]

#### :nail_care: Enhancements

- change(tabs): use default edit for accordion tab edit [David Ichim - [`7ed5f4e`](https://github.com/eea/volto-tabs-block/commit/7ed5f4e61ab1747ede5641138119c47d8b3dd6c1)]

#### :house: Internal changes

- style: Automated code fix [eea-jenkins - [`e37f2d4`](https://github.com/eea/volto-tabs-block/commit/e37f2d4c26a9ff72ffb09263caa96c55e3161551)]
- style: Automated code fix [eea-jenkins - [`0520da7`](https://github.com/eea/volto-tabs-block/commit/0520da7ad50e7be1d62d574308d4acc5a858a401)]

#### :hammer_and_wrench: Others

- Bump package version to 7.5 from 7.0.5 [David Ichim - [`a675429`](https://github.com/eea/volto-tabs-block/commit/a675429308f6d9a2b39e101396e7a5b195982f30)]
- Prettier and stylelint [David Ichim - [`f6182d1`](https://github.com/eea/volto-tabs-block/commit/f6182d142b790b2256e24ad7ed49e8904ec73aa8)]
- Fixed call to stylelint within MakeFile [David Ichim - [`dd53ee8`](https://github.com/eea/volto-tabs-block/commit/dd53ee84f4bb97b55d5d26e0447cff2f07268afc)]
- Revert "update" [David Ichim - [`ceb8ab7`](https://github.com/eea/volto-tabs-block/commit/ceb8ab7fd216d369ed487a7fe63aec876e2c4624)]
- fix cypress [Razvan - [`6fe2bb4`](https://github.com/eea/volto-tabs-block/commit/6fe2bb46de04c9c2c0115d3fc97caf9ea5952b6e)]
- Update react-slick version to 0.30.1 [David Ichim - [`3369176`](https://github.com/eea/volto-tabs-block/commit/33691768899e7f91d2cd15319dbe3ebe66cf1513)]
- update [Razvan - [`61b19e8`](https://github.com/eea/volto-tabs-block/commit/61b19e8584ff6023320b3671414392ea11449ff0)]
- use DefaultEdit variation for responsive accordion, refs #266327 [Razvan - [`11acf6c`](https://github.com/eea/volto-tabs-block/commit/11acf6ce5afe022ddd30bff42c9a3321d1284da6)]
### [7.0.5](https://github.com/eea/volto-tabs-block/compare/7.0.4...7.0.5) - 10 December 2023

#### :rocket: New Features
Expand Down Expand Up @@ -35,8 +66,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### :hammer_and_wrench: Others

- test: [JENKINS] Use java17 for sonarqube scanner [valentinab25 - [`3b87d12`](https://github.com/eea/volto-tabs-block/commit/3b87d12df4d01031231b15eb4196f6ff6937706b)]
- test: [JENKINS] Run cypress in started frontend container [valentinab25 - [`f5f3430`](https://github.com/eea/volto-tabs-block/commit/f5f343024b45bb0206e0169cce6dd0e8472b6795)]
### [7.0.1](https://github.com/eea/volto-tabs-block/compare/7.0.0...7.0.1) - 9 November 2023

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

#### :hammer_and_wrench: Others

- test: [JENKINS] Add cpu limit on cypress docker [valentinab25 - [`bd6ffd4`](https://github.com/eea/volto-tabs-block/commit/bd6ffd42a00a2d77ff59545d9adaab7a45361446)]
- test: [JENKINS] Increase shm-size to cypress docker [valentinab25 - [`d481e25`](https://github.com/eea/volto-tabs-block/commit/d481e25c4d61d7ff6ea11ff75c99fbdd730ecd82)]
- test: [JENKINS] Improve cypress time [valentinab25 - [`6c39efc`](https://github.com/eea/volto-tabs-block/commit/6c39efcc30bddfebb6c61f8a8cd714f61828ec69)]
## [7.0.0](https://github.com/eea/volto-tabs-block/compare/6.0.3...7.0.0) - 31 October 2023

#### :house: Internal changes

- chore: [JENKINS] Refactor automated testing [valentinab25 - [`f2e3d39`](https://github.com/eea/volto-tabs-block/commit/f2e3d3973c026f0331b82e0f691ec9bdc5899672)]

#### :hammer_and_wrench: Others

Expand Down Expand Up @@ -266,7 +291,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### :house: Internal changes

- chore: [JENKINS] Deprecate circularity website [valentinab25 - [`820aaa9`](https://github.com/eea/volto-tabs-block/commit/820aaa963e978a893a23b77f694bb011f3d768c1)]

#### :hammer_and_wrench: Others

Expand Down Expand Up @@ -357,7 +381,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 - [`52bc1b0`](https://github.com/eea/volto-tabs-block/commit/52bc1b0fbd4611173b8ca9dc2cf4033b31474420)]
## [4.0.0](https://github.com/eea/volto-tabs-block/compare/3.0.1...4.0.0) - 10 March 2023

#### :house: Internal changes
Expand All @@ -368,13 +391,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
#### :hammer_and_wrench: Others

- Release 4.0.0 [Alin Voinea - [`8fc4cc9`](https://github.com/eea/volto-tabs-block/commit/8fc4cc9d8dc71e623e6586b95871cb3b98dc385f)]
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`22d5bdc`](https://github.com/eea/volto-tabs-block/commit/22d5bdc1b3579cc46c73ce855041ca09154eb502)]
- Add Sonarqube tag using advisory-board-frontend addons list [EEA Jenkins - [`fde4324`](https://github.com/eea/volto-tabs-block/commit/fde4324f962cde8e8de0d76a44bee4b67d216bf8)]
- Add Sonarqube tag using advisory-board-frontend addons list [EEA Jenkins - [`9175e47`](https://github.com/eea/volto-tabs-block/commit/9175e470d793edc63b62a99940aed25dd45f3713)]
- test(Jenkins): Run tests and cypress with latest canary @plone/volto [Alin Voinea - [`3348950`](https://github.com/eea/volto-tabs-block/commit/334895036f8e367281abb35a20879c32dfbfc292)]
- Add Sonarqube tag using cca-frontend addons list [EEA Jenkins - [`39bfb39`](https://github.com/eea/volto-tabs-block/commit/39bfb39fa6e8483e639491ff998293e758ac6384)]
- yarn 3 [Alin Voinea - [`7e98df5`](https://github.com/eea/volto-tabs-block/commit/7e98df59669d71945be461e86e282b913538b805)]
- Add Sonarqube tag using demo-kitkat-frontend addons list [EEA Jenkins - [`079d7a4`](https://github.com/eea/volto-tabs-block/commit/079d7a43480e92fe280a9372399ff2d4d28537ae)]
### [3.0.1](https://github.com/eea/volto-tabs-block/compare/3.0.0...3.0.1) - 16 November 2022

#### :hammer_and_wrench: Others
Expand All @@ -398,9 +415,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### :hammer_and_wrench: Others

- Add Sonarqube tag using marine-frontend addons list [EEA Jenkins - [`a00e419`](https://github.com/eea/volto-tabs-block/commit/a00e419aef4c82a25f277f5e25e3d512c7838264)]
- lint fix [David Ichim - [`c0a898c`](https://github.com/eea/volto-tabs-block/commit/c0a898c54461478baed2ac2f149ae580d4c89aeb)]
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`3b284e6`](https://github.com/eea/volto-tabs-block/commit/3b284e65e0eafa9b5ad8c92b4cb77628ffcc8103)]
### [2.2.0](https://github.com/eea/volto-tabs-block/compare/2.1.0...2.2.0) - 25 August 2022

#### :hammer_and_wrench: Others
Expand All @@ -416,7 +431,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

- Release 2.1.0 [Alin Voinea - [`3cdfa30`](https://github.com/eea/volto-tabs-block/commit/3cdfa30d4d03d864be8ad63f0648b4717298734a)]
- Squashed commit of the following: [Alin Voinea - [`ca241f5`](https://github.com/eea/volto-tabs-block/commit/ca241f56a96817679a1948154e2a8cc0e17b96fe)]
- Add Sonarqube tag using circularity-frontend addons list [EEA Jenkins - [`68ea5a6`](https://github.com/eea/volto-tabs-block/commit/68ea5a6b971fc36840cf5716a04f68316b229b2b)]
### [2.0.2](https://github.com/eea/volto-tabs-block/compare/2.0.1...2.0.2) - 16 June 2022

### [2.0.1](https://github.com/eea/volto-tabs-block/compare/2.0.0...2.0.1) - 10 June 2022
Expand Down Expand Up @@ -460,8 +474,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- Let theme addon to set default values for default template schema [Miu Razvan - [`55f148d`](https://github.com/eea/volto-tabs-block/commit/55f148d1a95417f8a0b55681ce250acde8463c1c)]
- Render pane as container if tabs-block has full-width class [Miu Razvan - [`bbffb96`](https://github.com/eea/volto-tabs-block/commit/bbffb96b908476ddee447af3ce79bafb1a12f9a8)]
- Refactor default template [Miu Razvan - [`58eff52`](https://github.com/eea/volto-tabs-block/commit/58eff5281adb08a5f8fe6d21fd43330252012277)]
- Add Sonarqube tag using clms-frontend addons list [EEA Jenkins - [`72a6735`](https://github.com/eea/volto-tabs-block/commit/72a6735cbbc0e7d57b4bb7ea83fea9becc317018)]
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`e928da1`](https://github.com/eea/volto-tabs-block/commit/e928da1df7e4680bd4be9b5d46406800d721b8c5)]
### [1.2.12](https://github.com/eea/volto-tabs-block/compare/1.2.11...1.2.12) - 21 January 2022

### [1.2.11](https://github.com/eea/volto-tabs-block/compare/1.2.10...1.2.11) - 4 January 2022
Expand All @@ -476,17 +488,11 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### :hammer_and_wrench: Others

- Add Sonarqube tag using freshwater-frontend addons list [EEA Jenkins - [`cd2e2ac`](https://github.com/eea/volto-tabs-block/commit/cd2e2ac1d127bfc688ecf16e17734603ab727a34)]
### [1.2.8](https://github.com/eea/volto-tabs-block/compare/1.2.7...1.2.8) - 10 December 2021

#### :hammer_and_wrench: Others

- Refs #142010 - Optimize Volto-addons gitflow pipelines [valentinab25 - [`d10c0b3`](https://github.com/eea/volto-tabs-block/commit/d10c0b3d35d25c530d19eebde38dfe5da8fda01b)]
- Add Sonarqube tag using industry-frontend addons list [EEA Jenkins - [`1a7187f`](https://github.com/eea/volto-tabs-block/commit/1a7187f10b2bd9e1307dabf51823f63ccd766864)]
- Add Sonarqube tag using clms-frontend addons list [EEA Jenkins - [`72a7550`](https://github.com/eea/volto-tabs-block/commit/72a755025b38e1d8dd7fe206273a70585e4b9ac8)]
- Add Sonarqube tag using forests-frontend addons list [EEA Jenkins - [`022b277`](https://github.com/eea/volto-tabs-block/commit/022b2779a5d7fd7217c2d8a559eafab0bd86ce23)]
- Add Sonarqube tag using sustainability-frontend addons list [EEA Jenkins - [`84c9bea`](https://github.com/eea/volto-tabs-block/commit/84c9bea7a0aba2fe9ef9713e7131de6da6e0bcce)]
- Add Sonarqube tag using ims-frontend addons list [EEA Jenkins - [`020aa97`](https://github.com/eea/volto-tabs-block/commit/020aa97bc70a643ea3857566c5a1dc3a5200c2be)]
### [1.2.7](https://github.com/eea/volto-tabs-block/compare/1.2.6...1.2.7) - 27 August 2021

#### :hammer_and_wrench: Others
Expand All @@ -503,8 +509,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

- Move less import in View instead of Edit [Tiberiu Ichim - [`84aeff0`](https://github.com/eea/volto-tabs-block/commit/84aeff04a980076f54687c546691d37b6e790478)]
- gitignore tweaks [Tiberiu Ichim - [`f4c993d`](https://github.com/eea/volto-tabs-block/commit/f4c993d004b126f08f16651ab9460546fa9e9cad)]
- Add Sonarqube tag using frontend addons list [EEA Jenkins - [`865906a`](https://github.com/eea/volto-tabs-block/commit/865906a0deb261d44cc23e26bfd2d1dd0e319640)]
- Add Sonarqube tag using frontend addons list [EEA Jenkins - [`5383861`](https://github.com/eea/volto-tabs-block/commit/538386100adbc868e693c1c2a5ba13461307ffee)]
- Style update [razvanMiu - [`323aaaf`](https://github.com/eea/volto-tabs-block/commit/323aaafcad01d8fdf0e713a1fc254ae9fe319f43)]
- Fix 'scroll to' feature on carousel [razvanMiu - [`16c6a08`](https://github.com/eea/volto-tabs-block/commit/16c6a08f6db687542ea38e07a92b265e592f6173)]
- Better accesibility [razvanMiu - [`3511611`](https://github.com/eea/volto-tabs-block/commit/351161197270a4807f01d85a7055cbaadae72f8e)]
Expand Down
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-tabs-block"
NAMESPACE = "@eeacms"
SONARQUBE_TAGS = "volto.eea.europa.eu,climate-energy.eea.europa.eu,biodiversity.europa.eu,www.eea.europa.eu-ims,sustainability.eionet.europa.eu,forest.eea.europa.eu,clms.land.copernicus.eu,industry.eea.europa.eu,water.europa.eu-freshwater,demo-www.eea.europa.eu,clmsdemo.devel6cph.eea.europa.eu,water.europa.eu-marine,climate-adapt.eea.europa.eu,climate-advisory-board.devel4cph.eea.europa.eu,climate-advisory-board.europa.eu,www.eea.europa.eu-en"
SONARQUBE_TAGS = "volto.eea.europa.eu,climate-energy.eea.europa.eu,biodiversity.europa.eu,www.eea.europa.eu-ims,sustainability.eionet.europa.eu,forest.eea.europa.eu,clms.land.copernicus.eu,industry.eea.europa.eu,water.europa.eu-freshwater,demo-www.eea.europa.eu,clmsdemo.devel6cph.eea.europa.eu,water.europa.eu-marine,climate-adapt.eea.europa.eu,climate-advisory-board.devel4cph.eea.europa.eu,climate-advisory-board.europa.eu,www.eea.europa.eu-en,insitu-frontend.eionet.europa.eu"
DEPENDENCIES = "@eeacms/volto-block-style"
BACKEND_PROFILES = "eea.kitkat:testing"
BACKEND_ADDONS = ""
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,15 @@ test-update: ## Update jest tests snapshots

.PHONY: stylelint
stylelint: ## Stylelint
$(NODE_MODULES)/stylelint/bin/stylelint.js --allow-empty-input 'src/**/*.{css,less}'
$(NODE_MODULES)/.bin/stylelint --allow-empty-input 'src/**/*.{css,less}'

.PHONY: stylelint-overrides
stylelint-overrides:
$(NODE_MODULES)/.bin/stylelint --custom-syntax less --allow-empty-input 'theme/**/*.overrides' 'src/**/*.overrides'

.PHONY: stylelint-fix
stylelint-fix: ## Fix stylelint
$(NODE_MODULES)/stylelint/bin/stylelint.js --allow-empty-input 'src/**/*.{css,less}' --fix
$(NODE_MODULES)/.bin/stylelint --allow-empty-input 'src/**/*.{css,less}' --fix
$(NODE_MODULES)/.bin/stylelint --custom-syntax less --allow-empty-input 'theme/**/*.overrides' 'src/**/*.overrides' --fix

.PHONY: prettier
Expand Down
18 changes: 12 additions & 6 deletions cypress/e2e/01-block-tabs.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,15 @@ describe('Blocks Tests', () => {
// then the page view should contain our changes
cy.contains('Tabs block default template');

cy.get('.tabs-block p').contains('Tab 2').parent().focus().type('{enter}');
cy.get('.tabs-block .menu-item-text')
.contains('Tab 2')
.parent()
.focus()
.type('{enter}');

cy.contains('Oxygen');

cy.get('.tabs-block p').contains('Tab 1').click();
cy.get('.tabs-block .menu-item-text').contains('Tab 1').click();

cy.contains('Hydrogen');
});
Expand Down Expand Up @@ -165,10 +169,14 @@ describe('Blocks Tests', () => {
cy.get('.tabs-block .horizontal-responsive.tabs').should('exist');
cy.contains('Horizontal First Item');

cy.get('.tabs-block p').contains('Tab 2').parent().focus().type('{enter}');
cy.get('.tabs-block .menu-item-text')
.contains('Tab 2')
.parent()
.focus()
.type('{enter}');
cy.contains('Horizontal Second Item');

cy.get('.tabs-block p').contains('Tab 1').click();
cy.get('.tabs-block .menu-item-text').contains('Tab 1').click();
cy.contains('Horizontal First Item');
});

Expand Down Expand Up @@ -204,8 +212,6 @@ describe('Blocks Tests', () => {

cy.get('.tabs-block').contains('Tab 1').dblclick().type('Tab 1 edited');

cy.get('.field-wrapper-accordionIconRight .checkbox').click();

// Add new tab
cy.get('.tabs-block .addition-button').click();
cy.get('.tabs-block').contains('Tab 3').dblclick().type('Tab 3 edited');
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@eeacms/volto-tabs-block",
"version": "7.0.5",
"version": "7.5.0",
"description": "volto-tabs-block: Volto add-on",
"main": "src/index.js",
"author": "European Environment Agency: IDM2 A-Team",
Expand All @@ -24,7 +24,7 @@
"@eeacms/volto-anchors": "*",
"@eeacms/volto-block-style": "*",
"react-responsive-tabs": "4.4.3",
"react-slick": "^0.24.0",
"react-slick": "^0.30.1",
"slick-carousel": "^1.8.1"
},
"devDependencies": {
Expand Down
Loading

0 comments on commit 2f7fc23

Please sign in to comment.