-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Splitter fixes #2396
Splitter fixes #2396
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2396 +/- ##
==========================================
+ Coverage 82.73% 82.82% +0.09%
==========================================
Files 920 920
Lines 20510 20489 -21
Branches 3234 3222 -12
==========================================
+ Hits 16968 16970 +2
+ Misses 3413 3394 -19
+ Partials 129 125 -4
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
This comment has been minimized.
This comment has been minimized.
@@ -57,7 +57,7 @@ export class SplitterComponent implements OnChanges, AfterContentInit { | |||
public readonly direction?: SplitterDirection = SplitterDirection.Horizontal; | |||
|
|||
@Input() | |||
public readonly debounceTime: number = 20; | |||
public readonly debounceTime: number = 12; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this random number?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We just needed a small number but not too small. I played with it a bit and this seemed to work well. It could be any number in that vicinity really.
size: this.getElementSize(element) | ||
}; | ||
if (!this.mouseUpListener) { | ||
this.mouseUpListener = this.renderer.listen(this.document, 'mouseup', event => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question, this works like an eventListener?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct.
private normalizeContentDimension(content: SplitterContentDirective): SplitterContentDirective { | ||
if (content.dimension.unit === 'FR') { | ||
content.dimension = { | ||
unit: 'PX', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you use an Enum instead of a string for PX and FR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, we could. I could have created one, but just left it as a string since that's what it was originally.
Description
Please include a summary of the change, motivation and context.
Testing
Please describe the tests that you ran to verify your changes. Please summarize what did you test and what needs to be tested e.g. deployed and tested helm chart locally.
Checklist:
Documentation
Make sure that you have documented corresponding changes in this repository or hypertrace docs repo if required.