Skip to content
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

Merged
merged 3 commits into from
Sep 14, 2023
Merged

Splitter fixes #2396

merged 3 commits into from
Sep 14, 2023

Conversation

jake-bassett
Copy link
Contributor

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:

  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • Any dependent changes have been merged and published in downstream modules

Documentation

Make sure that you have documented corresponding changes in this repository or hypertrace docs repo if required.

@jake-bassett jake-bassett requested a review from a team as a code owner September 14, 2023 00:31
@codecov
Copy link

codecov bot commented Sep 14, 2023

Codecov Report

Merging #2396 (5059648) into main (eae893f) will increase coverage by 0.09%.
The diff coverage is 92.59%.

@@            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     
Files Changed Coverage Δ
...ects/components/src/splitter/splitter.component.ts 93.93% <92.59%> (+18.10%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@github-actions

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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this random number?

Copy link
Contributor Author

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 => {
Copy link
Contributor

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?

Copy link
Contributor Author

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',
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@jake-bassett jake-bassett merged commit a8fc0ec into main Sep 14, 2023
14 checks passed
@jake-bassett jake-bassett deleted the splitter-fixes branch September 14, 2023 22:15
@github-actions
Copy link

Unit Test Results

       4 files  ±0     309 suites  ±0   44m 31s ⏱️ -55s
1 120 tests ±0  1 120 ✔️ ±0  0 💤 ±0  0 ❌ ±0 
1 130 runs  ±0  1 130 ✔️ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit a8fc0ec. ± Comparison against base commit eae893f.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants