Skip to content

Commit

Permalink
Merge pull request #65 from eea/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
tiberiuichim authored Feb 9, 2023
2 parents 66c809d + b697236 commit 7aef5c0
Show file tree
Hide file tree
Showing 9 changed files with 49 additions and 14 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ 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.4.21](https://github.com/eea/volto-searchlib/compare/0.4.20...0.4.21) - 9 February 2023

#### :hammer_and_wrench: Others

- Fix results bottom section position [kreafox - [`ac5cd55`](https://github.com/eea/volto-searchlib/commit/ac5cd55554588831921fda6bf4a58f3f50a72bca)]
- CSS polishments [kreafox - [`c5784f1`](https://github.com/eea/volto-searchlib/commit/c5784f124a73a320cfedd6d3759d81ad28e1c7ff)]
- if date is missing, don't fallback to current date [Zoltan Szabo - [`fbf3d5a`](https://github.com/eea/volto-searchlib/commit/fbf3d5a8f3b92f2902e127a0fedd432a16c7d801)]
- if the range is empty, don't add it to the query [Zoltan Szabo - [`1bc2c7d`](https://github.com/eea/volto-searchlib/commit/1bc2c7d15a4bd5d0f46fd19c3c6ed2114fef19b4)]
- updated search results tags [Zoltan Szabo - [`e0d1704`](https://github.com/eea/volto-searchlib/commit/e0d1704ac1b5263a11b4fcbf1cb1b74ddaf4ed22)]
### [0.4.20](https://github.com/eea/volto-searchlib/compare/0.4.19...0.4.20) - 7 February 2023

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

- Prettier [kreafox - [`fe76714`](https://github.com/eea/volto-searchlib/commit/fe76714b187a97010003b9b3203ad4d20c5b794c)]
- Prettier [kreafox - [`b639666`](https://github.com/eea/volto-searchlib/commit/b639666c564298b8a8469588e2e39572dba2bced)]
- Use volto version before yarn 3 [kreafox - [`b6e1e72`](https://github.com/eea/volto-searchlib/commit/b6e1e72a2e2cd8cc5597c1be5c7fd00a404b622f)]
- Make search input placeholder configurable [kreafox - [`18f3f53`](https://github.com/eea/volto-searchlib/commit/18f3f533af4c3f3d95264d8c54a9945d6b869055)]
- Remove dependency [kreafox - [`8f2b0d0`](https://github.com/eea/volto-searchlib/commit/8f2b0d03829f4cd9f2717f1308357c197b60fc53)]
- Fix project eslintrc [kreafox - [`76e3a6e`](https://github.com/eea/volto-searchlib/commit/76e3a6e4000f9aa3db208d057227c0ceea7ad38d)]
Expand All @@ -204,6 +214,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- Fix project eslintrc [kreafox - [`c182a4c`](https://github.com/eea/volto-searchlib/commit/c182a4c89752ca1f767d25e926ec07d7bb036530)]
- Hide more like this from cards view [kreafox - [`3e2d8f7`](https://github.com/eea/volto-searchlib/commit/3e2d8f73776cb49bf9d0a51271ca15a0cac803e6)]
- Cleanup CSS [kreafox - [`42cfa19`](https://github.com/eea/volto-searchlib/commit/42cfa193769c33d1a84a66fd97a18409b221b674)]
- Add Sonarqube tag using circularity-frontend addons list [EEA Jenkins - [`2c105dc`](https://github.com/eea/volto-searchlib/commit/2c105dc7b8ca3767e218e72ddd52ae5df8bb20c7)]
### [0.4.1](https://github.com/eea/volto-searchlib/compare/0.4.0...0.4.1) - 10 November 2022

#### :hammer_and_wrench: Others
Expand Down Expand Up @@ -233,11 +244,13 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- Add missing less variable [kreafox - [`3329f84`](https://github.com/eea/volto-searchlib/commit/3329f84f2478a194702ba1a6c6934afe2cf598b2)]
- Style update [kreafox - [`8f24f0f`](https://github.com/eea/volto-searchlib/commit/8f24f0f597c9414ed346abe99e5257c1967e1c3a)]
- Change search box color on datahub [kreafox - [`8851e42`](https://github.com/eea/volto-searchlib/commit/8851e4239b4d3e8405c2cb270c2b86ec5e651c8f)]
- Add Sonarqube tag using marine-frontend addons list [EEA Jenkins - [`a42552c`](https://github.com/eea/volto-searchlib/commit/a42552cfb253523ae8962041497b328694bb4465)]
- Fix landing page cards override [kreafox - [`9504e20`](https://github.com/eea/volto-searchlib/commit/9504e2073cc3501466be2b0c5c67d9f1b6526d99)]
### [0.3.16](https://github.com/eea/volto-searchlib/compare/0.3.15...0.3.16) - 27 September 2022

#### :hammer_and_wrench: Others

- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`c6f41f2`](https://github.com/eea/volto-searchlib/commit/c6f41f2aac8ebb42ffc4cbed636c91371a8ab177)]
### [0.3.15](https://github.com/eea/volto-searchlib/compare/0.3.14...0.3.15) - 21 September 2022

#### :hammer_and_wrench: Others
Expand Down Expand Up @@ -343,6 +356,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- App info CSS & hide footer elements [kreafox - [`fe9172e`](https://github.com/eea/volto-searchlib/commit/fe9172ee2e4f5feadc4e97686ae16d598017e60e)]
- AnswersBox styling & cleanup [kreafox - [`7092994`](https://github.com/eea/volto-searchlib/commit/709299447a6a2aa14d3f93857651898853bd3503)]
- AnswersBox styling [kreafox - [`dfda196`](https://github.com/eea/volto-searchlib/commit/dfda1962d5b4856ed9d41294eabfa636d887ab72)]
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`8e8a206`](https://github.com/eea/volto-searchlib/commit/8e8a206746877118b9f2336b11dfdfadd9d1e408)]
### [0.3.4](https://github.com/eea/volto-searchlib/compare/0.3.3...0.3.4) - 13 June 2022

#### :hammer_and_wrench: Others
Expand Down Expand Up @@ -879,6 +893,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- Refs #140559 - Styles for search header. [GhitaB - [`4ec2040`](https://github.com/eea/volto-searchlib/commit/4ec204052740b441992f679ff895864f2a4df0e2)]
- Refs #140559 - Improve facet filters boxes. [GhitaB - [`16aa4ea`](https://github.com/eea/volto-searchlib/commit/16aa4ea83a24ba461e6de4c291a869c532508690)]
- Refs #140559 - Show the selected filters values to the facet label box. [GhitaB - [`f66ebd2`](https://github.com/eea/volto-searchlib/commit/f66ebd20a7b6e5b2ef21a99e175020a3a9e7b2ca)]
- Add Sonarqube tag using clms-frontend addons list [EEA Jenkins - [`528b9d6`](https://github.com/eea/volto-searchlib/commit/528b9d647bd4cdab527dfd93b9f85512b1d48c23)]
- Refs #140559 - Styles for source. [GhitaB - [`63f7d70`](https://github.com/eea/volto-searchlib/commit/63f7d70f60a88c77fbfce737a659accd87f86c60)]
- Refs #140559 - White filters bar. [GhitaB - [`90a96f6`](https://github.com/eea/volto-searchlib/commit/90a96f64edf9c2b90859f3a2044cba813964ffa8)]
- Refs #140559 - White filters bar. [GhitaB - [`ad4fd48`](https://github.com/eea/volto-searchlib/commit/ad4fd48c4a24345a7e658699917258117d6c6fb6)]
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-searchlib",
"version": "0.4.20",
"version": "0.4.21",
"description": "@eeacms/volto-searchlib: Volto add-on",
"main": "src/index.js",
"author": "European Environment Agency: IDM2 A-Team",
Expand Down
3 changes: 3 additions & 0 deletions searchlib/components/DateTime/DateTime.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import { DateTime } from 'luxon';
const FormatDateTime = (props) => {
const { value, format = 'DATE_SHORT' } = props;

if (value === null){
return null;
}
const dt = value
? value.isLuxonDateTime
? value
Expand Down
2 changes: 1 addition & 1 deletion searchlib/components/Result/ContentClusters.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ const ContentClusters = ({ clusters, item }) => {
</span> */}
<div className="tags">
<StringList value={clusterName} />
{index < Object.keys(displayClusters).length - 1 ? ', ' : ''}
{clusterName !== cluster.content_types?.[0] && (
<>
<Icon name="angle right" />
Expand All @@ -32,6 +31,7 @@ const ContentClusters = ({ clusters, item }) => {
/>
</>
)}
{index < Object.keys(displayClusters).length - 1 ? ', ' : ''}
{format.includes('application/pdf') ? (
<span className="pdf-icon">PDF</span>
) : (
Expand Down
2 changes: 1 addition & 1 deletion searchlib/components/Result/HorizontalCardItem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const ExtraContent = (props) => {
</div>
</div>
<div>
<div className="result-info">
<div className="result-info result-source">
<span className="result-info-title">Source: </span>
<ExternalLink href={result.href}>
<strong title={result.source} className="source">
Expand Down
2 changes: 1 addition & 1 deletion searchlib/lib/models.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export class ResultModel extends BasicModel {

get issued() {
const raw = this._result['issued']?.raw;
return raw ? DateTime.fromISO(raw) : DateTime.local();
return raw ? DateTime.fromISO(raw) : null;
}

get expires() {
Expand Down
4 changes: 4 additions & 0 deletions searchlib/lib/search/query/filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,10 @@ export function getDateRangeFilter(filter, filterConfig) {
},
};

if (res.bool[op][0].range[filter.field].to === undefined){
return;
}

return res;
}

Expand Down
8 changes: 7 additions & 1 deletion src/SearchBlock/less/landingpage.less
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,18 @@
}

@media only screen and (min-width: 900px) {
// max-width: 950px;
column-count: 2;
column-gap: 2.5em;
}
}

&.cluster_name {
.ui.list .count {
display: block;
margin: 0;
}
}

// .ui.cards {
// .ui.card {
// margin-top: 2em;
Expand Down
25 changes: 16 additions & 9 deletions src/SearchBlock/less/searchresult.less
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,27 @@
.slot-head {
display: flex;
flex-direction: row;
}

.listing-header {
display: flex;
.listing-header {
display: flex;

.ui.label {
margin: 0 0.5em;
font-size: 0.75rem;
.ui.label {
margin: 0 0.5em;
font-size: 0.75rem;
}
}
}

.slot-bottom {
margin-top: auto;
}

.result-bottom {
display: flex;
flex-direction: row;
flex-wrap: wrap;
margin-top: 1.5em;
gap: 4em;
column-gap: 4em;
row-gap: 1em;

@media only screen and (max-width: @largestMobileScreen) {
flex-direction: column;
Expand All @@ -46,9 +50,12 @@
}
}

.result-source {
margin-top: 1em;
}

.result-info {
display: flex;
margin-bottom: 1em;
color: @midlightGray;
font-size: 14px;
gap: 0.5em;
Expand Down

0 comments on commit 7aef5c0

Please sign in to comment.