Edit bitstream page refactor#4102
Merged
tdonohue merged 18 commits intoDSpace:mainfrom Apr 28, 2026
Merged
Conversation
- 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
This was referenced Mar 20, 2025
|
Hi @AAwouters, |
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
|
QA testing performed (no code review). Works as expected:
|
12 tasks
tdonohue
approved these changes
Apr 28, 2026
Member
tdonohue
left a comment
There was a problem hiding this comment.
👍 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.
Contributor
|
Backport failed for 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 |
Member
|
@AAwouters : This failed to be backported to 9.x. If you feel this should be backported, please create a separate PR against |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
References
Description
This PR refactors the
edit-bitstream-pagecomponent 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-pageonce 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
observablesDictionaryto split the large methods of theedit-bitstream-pagecomponent into smaller, easier extendable, methods.Making use of the
observablesDictionarydoes force the developer to think about names for the additional methods and interfaces, but I consider this to be a positive.Checklist
mainbranch of code (unless it is a backport or is fixing an issue specific to an older branch).npm run lintnpm run check-circ-deps)package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.