Skip to content

Avoid prop-drilling for collection repository#940

Merged
rtreacy merged 7 commits intodevelopfrom
UseCollectionRepository
Apr 6, 2026
Merged

Avoid prop-drilling for collection repository#940
rtreacy merged 7 commits intodevelopfrom
UseCollectionRepository

Conversation

@ChengShi-1
Copy link
Copy Markdown
Contributor

@ChengShi-1 ChengShi-1 commented Mar 26, 2026

What this PR does / why we need it:

  • the goal of the branch is to centralize repository injection at the React boundary and remove UI prop-drilling, not to eliminate explicit repository dependencies from domain/use-case code
  • moduleResolution: "bundler" is intentional and aligns TypeScript with the Vite build; if it surfaces more deep imports, those imports should be treated as bugs rather than reverted
  • the branch is mechanically broad because the provider change touches factories, pages, stories, and tests together

Which issue(s) this PR closes:

Special notes for your reviewer:

  • "moduleResolution": "node" is deprecated Error: tsconfig.json(14,25): error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
    Official doc of ts: https://www.typescriptlang.org/tsconfig/#moduleResolution

Why bundler exposed that AlertVariant import:

  • bundler respects package public exports. @iqss/dataverse-design-system only exports its root API.
  • Deep-importing dist/components/... was relying on package internals, so bundler rejected it.

Suggestions on how to test this:

There is no ui change or functional change could be tested

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

No

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

Yes

Additional documentation:

@coveralls
Copy link
Copy Markdown

coveralls commented Mar 26, 2026

Coverage Status

coverage: 97.282% (-0.8%) from 98.063%
when pulling 3e0def0 on UseCollectionRepository
into 30d96a0 on develop.

@ChengShi-1 ChengShi-1 added Size: 3 A percentage of a sprint. 2.1 hours. GREI Re-arch GREI re-architecture-related FY26 Sprint 20 FY26 Sprint 20 (2026-03-26 - 2026-04-08) SPA.Q1.2026.10 labels Mar 27, 2026
@ChengShi-1 ChengShi-1 marked this pull request as ready for review March 27, 2026 17:50
@ChengShi-1 ChengShi-1 moved this to Ready for Review ⏩ in IQSS Dataverse Project Mar 27, 2026
@rtreacy rtreacy self-requested a review March 31, 2026 14:42
@rtreacy
Copy link
Copy Markdown
Contributor

rtreacy commented Mar 31, 2026

Removes prop drilling, standardizes repository access, and simplifies tests/stories. Only issue is reduces test coverage slightly to 94.92% which brings it below global threshold

@rtreacy rtreacy moved this from Ready for Review ⏩ to In Review 🔎 in IQSS Dataverse Project Mar 31, 2026
Copy link
Copy Markdown
Contributor

@rtreacy rtreacy left a comment

Choose a reason for hiding this comment

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

Uses RepositoryProvider to manage CollectionRepsoitory. Reduces prop-drilling across many components, simplifies component signatures, Improves maintainability. Test coverage over 97%

@github-project-automation github-project-automation Bot moved this from In Review 🔎 to Ready for QA ⏩ in IQSS Dataverse Project Apr 6, 2026
@rtreacy rtreacy merged commit c596859 into develop Apr 6, 2026
9 of 15 checks passed
@github-project-automation github-project-automation Bot moved this from Ready for QA ⏩ to Merged 🚀 in IQSS Dataverse Project Apr 6, 2026
@scolapasta scolapasta moved this from Merged 🚀 to Done 🧹 in IQSS Dataverse Project Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FY26 Sprint 20 FY26 Sprint 20 (2026-03-26 - 2026-04-08) GREI Re-arch GREI re-architecture-related Size: 3 A percentage of a sprint. 2.1 hours. SPA.Q1.2026.10

Projects

Status: Done 🧹

Development

Successfully merging this pull request may close these issues.

Avoid Prop-drilling for CollectionRepository

4 participants