-
Notifications
You must be signed in to change notification settings - Fork 454
Edit bitstream page refactor #4102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
AAwouters
wants to merge
17
commits into
DSpace:main
Choose a base branch
from
atmire:edit-bitstream-page-refactor-9.0
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
+394
−247
Conversation
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
- 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
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-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 theedit-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
main
branch of code (unless it is a backport or is fixing an issue specific to an older branch).npm run lint
npm 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.