Refactor license contract page and improve collection display#115
Merged
kosarko merged 2 commits intocontract_pagefrom Mar 19, 2026
Merged
Refactor license contract page and improve collection display#115kosarko merged 2 commits intocontract_pagefrom
kosarko merged 2 commits intocontract_pagefrom
Conversation
…n mode Co-authored-by: kosarko <1842385+kosarko@users.noreply.github.com>
Author
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Copilot
AI
changed the title
[WIP] Refactor license contract page and improve collection display
Refactor license contract page and improve collection display
Mar 19, 2026
kosarko
added a commit
that referenced
this pull request
Mar 20, 2026
…larin-dspace#114) * Display contract even if no collectionId given lists all authorized collections and their licenses * Proper cleanup replaced the nested manual subscriptions in license-contract-page.component.ts with a single RxJS pipeline using tap(...), switchMap(...), and takeUntil(this.destroy$), then completed cleanup in ngOnDestroy(). * fix non unique ids Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Guard license stream with EMPTY and stricter check Guard license stream with EMPTY and stricter check * Refactor license contract page and improve collection display (#115) * Initial plan * Add error/loading handling for bogus collectionId in single-collection mode Co-authored-by: kosarko <1842385+kosarko@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: kosarko <1842385+kosarko@users.noreply.github.com> --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: amadulhaxxani <hassan@ufal.mff.cuni.cz> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: kosarko <1842385+kosarko@users.noreply.github.com>
port-pr bot
pushed a commit
that referenced
this pull request
Mar 20, 2026
…larin-dspace#114) * Display contract even if no collectionId given lists all authorized collections and their licenses * Proper cleanup replaced the nested manual subscriptions in license-contract-page.component.ts with a single RxJS pipeline using tap(...), switchMap(...), and takeUntil(this.destroy$), then completed cleanup in ngOnDestroy(). * fix non unique ids Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Guard license stream with EMPTY and stricter check Guard license stream with EMPTY and stricter check * Refactor license contract page and improve collection display (#115) * Initial plan * Add error/loading handling for bogus collectionId in single-collection mode Co-authored-by: kosarko <1842385+kosarko@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: kosarko <1842385+kosarko@users.noreply.github.com> --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: amadulhaxxani <hassan@ufal.mff.cuni.cz> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: kosarko <1842385+kosarko@users.noreply.github.com> (cherry picked from commit 0ca1429)
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.
LicenseContractPageComponentsupports two modes: single-collection (whencollectionIdquery param is present) and list mode (paginated authorized collections whencollectionIdis absent). Previously, an invalidcollectionIdsilently rendered nothing.Problem description
collectionIdproduced a blank UI with no feedback.Analysis
Single-collection error handling: The
tapfeedingcollectionRD$was placed after thefilterthat gates on payload presence, so failed/loadingRemoteDatastates never reached the template. Movingtapbeforefilterpropagates all states; thefiltercontinues to guard the licenseswitchMap.List mode: Uses
PaginationService.getFindListOptions+CollectionDataService.getAuthorizedCollectionto produce a paginatedcollectionsRD$observable. Pagination state is cleared on destroy.Template changes (single-collection mode):
Test isolation fix:
findByIdspy return value is reset to success inbeforeEachto prevent cross-test contamination from Jasmine's randomized test ordering. A new test covers the boguscollectionIdpath usingcreateFailedRemoteDataObject$.Sync verification
If en.json5 or cs.json5 translation files were updated:
yarn run sync-i18n -t src/assets/i18n/cs.json5 -ito synchronize messages, and changes are included in this PR.Manual Testing (if applicable)
Copilot review
💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.