Conversation
…allow resizable for all displayMode values #5652
macandcheese
left a comment
There was a problem hiding this comment.
This is awesome! One of our most frequently requested features - this will help a lot of app use cases.
Some small style issues and a request to prevent default on Home / End - otherwise looks good.
| * @param {string} value - The CSS style value to convert (e.g., "10px", "50vw", "30vh"). | ||
| * @returns {number} The pixel equivalent of the provided value. | ||
| */ | ||
| export function getStylePixelValue(value: string): number { |
There was a problem hiding this comment.
Future support could include svh, dvh, etc. as needed for improved device support if devs opt for that.
| --calcite-internal-shell-panel-shadow-inline-start: | ||
| -4px 0 8px -1px rgba(0, 0, 0, 0.08), -2px 0 4px -1px rgba(0, 0, 0, 0.04); | ||
| --calcite-internal-shell-panel-shadow-inline-end: | ||
| 4px 0 8px -1px rgba(0, 0, 0, 0.08), 2px 0 4px -1px rgba(0, 0, 0, 0.04); |
There was a problem hiding this comment.
Unrelated to this PR - It would be nice to have these directional shadows codified somewhere (or another shadow approach) - cc @matgalla @ashetland
There was a problem hiding this comment.
Nice, changes look good! One small thing - seeing the border-block missing from Panels in latest Chromatic builds - https://www.chromatic.com/test?appId=6266d45509d7eb004aa254fb&id=6807c2828e3b61852cf88a2e
@macandcheese the resize handle provides the border in these cases. Is something not looking right? It looks fine to me in chromatic. |
Chromatic isn't highlighting it 😒 - but the Panel in the new build don't have border on top or bottom: |
|
Ok ill get that fixed! |
|
@nel11211 do you have something I can look at to see the issue? Or a sample? |
…allow resizable for all displayMode values (#11983) **Related Issue:** #5652 ## Summary - improve resize handle sizing for more space to drag (aligns with `sheet` component) - allows resizing for all `displayMode` values - refactor `shell-panel` to use interact.js for resizing to align with the `sheet` and `dialog` components - add dom util `getStylePixelValue` to convert CSS values to pixels. - supports `px`, `vw`, `vh` for now since that is what we are taking advantage of - updates other components to use this util for consistency (sheet/dialog) - updates tests


Related Issue: #5652
Summary
sheetcomponent)displayModevaluesshell-panelto use interact.js for resizing to align with thesheetanddialogcomponentsgetStylePixelValueto convert CSS values to pixels.px,vw,vhfor now since that is what we are taking advantage of