From 65ccb163a5d155de4649c73a4c533474ece77228 Mon Sep 17 00:00:00 2001 From: MellyGray Date: Tue, 24 Oct 2023 12:40:21 +0200 Subject: [PATCH] feat(DatasetThumbnail): add a TODO for the integration --- src/dataset/infrastructure/mappers/JSDatasetMapper.ts | 3 ++- .../dataset/dataset-citation/DatasetCitation.module.scss | 4 ++-- .../dataset/infrastructure/mappers/JSDatasetMapper.spec.ts | 6 ++++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/dataset/infrastructure/mappers/JSDatasetMapper.ts b/src/dataset/infrastructure/mappers/JSDatasetMapper.ts index 0207de851..06fb60518 100644 --- a/src/dataset/infrastructure/mappers/JSDatasetMapper.ts +++ b/src/dataset/infrastructure/mappers/JSDatasetMapper.ts @@ -29,7 +29,8 @@ export class JSDatasetMapper { jsDataset.alternativePersistentId, jsDataset.publicationDate, jsDataset.citationDate - ) + ), + undefined // TODO: get dataset thumbnail from Dataverse https://github.com/IQSS/dataverse-frontend/issues/203 ).build() } diff --git a/src/sections/dataset/dataset-citation/DatasetCitation.module.scss b/src/sections/dataset/dataset-citation/DatasetCitation.module.scss index eafde9779..4e3ecc9ea 100644 --- a/src/sections/dataset/dataset-citation/DatasetCitation.module.scss +++ b/src/sections/dataset/dataset-citation/DatasetCitation.module.scss @@ -1,10 +1,10 @@ @import "node_modules/@iqss/dataverse-design-system/src/lib/assets/styles/design-tokens/colors.module"; .container { +min-height: 150px; margin: 0.5rem 0; padding: 10px; border: 1px solid $dv-info-border-color; -min-height: 150px; } .citation { @@ -25,8 +25,8 @@ min-height: 150px; .preview-image { width: 100%; - height: auto; max-width: 140px; + height: auto; max-height: 140px; } diff --git a/tests/component/dataset/infrastructure/mappers/JSDatasetMapper.spec.ts b/tests/component/dataset/infrastructure/mappers/JSDatasetMapper.spec.ts index 60ecfe7d7..de956c1a3 100644 --- a/tests/component/dataset/infrastructure/mappers/JSDatasetMapper.spec.ts +++ b/tests/component/dataset/infrastructure/mappers/JSDatasetMapper.spec.ts @@ -45,7 +45,8 @@ const jsDataset = { name: 'CC0 1.0', uri: 'http://creativecommons.org/publicdomain/zero/1.0', iconUri: 'https://licensebuttons.net/p/zero/1.0/88x31.png' - } + }, + thumbnail: undefined } const citation = 'Finch, Fiona, 2023, "Darwin\'s Finches", https://doi.org/10.5072/FK2/B4B2MJ, Root, DRAFT VERSION' @@ -96,7 +97,8 @@ const expectedDataset = { subject: ['Medicine, Health and Life Sciences'] } } - ] + ], + thumbnail: undefined } describe('JS Dataset Mapper', () => {