Closed alissa-tung closed 5 months ago
This library normally uses the browser's built-in localStorage
API for saving layouts. That can be overridden with an object that has the same API as localStorage
(strings in and out).
I don't see a reason to add a different API abstraction in between the two, so this doesn't sound like a feature that I'm interested in building.
If you want to share more thoughts about why you would want this change, I will read and consider them, but for now I'm going to close this as it's not something I'm interested in doing.
Thanks for understanding 🙇🏼
Thank you for developing
react-resizable-panels
! The library is easy to use and comprehensively documented with examples.We had already had external layout storage for panel groups. That is,
I want to suggest two features request here:
PanelGroupStorage
is initially for multiple groups use one storage together, so that, the API is used with names. When using<PanelGroup autoSaveId="example" direction="horizontal" storage={urlStorage}>
, the storage API should had already able to figure out which name is the group, for it is assigned as the creation of<PanelGroup/>
.getItem
andsetItem
all use string. An example of storage item would like{"left-panel,main-panel,right-panel":{"expandToSizes":{},"layout":[25,50,25]}}
, I guess this is generate from object, so that we can make the two APIs typed