Skip to content

Made digital specimen cards more specific and according to their UI#258

Draft
MelanieTheLion wants to merge 3 commits into
mainfrom
feature/ds-cards
Draft

Made digital specimen cards more specific and according to their UI#258
MelanieTheLion wants to merge 3 commits into
mainfrom
feature/ds-cards

Conversation

@MelanieTheLion

@MelanieTheLion MelanieTheLion commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

In this PR:
The DigitalSpecimenCard was first a reusable component for all 5 dataCards. But I ran into issues that made the reusable component become way too complicated. So I decided to separate concerns and create separate components for each data card. More code and more components, but easier to maintain in the long run.

UI still needs tweaks, but I have outstanding questions I have to solve first.

This page is not officially live yet. Because it is so big, we are working in iterations.

UX Design

Not in this pr:

  • Image functionality
  • A11y test
  • Testing

What it looks like now:
image

@sonarqubecloud

sonarqubecloud Bot commented Jul 2, 2026

Copy link
Copy Markdown

❌ The last analysis has failed.

See analysis details on SonarQube Cloud

@sonarqubecloud

sonarqubecloud Bot commented Jul 2, 2026

Copy link
Copy Markdown

@MelanieTheLion MelanieTheLion marked this pull request as ready for review July 2, 2026 07:07
Comment thread src/components/Cards/Cards.scss
Comment thread src/components/Cards/Cards.scss
Comment thread src/components/Cards/Cards.scss
import { CopyIcon } from '@radix-ui/react-icons';

interface Props {
fragment: any;

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No any pls

fragment: any;
}

export const CitationLicenseCard = ({ fragment }: Props ) => {

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment

fragment: any;
}

export const CitationLicenseCard = ({ fragment }: Props ) => {

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, this one is not done yet

<CopyIcon />
</Button>
</div>
<div className="ds-card-citation">

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose between ds and digital-specimen as class names

<p>{craftCitation(fragment)}</p>
</div>
<div className="digital-specimen-card-content">
<LabelValuePair item={fragment['license']}></LabelValuePair>

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

License needs to be url


.taxonomic-status {
a {
margin-inline-end: 8px;

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

variable pls

hidden: boolean;
}
},
extraItem?: {

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the way to go here?

<span className="property-label verbatim">{item.label}</span>
: <span className="property-label">{item.label}</span>
}
<span className={"property-label " + (item.type === 'verbatim' ? "verbatim" : "")}>{item.label}</span>

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be differently formatted

},
virtualCollection: {
label: 'In Virtual Collection(s)',
resolve: (_) => 'Unknown'

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check with Martijn what to do here

@MelanieTheLion MelanieTheLion marked this pull request as draft July 2, 2026 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant