[UIMARCAUTH-25] Authorities app | Resizable Panes - Persistence | Use PersistedPaneset smart component. Created: 18/Nov/21  Updated: 27/Jun/22  Resolved: 26/Jan/22

Status: Closed
Project: ui-marc-authorities
Components: None
Affects versions: None
Fix versions: 1.0.0

Type: Story Priority: P3
Reporter: Khalilah Gambrell Assignee: Denys Bohdan
Resolution: Done Votes: 0
Labels: epam-spitfire, front-end
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Attachments: PNG File image-2022-01-21-12-41-42-815.png     PNG File image-2022-01-21-12-42-22-193.png    
Issue links:
Cloners
clones FOLIO-3088 CLONE - Resizable Panes - Persistence... Open
Gantt End to End
has to be finished together with UIMARCAUTH-16 MARC Authorities Search Box Closed
Relates
relates to UXPROD-2942 quickMARC | Search MARC Authority Rec... Closed
relates to UIDATIMP-884 Resizable Panes - Persistence | Use P... Closed
Sprint: eHoldings Sprint 131, eHoldings Sprint 132
Story Points: 0
Development Team: Spitfire
Release: Lotus R1 2022

 Description   

Requirement: Update Resizable panes to support session/local storage persistence. See below documentation

Acceptance criteria
Given I am on Authorities app
AND I resize the second or third pane
AND I go to another app
When I return to the app
Then resize should persists based on session and/or local storage

Technical documentation
we’ve added a new component, <PersistedPaneset> to stripes-smart-components: https://github.com/folio-org/stripes-smart-components/tree/master/lib/PersistedPaneset
you’re already using <Paneset> in your apps, to which @j.coburn recently added the ability to resize Panes (scroll up :wink. PersistedPaneset saves the current pane widths to the user’s localStorage so if you resize a pane, close the window, and then bring up folio again, the panes will be the same width.
to use PersistedPaneset

what about the search-and-filters pane?
while working on this, i realised i could use the same technique to persist the visibility of the filters pane. that is, if a user has hidden them and they refresh, the filters pane will remain hidden. so i’ve now done that in the Agreements and Licenses apps as well.
i don’t have as concise a commit diff to show as an example, but the key parts are here: https://github.com/folio-org/ui-agreements/blob/v6.0.0/src/components/views/Agreements.js#L75-L81
there, we’re using the @rehooks/local-storage package to give us a local storage hook that we use to read/set the visibility. note the filterPaneVisibilityKey that namespaces the local storage to this app. NB: you should never use an un-namespaced key into local storage since you share it with all folio apps in existence now and in the future, including ones you may not know of that were developed independently at some random library/university.



 Comments   
Comment by Khalilah Gambrell [ 18/Nov/21 ]

Included in UIMARCAUTH-16 Closed estimation

Comment by Denys Bohdan [ 21/Jan/22 ]

Searching for Paneset in ui-marc-authorities gives 0 results

Searching for PersistedPaneset gives 2 results

Generated at Thu Feb 08 23:27:26 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.