Use custom splitter component#4606
Open
mstange wants to merge 3 commits intofirefox-devtools:mainfrom
Open
Conversation
3dd644e to
432dc91
Compare
3f0156a to
d644702
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4606 +/- ##
==========================================
- Coverage 85.38% 85.36% -0.03%
==========================================
Files 322 323 +1
Lines 32101 32052 -49
Branches 8849 8722 -127
==========================================
- Hits 27410 27361 -49
Misses 4260 4260
Partials 431 431 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
2b5d157 to
939ac2b
Compare
We originally introduced this to resolve firefox-devtools#1205 and firefox-devtools#736, but these days it's not needed anymore because we have ResizeObservers in the relevant places.
This replacement has the following advantages: It's compatible with React 18, and it supports making "max-height" the controlled property, which is useful for our timeline splitter. In the past, we needed to compute the height of the timeline contents, and then make it so you couldn't move the splitter down more than the full timeline height, because we didn't want there to be a gap above the splitter, or even initialize the splitter at a position that creates such a gap. By making the splitter control max-height instead, even if the splitter is dragged low enough to say max-height:1000px, the splitter won't actually move that low because the timeline won't grow beyond its full size (because there's no longer a height property forcing it to grow).
In the past this was used to prevent the splitter from creating a gap between the timeline contents and the splitter. But these gaps only appeared because the splitter set a height. Now it only sets a max-height so the gaps don't appear.
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.
Production | Deploy preview
This replaces the splitter component with an implementation which lets us use
max-heighton the timeline, so that we don't have to compute the timeline height based on the visible tracks.This PR is based on #5946.
┆Issue is synchronized with this Jira Task