bvaughn / react-resizable-panels

https://react-resizable-panels.vercel.app/
MIT License
3.6k stars 125 forks source link

feature request: typed external storage API #286

Closed alissa-tung closed 5 months ago

alissa-tung commented 5 months ago

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,

export type PanelGroupStorage = {
    getItem(name: string): string | null;
    setItem(name: string, value: string): void;
};

I want to suggest two features request here:

bvaughn commented 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 🙇🏼