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

Panel - extra vertical space is present when content does not take up entire height #10494

Closed
2 of 6 tasks
iyouth23 opened this issue Oct 7, 2024 · 6 comments
Closed
2 of 6 tasks
Assignees
Labels
4 - verified Issues that have been released and confirmed resolved. ArcGIS Online Issues logged by ArcGIS Online team members. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. calcite-components Issues specific to the @esri/calcite-components package. estimate - 2 Small fix or update, may require updates to tests. impact - p1 - need for current milestone User set priority impact status of p1 - need for current milestone p - high Issue should be addressed in the current milestone, impacts component or core functionality
Milestone

Comments

@iyouth23
Copy link

iyouth23 commented Oct 7, 2024

Check existing issues

Actual Behavior

calcite-panel will add extra vertical space if its content doesn't take up the entire height of the screen. This is especially visible when I want to set content to have a fixed height while still allowing for scrolling of internal content that exceeds this height.

For example, I want an action-bar inside a calcite-panel, but I want its max-height to be 500px and have overflow-y: scroll.

This is occurring due to a change to calcite-panel in 2.12, where <div class="content-wrapper"> now has position: relative: https://github.com/Esri/calcite-design-system/blob/dev/packages/calcite-components/src/components/panel/panel.scss#L168

Expected Behavior

Extra vertical space should not appear below the content's max-height, and neither should the scrollbar. The panel should snap to the height of the content inside.

Reproduction Sample

https://codepen.io/iyouth66/pen/BaXKYxz

Reproduction Steps

  1. Open this Codepen: https://codepen.io/iyouth66/pen/BaXKYxz?editors=1100
  2. Observe the extra space and scrollbar when the content has a fixed height and the internal content (which should scroll) exceeds the fixed height.

Reproduction Version

2.12.0

Relevant Info

cc @driskull @zaramatheson

Regression?

2.11.0

Priority impact

impact - p1 - need for current milestone

Impact

Map Viewer has many places where we have unnecessary extra vertical space/scrollbars now. See the examples below. We're seeking a fix for this or a workaround in the meantime.

image

image

Calcite package

  • @esri/calcite-components
  • @esri/calcite-components-angular
  • @esri/calcite-components-react
  • @esri/calcite-design-tokens
  • @esri/eslint-plugin-calcite-components

Esri team

ArcGIS Online

@iyouth23 iyouth23 added 0 - new New issues that need assignment. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. needs triage Planning workflow - pending design/dev review. labels Oct 7, 2024
@github-actions github-actions bot added ArcGIS Online Issues logged by ArcGIS Online team members. calcite-components Issues specific to the @esri/calcite-components package. impact - p1 - need for current milestone User set priority impact status of p1 - need for current milestone labels Oct 7, 2024
@driskull
Copy link
Member

driskull commented Oct 7, 2024

@iyouth23 the panel is designed to scroll content. Can you set the height on the panel instead of a div inside of it?

Like: https://codepen.io/driskull/pen/XWvjXNW?editors=1100

@geospatialem geospatialem added 2 - in development Issues that are actively being worked on. and removed 0 - new New issues that need assignment. labels Oct 7, 2024
@geospatialem geospatialem added p - high Issue should be addressed in the current milestone, impacts component or core functionality estimate - 2 Small fix or update, may require updates to tests. and removed needs triage Planning workflow - pending design/dev review. labels Oct 7, 2024
@geospatialem geospatialem added this to the 2.13.1 patch milestone Oct 7, 2024
@driskull
Copy link
Member

driskull commented Oct 7, 2024

@iyouth23 in your example, if you just add position:relative; to your div it seems to fix it. Can you verify?

https://codepen.io/driskull/pen/NWQRRoJ?editors=1100

@jcfranco
Copy link
Member

jcfranco commented Oct 9, 2024

Expanding on @driskull's suggestion, would the following rule help as a workaround?

​calcite-panel > :first-child {
 position: relative;
}

@driskull driskull removed their assignment Oct 10, 2024
@driskull driskull added 0 - new New issues that need assignment. and removed 2 - in development Issues that are actively being worked on. labels Oct 10, 2024
@driskull
Copy link
Member

related: #10095

driskull added a commit that referenced this issue Oct 10, 2024
**Related Issue:** #10494 #10095

## Summary

- reverts position relative styling
- #10119 should be verified again
@geospatialem geospatialem added 3 - installed Issues that have been merged to master branch and are ready for final confirmation. and removed 0 - new New issues that need assignment. labels Oct 11, 2024
Copy link
Contributor

Installed and assigned for verification.

@geospatialem geospatialem removed the 3 - installed Issues that have been merged to master branch and are ready for final confirmation. label Oct 11, 2024
@geospatialem geospatialem added the 4 - verified Issues that have been released and confirmed resolved. label Oct 11, 2024
@geospatialem
Copy link
Member

Verified in 2.14.0-next.12.

benelan pushed a commit that referenced this issue Oct 11, 2024
**Related Issue:** #10494 #10095

## Summary

- reverts position relative styling
- #10119 should be verified again
benelan pushed a commit that referenced this issue Oct 11, 2024
**Related Issue:** #10494 #10095

## Summary

- reverts position relative styling
- #10119 should be verified again
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4 - verified Issues that have been released and confirmed resolved. ArcGIS Online Issues logged by ArcGIS Online team members. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. calcite-components Issues specific to the @esri/calcite-components package. estimate - 2 Small fix or update, may require updates to tests. impact - p1 - need for current milestone User set priority impact status of p1 - need for current milestone p - high Issue should be addressed in the current milestone, impacts component or core functionality
Projects
None yet
Development

No branches or pull requests

5 participants