Skip to content

feat(shell-panel): Improve visibility of resizable functionality and allow resizable for all displayMode values#11983

Merged
driskull merged 13 commits intodevfrom
dris0000/shell-panel-resize-fixes
Apr 22, 2025
Merged

feat(shell-panel): Improve visibility of resizable functionality and allow resizable for all displayMode values#11983
driskull merged 13 commits intodevfrom
dris0000/shell-panel-resize-fixes

Conversation

@driskull
Copy link
Copy Markdown
Member

@driskull driskull commented Apr 17, 2025

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

@driskull driskull changed the title Dris0000/shell panel resize fixes feat(shell-panel): Improve visibility of resizable functionality and allow resizable for all displayMode values Apr 17, 2025
@github-actions github-actions Bot added the enhancement Issues tied to a new feature or request. label Apr 17, 2025
@driskull driskull added the pr ready for visual snapshots Adding this label will run visual snapshot testing. label Apr 18, 2025
@driskull driskull added pr ready for visual snapshots Adding this label will run visual snapshot testing. and removed pr ready for visual snapshots Adding this label will run visual snapshot testing. labels Apr 18, 2025
@driskull driskull marked this pull request as ready for review April 18, 2025 18:39
Copy link
Copy Markdown
Contributor

@macandcheese macandcheese left a comment

Choose a reason for hiding this comment

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

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

Choose a reason for hiding this comment

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

Future support could include svh, dvh, etc. as needed for improved device support if devs opt for that.

Comment thread packages/calcite-components/src/components/sheet/resources.ts Outdated
--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);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Unrelated to this PR - It would be nice to have these directional shadows codified somewhere (or another shadow approach) - cc @matgalla @ashetland

@driskull driskull added pr ready for visual snapshots Adding this label will run visual snapshot testing. and removed pr ready for visual snapshots Adding this label will run visual snapshot testing. labels Apr 22, 2025
@driskull driskull requested a review from macandcheese April 22, 2025 16:20
Copy link
Copy Markdown
Contributor

@macandcheese macandcheese left a comment

Choose a reason for hiding this comment

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

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

@driskull
Copy link
Copy Markdown
Member Author

One small thing - seeing the border-block missing from Panels in latest Chromatic builds -

@macandcheese the resize handle provides the border in these cases. Is something not looking right? It looks fine to me in chromatic.

@macandcheese
Copy link
Copy Markdown
Contributor

macandcheese commented Apr 22, 2025

One small thing - seeing the border-block missing from Panels in latest Chromatic builds -

@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:
Screenshot 2025-04-22 at 9 45 02 AM
Screenshot 2025-04-22 at 9 44 56 AM

@driskull
Copy link
Copy Markdown
Member Author

Ok ill get that fixed!

@driskull driskull added pr ready for visual snapshots Adding this label will run visual snapshot testing. and removed pr ready for visual snapshots Adding this label will run visual snapshot testing. labels Apr 22, 2025
@driskull driskull merged commit a48e422 into dev Apr 22, 2025
14 checks passed
@driskull driskull deleted the dris0000/shell-panel-resize-fixes branch April 22, 2025 18:22
@github-actions github-actions Bot added this to the 2025-04-29 - Apr Milestone milestone Apr 22, 2025
@nel11211
Copy link
Copy Markdown

We're seeing an issue in Charts Components that appears to have originated from this PR.

@driskull Do you happen to have any initial guess what the relationship is, or what might need to be changed on our end to correct it? Thanks

@driskull
Copy link
Copy Markdown
Member Author

@nel11211 do you have something I can look at to see the issue? Or a sample?

@nel11211
Copy link
Copy Markdown

@nel11211 do you have something I can look at to see the issue? Or a sample?

#12057

benelan pushed a commit that referenced this pull request May 14, 2025
…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
jcfranco added a commit that referenced this pull request Aug 18, 2025
**Related Issue:** #12116

## Summary

Fixes regression introduced in
#11983 where a resized
panel would reset its size after collapsing and expanding.
benelan pushed a commit that referenced this pull request Sep 16, 2025
**Related Issue:** #12116

## Summary

Fixes regression introduced in
#11983 where a resized
panel would reset its size after collapsing and expanding.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Issues tied to a new feature or request. pr ready for visual snapshots Adding this label will run visual snapshot testing.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants