Skip to content
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

UIIN-2453:Instance 3rd pane: Adjust behavior when returning to instance from holdings/item full screen #2305

Merged
merged 5 commits into from
Oct 17, 2023

Conversation

mariia-aloshyna
Copy link
Contributor

@mariia-aloshyna mariia-aloshyna commented Oct 13, 2023

Purpose

In a consortium environment, Instance records may contain holdings from multiple institutions and users from one library may need to evaluate materials that are held by different institutions. Users affiliated with various member libraries should be able to view, create, and edit holdings for other member libraries, depending on their permissions for that affiliation, and then return to the Instance view that they started from.

Approach

  • Use sessionStorage to store state of holdings accordions for a particular instance so a user could get back to the view he started from when navigated away from instance details view
  • Create a custom hook to set and get holdings accordions state to the sessionStorage
  • When the instance id changes - reset the consortial holdings accordion state

Refs

https://issues.folio.org/browse/UIIN-2453

Screenshots

uiin-2453.mov

@github-actions
Copy link

github-actions bot commented Oct 13, 2023

Jest Unit Test Statistics

    1 files  ±0  226 suites  +1   11m 25s ⏱️ +3s
866 tests +2  864 ✔️ +2  2 💤 ±0  0 ±0 
871 runs  +2  869 ✔️ +2  2 💤 ±0  0 ±0 

Results for commit 9cb3f07. ± Comparison against base commit b308124.

♻️ This comment has been updated with latest results.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

84.2% 84.2% Coverage
0.0% 0.0% Duplication

@@ -900,6 +900,7 @@ class ViewInstance extends React.Component {
},
];
const isInstanceLoading = this.state.isLoading || !instance || isCentralTenantPermissionsLoading;
const keyInStorageToHoldingsAccsState = ['holdings'];
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like it could be a constant which can be imported and used directly in <HoldingAccordion> without passing it through the component tree. Is there any reason to have it passed as a prop?

Copy link
Contributor Author

@mariia-aloshyna mariia-aloshyna Oct 17, 2023

Choose a reason for hiding this comment

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

There is a reason, actually, because <HoldingsAccordion> is also used to render holdings for different member tenants under the Consortial holdings accordion, and it has a different path in storage.
So the structure is next:

{
  holdings: {}, //local holdings of a current tenant
  consortialHoldings: { memberTenant: {} }, //holdings of member tenants
}

@mariia-aloshyna mariia-aloshyna merged commit b7c19d1 into master Oct 17, 2023
4 checks passed
@mariia-aloshyna mariia-aloshyna deleted the UIIN-2453 branch October 17, 2023 13:11
mariia-aloshyna added a commit that referenced this pull request Nov 3, 2023
…ance from holdings/item full screen (#2305)

(cherry picked from commit b7c19d1)
mariia-aloshyna added a commit that referenced this pull request Nov 3, 2023
* UIIN-2453: Instance 3rd pane: Adjust behaviour when returning to instance from holdings/item full screen (#2305)

(cherry picked from commit b7c19d1)

* UIIN-2629: Consortial holdings accordion is not appearing after the sharing of Instance (#2312)

(cherry picked from commit e03476f)

* UIIN-2531 Reset CheckboxFacet state.more when user resets search form and fewer facet options are loaded. (#2310)

(cherry picked from commit 749fead)

* UIIN-2588: Edit instance success toast no longer shows the instance HRID (#2313)

(cherry picked from commit dc738d2)

* UIIN-2533: Show facet options, if they exist, after clicking the +More button. (#2309)

(cherry picked from commit 1b6dca3)

* UIIN-2608: If Shared & Held by facets were selected in the Browse search, then retain them in the Search lookup after clicking the record. (#2307)

(cherry picked from commit 79771fb)

* UIIN-2600: Remove error message after switch from Instance Edit screen to another app (#2311)

(cherry picked from commit 3411d72)

* Release v10.0.1

---------

Co-authored-by: Denys Bohdan <[email protected]>
Co-authored-by: Dmytro-Melnyshyn <[email protected]>
Co-authored-by: Oleksandr Hladchenko <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants