Skip to content

Commit efee462

Browse files
committed
Add some more facets
1 parent 8844b4b commit efee462

File tree

4 files changed

+32
-2
lines changed

4 files changed

+32
-2
lines changed

src/components/result/GenericResultView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ export function GenericResultView({
364364
<a href={`https://hdl.handle.net/${pid}`} target="_blank" className="rfs-mb-2 rfs-block rfs-leading-3 hover:rfs-underline">
365365
<span className="rfs-text-sm rfs-text-muted-foreground">{pid}</span>
366366
</a>
367-
<div className="rfs-flex rfs-flex-wrap rfs-gap-2">
367+
<div className="rfs-flex rfs-flex-wrap rfs-gap-2 rfs-truncate">
368368
{tags && tags.map((tag) => <GenericResultViewTag key={tag.field} result={result} {...tag} />)}
369369
</div>
370370
<div className="rfs-grow">{description}</div>

src/components/result/GenericResultViewTag.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export function GenericResultViewTag({ field, result, icon, label, valueMapper }
3535

3636
return (
3737
<Tooltip delayDuration={500}>
38-
<TooltipTrigger>{base}</TooltipTrigger>
38+
<TooltipTrigger asChild>{base}</TooltipTrigger>
3939
<TooltipContent>{label}</TooltipContent>
4040
</Tooltip>
4141
)

src/config/FairDOConfigBuilder.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,27 @@ export class FairDOConfigBuilder {
187187
name: "2 years ago"
188188
},
189189
{
190+
from: moment().subtract(4, "years").format("yyyy"),
190191
to: moment().subtract(3, "years").format("yyyy"),
192+
name: "3 years ago"
193+
},
194+
{
195+
from: moment().subtract(5, "years").format("yyyy"),
196+
to: moment().subtract(4, "years").format("yyyy"),
197+
name: "4 years ago"
198+
},
199+
{
200+
from: moment().subtract(6, "years").format("yyyy"),
201+
to: moment().subtract(5, "years").format("yyyy"),
202+
name: "5 years ago"
203+
},
204+
{
205+
from: moment().subtract(10, "years").format("yyyy"),
206+
to: moment().subtract(6, "years").format("yyyy"),
207+
name: "10 years ago"
208+
},
209+
{
210+
to: moment().subtract(11, "years").format("yyyy"),
191211
name: "Older"
192212
}
193213
]

src/stories/FairDOElasticSearch.stories.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,16 @@ const demoConfig: FairDOConfig = {
4747
key: "Acquisition_Nucleus.keyword",
4848
label: "Acquisition Nucleus"
4949
},
50+
{
51+
key: "dateCreatedRfc3339",
52+
label: "Created",
53+
type: "date_year"
54+
},
55+
{
56+
key: "dateModified",
57+
label: "Last modified",
58+
type: "date_year"
59+
},
5060
{
5161
key: "licenseURL.keyword",
5262
label: "License",

0 commit comments

Comments
 (0)