Fix: restore SplitPane gutter position preservation#785
Merged
Conversation
Restore the original behavior from commit 1923579 that was accidentally reverted during merge conflict resolution. - Remove componentWillUpdate that destroyed split on every update - Use componentDidUpdate with prevProps.direction check - Only rebuild split when direction actually changes - This preserves the gutter position when code changes
|
You have run out of free Bugbot PR reviews for this billing cycle. This will reset on January 17. To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
During the merge conflict resolution in PR #784, commit
1923579was accidentally reverted. This caused the split gutter position to reset on every code change.Root Cause
The merge took master's
componentWillUpdate()approach which destroys the split on every update, then I addedcomponentDidUpdate()to recreate it. But this missed theprevProps.directioncheck from the original commit.Fix
componentWillUpdate()that destroyed split on every updatecomponentDidUpdate(prevProps)with direction checkdirectionprop actually changesTesting