Done
Details
Assignee
Dennis BridgesDennis BridgesReporter
Khalilah GambrellKhalilah GambrellTester Assignee
Dennis BridgesDennis BridgesLabels
Priority
P3Story Points
2Sprint
NoneDevelopment Team
ThunderjetFix versions
TestRail: Cases
Open TestRail: CasesTestRail: Runs
Open TestRail: Runs
Details
Details
Assignee
Dennis Bridges
Dennis BridgesReporter
Khalilah Gambrell
Khalilah GambrellTester Assignee
Dennis Bridges
Dennis BridgesLabels
Priority
Story Points
2
Sprint
None
Development Team
Thunderjet
Fix versions
TestRail: Cases
Open TestRail: Cases
TestRail: Runs
Open TestRail: Runs
Created March 22, 2021 at 6:45 PM
Updated May 5, 2021 at 8:25 PM
Resolved April 19, 2021 at 2:19 PM
Requirement: Update Resizable panes to support session/local storage persistence. See below documentation
Acceptance criteria
Given I am on the Orders app
AND I resize the second or third pane
AND I go to another app
When I return to the Orders 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
replace Paneset with PersistedPaneset
specify an appId as a prop to it
ensure all the child Panes have an id (which is a requirement for pane resizing in general)
example: https://github.com/folio-org/ui-licenses/pull/348/commits/e6ad79211bcff882893eb8d895f6e689b8746e99
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.