Skip to content

Commit

Permalink
Merge pull request #28 from eea/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
GhitaB authored Jun 8, 2023
2 parents c068ced + 25b9679 commit 506bf2f
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 103 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,18 @@ 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.1.20](https://github.com/eea/volto-cca-policy/compare/0.1.19...0.1.20) - 8 June 2023

#### :hammer_and_wrench: Others

- cca add countries to landing page [Tripon Eugen - [`2c0fe52`](https://github.com/eea/volto-cca-policy/commit/2c0fe52122391e506b366b0074522d9f15ac02bd)]
- cca cluster test and default filter [Tripon Eugen - [`ab14e54`](https://github.com/eea/volto-cca-policy/commit/ab14e540c9f091d00716220af59a1db7c4772b5b)]
- Fix env variable to exclude external routes [Tiberiu Ichim - [`caf929a`](https://github.com/eea/volto-cca-policy/commit/caf929af031895e2599ebcb6768b36c1d583eb59)]
### [0.1.19](https://github.com/eea/volto-cca-policy/compare/0.1.18...0.1.19) - 7 June 2023

#### :house: Internal changes

- chore: [JENKINS] Remove alpha testing version [valentinab25 - [`ad1ced0`](https://github.com/eea/volto-cca-policy/commit/ad1ced0971ba116c13a3b5fcc039172cc915c919)]

#### :hammer_and_wrench: Others

Expand Down Expand Up @@ -43,7 +51,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- Add responsive container [Tiberiu Ichim - [`a76ca88`](https://github.com/eea/volto-cca-policy/commit/a76ca886e56117d086a28531c9f629a19c6cb9d1)]
- Remove layout settings block override on restriction [kreafox - [`e0bf0f8`](https://github.com/eea/volto-cca-policy/commit/e0bf0f80d9475f53d416e79f3da053812a40b514)]
- add breadcrumbs to apiExpanders, fixes breadcrumbs in the /contents view [Tiberiu Ichim - [`10a17f2`](https://github.com/eea/volto-cca-policy/commit/10a17f270b267985dd078a9470329d1d15254813)]
- Fix clicking in overlay [Tiberiu Ichim - [`442d726`](https://github.com/eea/volto-cca-policy/commit/442d7264c738179b0411dda6f3ee9341b356d5e1)]
- Enable layout settings block [kreafox - [`e7c3741`](https://github.com/eea/volto-cca-policy/commit/e7c37419bb74e3590d3676d83f774bc6923e417e)]
- Refs #251121 - facets update [Tripon Eugen - [`80a44c7`](https://github.com/eea/volto-cca-policy/commit/80a44c7a37ce0dd04b82cfdde748aca72c642f38)]
- testing volto search [Tripon Eugen - [`0fbe836`](https://github.com/eea/volto-cca-policy/commit/0fbe836345cf0ca8d8765f8df6b8e3914bdc6d3d)]
Expand Down Expand Up @@ -489,6 +496,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
#### :hammer_and_wrench: Others

- Refs #158294 - Update supported languages list. [GhitaB - [`0a4f91f`](https://github.com/eea/volto-cca-policy/commit/0a4f91f39b7edc367bd4c127d6a8f273c7788361)]
- Add Sonarqube tag using cca-frontend addons list [EEA Jenkins - [`8f1f9ce`](https://github.com/eea/volto-cca-policy/commit/8f1f9ce6c22805670cc0800d3c779b6d619d0f31)]
### [0.1.1](https://github.com/eea/volto-cca-policy/compare/0.1.0...0.1.1) - 13 December 2022

#### :hammer_and_wrench: Others
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-cca-policy",
"version": "0.1.19",
"version": "0.1.20",
"description": "@eeacms/volto-cca-policy: Volto add-on",
"main": "src/index.js",
"author": "European Environment Agency: IDM2 A-Team",
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import GeolocationWidget from './components/theme/Widgets/GeolocationWidget';

const applyConfig = (config) => {
const notInEnMission = /^(?!(\/en\/mission)).*$/;
if (!__DEVELOPMENT__ || process.env.SET_EXTERNAL_ROUTES) {
if (!__DEVELOPMENT__ || !process.env.RAZZLE_SET_EXTERNAL_ROUTES) {
config.settings.externalRoutes = [
...(config.settings.externalRoutes || []),
{
Expand Down
166 changes: 67 additions & 99 deletions src/search/config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { mergeConfig } from '@eeacms/search';
import { build_runtime_mappings } from '@eeacms/volto-globalsearch/utils';

import facets from './facets';

Expand All @@ -17,6 +18,19 @@ const ccaConfig = {
title: 'ClimateAdapt Main',
};

export const clusters = {
name: 'op_cluster',
field: 'objectProvides',
clusters: [
// {
// name: 'Type1',
// icon: { name: 'bullhorn' },
// values: ['Video', 'Guidance'],
// defaultResultView: 'horizontalCard',
// },
],
};

export default function installMainSearch(config) {
const envConfig = process.env.RAZZLE_ENV_CONFIG
? JSON.parse(process.env.RAZZLE_ENV_CONFIG)
Expand All @@ -37,6 +51,7 @@ export default function installMainSearch(config) {
cca: 'MIP4Adapt',
},
},
runtime_mappings: build_runtime_mappings(clusters),
};

const { ccaSearch } = config.searchui;
Expand Down Expand Up @@ -81,105 +96,58 @@ export default function installMainSearch(config) {
family: 'Content types',
},
},
// {
// id: 'topics',
// title: 'Topics',
// facetField: 'topic',
// sortOn: 'alpha',
// whitelist: [
// 'Agriculture and food',
// 'Air pollution',
// 'Bathing water quality',
// 'Biodiversity',
// 'Bioeconomy',
// 'Buildings and construction',
// 'Chemicals',
// 'Circular economy',
// 'Climate change adaptation',
// 'Climate change mitigation',
// 'Electric vehicles',
// 'Energy',
// 'Energy efficiency',
// 'Environmental health impacts',
// 'Environmental inequalities',
// 'Extreme weather',
// 'Fisheries and aquaculture',
// 'Forests and forestry',
// 'Industry',
// 'Land use',
// 'Nature protection and restoration',
// 'Nature-based solutions',
// 'Noise',
// 'Plastics',
// 'Pollution',
// 'Production and consumption',
// 'Renewable energy',
// 'Resource use and materials',
// 'Road transport',
// 'Seas and coasts',
// 'Soil',
// 'Sustainability challenges',
// 'Sustainability solutions',
// 'Sustainable finance',
// 'Textiles',
// 'Transport and mobility',
// 'Urban sustainability',
// 'Waste and recycling',
// 'Water',
// ],
// },
// {
// id: 'countries',
// title: 'Countries',
// facetField: 'spatial',
// filterType: 'any:exact',
// sortOn: 'alpha',
// maxPerSection: 100,
// whitelist: [
// 'Austria',
// 'Belgium',
// 'Bulgaria',
// 'Croatia',
// 'Cyprus',
// 'Czechia',
// 'Denmark',
// 'Estonia',
// 'Finland',
// 'France',
// 'Germany',
// 'Greece',
// 'Hungary',
// 'Iceland',
// 'Ireland',
// 'Italy',
// 'Latvia',
// 'Liechtenstein',
// 'Lithuania',
// 'Luxembourg',
// 'Malta',
// 'Netherlands',
// 'Norway',
// 'Poland',
// 'Portugal',
// 'Romania',
// 'Slovakia',
// 'Slovenia',
// 'Spain',
// 'Sweden',
// 'Switzerland',
// 'Türkiye',
// 'Albania',
// 'Bosnia and Herzegovina',
// 'Kosovo',
// 'Montenegro',
// 'North Macedonia',
// 'Serbia',
// ],
// icon: {
// family: 'CountryFlags',
// className: 'facet-option-icon',
// },
// },
{
id: 'cca_geographic_countries',
title: 'Countries',
facetField: 'cca_geographic_countries.keyword',
// filterType: 'any:exact',
sortOn: 'alpha',
// maxPerSection: 100,
whitelist: [
'Austria',
'Belgium',
'Bulgaria',
'Croatia',
'Cyprus',
'Czechia',
'Denmark',
'Estonia',
'Finland',
'France',
'Germany',
'Greece',
'Hungary',
'Iceland',
'Ireland',
'Italy',
'Latvia',
'Liechtenstein',
'Lithuania',
'Luxembourg',
'Malta',
'Netherlands',
'Norway',
'Poland',
'Portugal',
'Romania',
'Slovakia',
'Slovenia',
'Spain',
'Sweden',
'Switzerland',
'Türkiye',
'Albania',
'Bosnia and Herzegovina',
'Kosovo',
'Montenegro',
'North Macedonia',
'Serbia',
],
icon: {
family: 'CountryFlags',
className: 'facet-option-icon',
},
},
// {
// id: 'language',
// title: 'Languages',
Expand Down
2 changes: 1 addition & 1 deletion src/search/facets.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ const facets = [
ignoreNLPWhenActive: true,
blacklist: ['Others', 'Publications'],
},

// {
// field: 'moreLikeThis',
// factory: 'MoreLikeThis',
Expand Down Expand Up @@ -1165,6 +1164,7 @@ const facets = [
isMulti: true,
sortOn: 'custom',
sortOnCustomLabel: 'Alphabetical',
alwaysVisible: true,
},
{
field: 'cca_geographic_transnational_region.keyword',
Expand Down

0 comments on commit 506bf2f

Please sign in to comment.