Skip to content

SIMSBIOHUB-715: Collection links - Functionality for user to add external resources to their collections#1563

Draft
LouisThedroux wants to merge 67 commits into
collectionsfrom
collection-links
Draft

SIMSBIOHUB-715: Collection links - Functionality for user to add external resources to their collections#1563
LouisThedroux wants to merge 67 commits into
collectionsfrom
collection-links

Conversation

@LouisThedroux
Copy link
Copy Markdown
Contributor

@LouisThedroux LouisThedroux commented Jul 9, 2025

Links to Jira Tickets

SIMSBIOHUB-715


Description of Changes

Implements collection links management functionality, allowing users to create, view, update, and delete external resource links associated with a collections. Allowing users to have a central repo of all appropriate external links related to their collection/project in one easy accessible place.

Backend

  • Introduced a PUT API endpoint at /collection/{collectionId}/links/{linkId} to handle both updates and soft deletion of collection links (using a record_end_date for soft delete).
  • Developed CollectionLinkRepository and enhanced CollectionLinkService to support full CRUD operations, including soft delete logic.

Frontend

  • Added CollectionLinkDialog for creating and editing links, with appropriate loading states.
  • Built CollectionLinkForm using Yup for validating name, description, and URL fields.
  • Updated API hooks for collections to support link update and soft delete.

Features

  • Create, update, and soft delete (via PUT) collection links
  • Form validation with error handling
  • Loading states and user feedback
  • Authorization enforced for sensitive operations

TODO/Tech Debt

  • Add comprehensive unit tests for all components
  • Remove any seed files before merging
  • Consider multi-delete functionality for links
  • Fix rendering issues with delete operations
  • Evaluate displaying links directly on collection details page

Testing Notes

  • Test creating, updating, and soft deleting collection links via the UI.
  • Confirm validation, loading states, and user feedback are working as expected.
  • Ensure soft deletes are reflected in both UI and database (record_end_date is set).
  • Verify only authorized users can manage links where appropriate.
  • Ensure seed files are removed before merge.
  • Report any link rendering or feedback issues.

Known Issue/Consideration:
Annika is experiencing 500 response errors from this code, which cannot be reproduced in my environment. The cause is currently unknown and requires further investigation.

@LouisThedroux LouisThedroux self-assigned this Jul 9, 2025
@LouisThedroux LouisThedroux added Do Not Merge PR should not be merged Early Feedback Welcome PR is not finished, but early review feedback is welcomed labels Jul 9, 2025
Comment thread api/src/models/collection-link.ts Outdated
Comment thread api/src/models/collection-link.ts Outdated
Comment thread api/src/openapi/schemas/collection-link.ts Outdated
@LouisThedroux LouisThedroux added the Ready For Review PR is ready for review label Sep 3, 2025
Comment thread api/src/openapi/schemas/collection-link.ts Outdated
Comment thread api/src/paths/collection/{collectionId}/link/{linkId}/index.ts
Comment thread api/src/paths/collection/{collectionId}/link/{linkId}/index.ts Outdated
Comment thread api/src/paths/collection/{collectionId}/link/{linkId}/index.ts Outdated
Comment thread api/src/paths/collection/{collectionId}/link/{linkId}/index.ts Outdated
Comment thread api/src/services/collection-link-service.ts Outdated
Comment thread app/src/features/collection/details/link/CollectionLinkContainer.tsx Outdated
@sonarqubecloud
Copy link
Copy Markdown

@LouisThedroux LouisThedroux added Early Feedback Welcome PR is not finished, but early review feedback is welcomed and removed Ready For Review PR is ready for review labels Sep 16, 2025
@LouisThedroux
Copy link
Copy Markdown
Contributor Author

As of today. All comments have been addressed, sonaqube issues should be 0. the only thing that is left to do is test coverage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Do Not Merge PR should not be merged Early Feedback Welcome PR is not finished, but early review feedback is welcomed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants