Skip to content

Conversation

g-saracca
Copy link
Contributor

@g-saracca g-saracca commented Sep 19, 2025

What this PR does / why we need it:

  • Adds link collection functionality.
  • Adds link and unlink dataset functionality.
  • Prepares CollectionCard and DatasetCard components to show link icon if linked, we still need to extend the search api to return that boolean.

Which issue(s) this PR closes:

Special notes for your reviewer:

The search is debounced by 400ms to avoid searching everytime the input changes.

Suggestions on how to test this:

Step 1: Run the Development Environment

  1. Execute npm i.
  2. Navigate with cd packages/design-system && npm i && npm run build.
  3. Return with cd ../../.
  4. Ensure you have a .env file similar to .env.example
  5. Navigate with cd dev-env.
  6. If related backend PR is merged, start the environment using ./run-env.sh unstable otherwise start it with ./run-env.sh 11710-find-dataverses-for-linking.
  7. To verify the environment, visit http://localhost:8000/ and check your local Dataverse installation.

Step 2:

  1. Create a few collections under the root collection.
  2. Test the Link Collections functionality. Only Super Users can link collections and the link collection button shouldn't be displayed at the root collection.
  3. Create a few datasets under the root collection.
  4. Test the Link and Unlink Datasets functionality.

Does this PR introduce a user interface change? If mockups are available, please link/include them here: Yes.

Link Collection

Link Collection

No collections to link
No collections to link

Only One Collection To Link this Collection to
Only One Collection To Link  this Collection to

Link & Unlink Dataset

Link Dataset Link Dataset 2

Only One Collection To Link this Dataset to
Only One Collection To Link this Dataset to

Unlink Dataset Unlink Dataset 2

Only One Collection to unlink this dataset from
Only One Collection to unlink this dataset from

Is there a release notes update needed for this change?:

Additional documentation:

@github-actions github-actions bot added the FY26 Sprint 1 FY26 Sprint 1 (2025-07-02 - 2025-07-16) label Sep 19, 2025
@g-saracca g-saracca changed the title Feat/361 link collection and link dataset Link Collection & Link Dataset Sep 22, 2025
@g-saracca g-saracca marked this pull request as ready for review September 22, 2025 18:26
@g-saracca g-saracca moved this to Ready for Review ⏩ in IQSS Dataverse Project Sep 22, 2025
@g-saracca g-saracca added Size: 3 A percentage of a sprint. 2.1 hours. Original size: 3 labels Sep 22, 2025
@cmbz cmbz added the FY26 Sprint 7 FY26 Sprint 7 (2025-09-24 - 2025-10-08) label Sep 24, 2025
@ChengShi-1 ChengShi-1 self-assigned this Sep 27, 2025
@ChengShi-1 ChengShi-1 moved this from Ready for Review ⏩ to In Review 🔎 in IQSS Dataverse Project Sep 29, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements link collection and link/unlink dataset functionality, allowing users to create links between collections and datasets. The changes include new modal interfaces, API integration, and visual indicators for linked items.

Key Changes:

  • Add link collection functionality with dropdown UI and modal interface
  • Add link and unlink dataset functionality with button components and modals
  • Add visual indicators (link icons) to collection and dataset cards when items are linked

Reviewed Changes

Copilot reviewed 59 out of 60 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/sections/collection/link-collection-dropdown/ New dropdown component and modal for linking collections
src/sections/dataset/dataset-action-buttons/link-and-unlink-actions/ New buttons and modals for linking/unlinking datasets
src/sections/collection/collection-items-panel/items-list/ Updated card headers to show link icons
tests/component/ Comprehensive test coverage for new components
src/stories/ Storybook stories for new components

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Contributor

@ChengShi-1 ChengShi-1 left a comment

Choose a reason for hiding this comment

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

Great job! I left some comments here for some UI tweaks

)
}

if (noCollections) {
Copy link
Contributor

Choose a reason for hiding this comment

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

if there is no collection to link or unlink, we could hide the save button.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's already covered since if there is no collection selected the save button remains disabled.

</p>
)}

{errorLinkingDataset && <small className="text-danger">{errorLinkingDataset}</small>}
Copy link
Contributor

Choose a reason for hiding this comment

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

We could us this for errors? we usually used this alert elsewhere

  if (errorLinkingDataset) {
    return (
      <Alert variant="danger" dismissible={false}>
        {errorLinkingDataset}
      </Alert>
    )
  }

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeeh but in this case I think I prefer an inline small text showing the error than the error alert and keeping things rendered.

@g-saracca g-saracca self-assigned this Oct 3, 2025
@cmbz cmbz added the FY26 Sprint 8 FY26 Sprint 8 (2025-10-08 - 2025-10-22) label Oct 8, 2025
@g-saracca
Copy link
Contributor Author

@ChengShi-1 I've applied some of the changes. Ready for review again, thanks 🙏🏼

@g-saracca g-saracca removed their assignment Oct 15, 2025
@g-saracca g-saracca removed the Waiting label Oct 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FY26 Sprint 1 FY26 Sprint 1 (2025-07-02 - 2025-07-16) FY26 Sprint 2 FY26 Sprint 2 (2025-07-16 - 2025-07-30) FY26 Sprint 3 (2025-07-30 - 2025-08-13) FY26 Sprint 4 FY26 Sprint 4 (2025-08-13 - 2025-08-27) FY26 Sprint 5 FY26 Sprint 5 (2025-08-27 - 2025-09-10) FY26 Sprint 6 FY26 Sprint 6 (2025-09-10 - 2025-09-24) FY26 Sprint 7 FY26 Sprint 7 (2025-09-24 - 2025-10-08) FY26 Sprint 8 FY26 Sprint 8 (2025-10-08 - 2025-10-22) GREI Re-arch GREI re-architecture-related Original size: 3 Size: 3 A percentage of a sprint. 2.1 hours. SPA.Q3.2025.2 Link Collection SPA.Q3.2025.4 Link Dataset

Projects

Status: In Review 🔎

Development

Successfully merging this pull request may close these issues.

Link Collection & Link Dataset

5 participants