devbookhq / splitter

React component for building split views like in VS Code
https://usedevbook.com
MIT License
440 stars 30 forks source link

Gutter height not properly accounted for #27

Closed jasontk19 closed 1 year ago

jasontk19 commented 1 year ago

The gutter height, which is subtracted from each section's height, is always initially calculated as being 0 due to a duplicate declaration of the gutterSize variable here which causes the calculation result to stay in the conditional block scope. This causes an issue where the total heights of sections exceeds 100% of the container height. You can see this happening in the screenshots below where the overall splitter container exceeds the height of it's parent, causing content in the last section to be obscured from view.

Screen Shot 2023-06-28 at 10 22 29 AM Screen Shot 2023-06-28 at 10 22 16 AM