Skip to content

Conversation

@fbasso
Copy link
Contributor

@fbasso fbasso commented Dec 3, 2025

No description provided.

@fbasso fbasso force-pushed the mouse-directive branch 10 times, most recently from a4491e0 to a3c3922 Compare December 10, 2025 15:04
@codecov
Copy link

codecov bot commented Dec 10, 2025

Codecov Report

❌ Patch coverage is 85.07463% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.82%. Comparing base (b0d8167) to head (0a48438).

Files with missing lines Patch % Lines
core/src/components/drawer/drawer.ts 67.85% 0 Missing and 9 partials ⚠️
core/src/services/pointerdownPosition.ts 96.42% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1249      +/-   ##
==========================================
- Coverage   90.61%   85.82%   -4.80%     
==========================================
  Files         117       50      -67     
  Lines        3399     2349    -1050     
  Branches      545      420     -125     
==========================================
- Hits         3080     2016    -1064     
- Misses        205      227      +22     
+ Partials      114      106       -8     
Flag Coverage Δ
e2e ?
unit 85.82% <85.07%> (+0.64%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@fbasso fbasso force-pushed the mouse-directive branch 8 times, most recently from 2e4dcf3 to e1d38d2 Compare December 15, 2025 12:21
@fbasso fbasso changed the title feat(drawer): mouse move management feat(drawer): mouse move and css units management Dec 15, 2025
@fbasso fbasso force-pushed the mouse-directive branch 10 times, most recently from 95764c9 to 083426b Compare December 19, 2025 14:21
@fbasso fbasso force-pushed the mouse-directive branch 3 times, most recently from 0eca38d to 5abf3ac Compare December 19, 2025 15:21
encapsulation: ViewEncapsulation.None,
})
export default class SizesDrawerComponent {
width = '20rem';
Copy link
Contributor

Choose a reason for hiding this comment

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

not needed anymore

--#{$prefix}drawer-size: max-content;
--#{$prefix}drawer-min-size: 0;
--#{$prefix}drawer-max-size: none;
--#{$prefix}drawer-splitter-size: 8px;
Copy link
Contributor

Choose a reason for hiding this comment

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

it seems to be replaced by $splitter-size

Copy link
Contributor Author

Choose a reason for hiding this comment

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

True. Finally, I changed it for the css version, as this is something that we may want to customize.

},
}));
onMoveEnd() {
const newSize = drawerElement$()![isVertical$() ? 'offsetHeight' : 'offsetWidth'];
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe we can already add a bit of logic when the currentSize gets to the minimum width (or some specified value) - we close the drawer? Because currently we can drag it all the way to the left and it leaves only a tiny bit of splitter out

maxSize = element.getBoundingClientRect()[dimension] + 'px';
context.maxSize = maxSize;
}
// if (!maxSize) {
Copy link
Contributor

Choose a reason for hiding this comment

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

still need the commented code?

};

/**
* A writable with default options that normalizes its value to a boolean or null.
Copy link
Contributor

Choose a reason for hiding this comment

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

typo in the comments:, has to be: number or null

@fbasso fbasso force-pushed the mouse-directive branch 3 times, most recently from 4ca25da to 28ac809 Compare December 29, 2025 13:40

@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
imports: [SlotDirective, DrawerStructureDirective, UseDirective],
Copy link
Contributor

Choose a reason for hiding this comment

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

UseDirective is not needed anymore here

@fbasso fbasso force-pushed the mouse-directive branch 3 times, most recently from 45729e3 to d6efee5 Compare December 29, 2025 15:12
onMoveStart() {
const isVertical = isVertical$();
viewportSize = window[isVertical ? 'innerHeight' : 'innerWidth'];
const drawerElement = drawerElement$();
Copy link
Contributor

Choose a reason for hiding this comment

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

probably we can avoid having the if and directly go with drawerElement$()! as in moveEnd as it is always there (+saves coverage :D)

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