Skip to content

Edit bitstream page refactor#4102

Merged
tdonohue merged 18 commits intoDSpace:mainfrom
atmire:edit-bitstream-page-refactor-9.0
Apr 28, 2026
Merged

Edit bitstream page refactor#4102
tdonohue merged 18 commits intoDSpace:mainfrom
atmire:edit-bitstream-page-refactor-9.0

Conversation

@AAwouters
Copy link
Copy Markdown
Contributor

@AAwouters AAwouters commented Mar 20, 2025

References

Description

This PR refactors the edit-bitstream-page component to make it easier to theme.

Instructions for Reviewers

This PR makes very little functional changes, almost all of it is simply an improvement to the development experience.
The only change in functionality is that the bitstream format correctly updates when immediately going back to the edit-bitstream-page once redirected from that page after changing the format.

List of changes in this PR:

  • Introduces the observablesDictionary utility type with explanation on how to use it.
    This utilty type allows the developer to structure their code better while using the type system when dealing with multiple observables.

  • Makes use of the observablesDictionary to split the large methods of the edit-bitstream-page component into smaller, easier extendable, methods.

Making use of the observablesDictionary does force the developer to think about names for the additional methods and interfaces, but I consider this to be a positive.

Checklist

  • My PR is created against the main branch of code (unless it is a backport or is fixing an issue specific to an older branch).
  • My PR is small in size (e.g. less than 1,000 lines of code, not including comments & specs/tests), or I have provided reasons as to why that's not possible.
  • My PR passes ESLint validation using npm run lint
  • My PR doesn't introduce circular dependencies (verified via npm run check-circ-deps)
  • My PR includes TypeDoc comments for all new (or modified) public methods and classes. It also includes TypeDoc for large or complex private methods.
  • My PR passes all specs/tests and includes new/updated specs or tests based on the Code Testing Guide.
  • My PR aligns with Accessibility guidelines if it makes changes to the user interface.
  • My PR uses i18n (internationalization) keys instead of hardcoded English text, to allow for translations.
  • My PR includes details on how to test it. I've provided clear instructions to reviewers on how to successfully test this fix or feature.
  • If my PR includes new libraries/dependencies (in package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.
  • If my PR includes new features or configurations, I've provided basic technical documentation in the PR itself.
  • If my PR fixes an issue ticket, I've linked them together.

AAwouters added 17 commits June 12, 2024 11:44
 - Introduced 'setFields' method
 - Applied more consistency in using fields vs parameters in methods
 - Split up methods related to iiif
Splitting the creation of the form into multiple methods that do one
specific thing (e.g. updating the form model, creating the form group,
prefilling data in the form, ...) allows for easier theming of the form
itself.
Without this fix the form showed old data when immediately going back
to the edit page after changing the primary bitstream or format.
Moved the creation of the update observables to their own methods and
unified the handling of their results in a single subscription
…age-refactor-9.0

# Conflicts:
#	src/app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component.html
#	src/app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component.spec.ts
#	src/app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component.ts
@github-actions
Copy link
Copy Markdown

Hi @AAwouters,
Conflicts have been detected against the base branch.
Please resolve these conflicts as soon as you can. Thanks!

@alexandrevryghem alexandrevryghem added this to the 10.0 milestone Jan 23, 2026
@tdonohue tdonohue moved this to 🙋 Needs Reviewers Assigned in DSpace 10.0 Release Jan 26, 2026
@alexandrevryghem alexandrevryghem marked this pull request as ready for review January 29, 2026 13:24
@alexandrevryghem alexandrevryghem added the port to dspace-9_x This PR needs to be ported to `dspace-9_x` branch for next bug-fix release label Jan 29, 2026
atarix83 pushed a commit to 4Science/dspace-angular that referenced this pull request Feb 20, 2026
…pace#4102)

Task/prod/uon  repo/CST-24717 from20240204

Approved-by: Giulia Barucca
@alegontarz
Copy link
Copy Markdown

QA testing performed (no code review).

Works as expected:

  1. No functional regressions observed in the edit-bitstream-page.
  2. Bitstream format updates correctly when returning immediately to the edit page after changing the format.

@alegontarz alegontarz moved this from 🙋 Needs Reviewers Assigned to 👀 Under Review in DSpace 10.0 Release Feb 27, 2026
@tdonohue tdonohue moved this from 👀 Under Review to 👍 Reviewer Approved in DSpace 10.0 Release Feb 27, 2026
Copy link
Copy Markdown
Member

@tdonohue tdonohue left a comment

Choose a reason for hiding this comment

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

👍 Thanks @AAwouters ! I finally got to testing & reviewing this today. I could find no differences in behavior. The code looks good to me as well.

@tdonohue tdonohue merged commit d3a5aa8 into DSpace:main Apr 28, 2026
19 of 25 checks passed
@github-project-automation github-project-automation Bot moved this from 👍 Reviewer Approved to ✅ Done in DSpace 10.0 Release Apr 28, 2026
@dspace-bot
Copy link
Copy Markdown
Contributor

Backport failed for dspace-9_x, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin dspace-9_x
git worktree add -d .worktree/backport-4102-to-dspace-9_x origin/dspace-9_x
cd .worktree/backport-4102-to-dspace-9_x
git switch --create backport-4102-to-dspace-9_x
git cherry-pick -x f413328a1cd4a5f829807268195b17b1e33ab87c ff0c1283457eaa00f80d9f2b39eff00c842cbba6 9c1624a70fceea199a831f8377eb3f022255b1bf 4fa2017aef363c01ab4602c92abd4ebd6e2bee61 893c666d9312b25e31720dae496eca3d042ff2b4 16c75dbd3a99a6741ee9fed00446e203e6ec1323 e83ad087c858bac6c4fbc1d3ece241bcea4706af 66823ced4e918ea119ffd6d37a05b525ae1d34db 23a29bac7bab9004a302e91b0752ae670b9fca54 1c93e4f3ee4c9fb17cb984cbf736a38a19e5a061 6195b8d4cd6f8ec8f05744734cbda1b2d576f950 ff2fbf119443cca527f2494fe6723043ee4ada86 28fe5ae3a6f121c901b86ac5b170c60025d22a6e f0782e8e9340fc3696669135c6f18cf8bbbcbc54 ce3e2c74440407fe9409491e0f26e5ef387f1109 6002f76ec6bdf9991b245ff6f111bc3925ae29e6

@tdonohue
Copy link
Copy Markdown
Member

@AAwouters : This failed to be backported to 9.x. If you feel this should be backported, please create a separate PR against dspace-9_x. Otherwise, I'm also OK with just making this specific to 10.0

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

Labels

improvement port to dspace-9_x This PR needs to be ported to `dspace-9_x` branch for next bug-fix release

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

Edit-bitstream-page component is difficult to theme

6 participants