mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-02-03 04:14:58 -05:00
`usePanel` started panels with a `minSize` and `defaultSize` of 0, which means collapsed. This causes panels to load as collapsed on the very first app load. Then, in the layout effect, we see the panel as collapsed and skip setting it to the correct size. Reviewing the library's API, `minSize` and `defaultSize` should not be lower than 1. Thankfully, setting this to 1 also prevents the issue described above. - `minSize` and `defaultSize` start at 1 - Return a sentinel value when converting percentages to pixels, if the panel's container has no size. When that happens, we should not update the `minSize` or `defaultSize`. - Split observer callback into its own function, so that the exact same logic can be used on the first run of hte effect. - Update prop names and docstrings to accurately reflect that the numerical values are in pixels