-
Notifications
You must be signed in to change notification settings - Fork 77
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
Support panel collapsing #7498
Comments
One question I had is if the collapse button should always be farthest to the left or next to the close button? |
I'd think we would want to place it alongside other component-rendered content, but cc @SkyeSeitz @ashetland @asangma |
In a similar conversation on Block, we discussed the chevron being placed adjacent to the heading at all times and not at the extent. This would also allow for the close-button to remain at the end which should be consistent. |
Summarizing a few thoughts that consider this pattern across Block, Panel, and Accordion: ![]() cc @asangma for any additional thoughts. |
@asangma if you're ok with having the collapse next to the close button should I update the popup to do that? |
I think if the heading container were to be the hit-area for expand/collapse, we'd want to have the heading and expand/collapse icon all be contained in the same button. If expand/collapse is its own distinct hit area that the component renders, it makes sense to have it be next to the other actions that Panel renders, i.e. the close button. |
Yeah that makes sense. So should it be its own distinct area or not? |
Having the heading container be the button aligns with Accordion and Block, no? |
Yes, both of those are intended to be wholly clickable - Not sure if we want to change Panel to match as it would only be in the case that it is collapsible and IMO kind of conflates the use case with Block. Tree, for example could have a separate hit area for collapsing as well, so not sure it’s a need to match Block / Accordion here… |
I'm ok with the whole title being clickable or just the action. Either way seems fine to me. |
I think because Panel have a possibility of having some really wide width in some cases, such as in a bottom / top Shell Panel making it a smaller, Action-sized area rendered next to the close (when provided) is the best option here. Sound good @asangma @SkyeSeitz @ashetland ? |
Agreed |
@asangma one thing you brought up from the Popup work is that the icons should be reversed if the panel expands up vs down. We would need to achieve this from some kind of property since the panel itself doesn't know anything about the direction its expanding. Is this worth doing via a prop? If we do this for panel, the same argument could be made for doing it to accordion or block. You can see an example of an accordion opening up here: https://codepen.io/driskull/pen/PoXEBMZ?editors=1000 |
**Related Issue:** #7498 ## Summary - Add support for collapsing panel content via an action in the header - Adds props `collapsible`, `collapsed` and `collapseDirection` to both `flow-item` and `panel` - `collapseDirection` is internal for discussion - Depending on which way the panel expands, the icons may need to be reversed. - This property allows that. cc @asangma for more information. - We can remove this prop if we don't think its necessary - Adds event `calcitePanelToggle`. - Block calls this event `calciteBlockToggle`. - ActionPad calls this event `calciteActionPadToggle` - Copies t9n messages from block component (expand/collapse) messages. - Adds CSS custom properties for the panel/flow-item to disable the header's bottom border - `--calcite-panel-header-border-block-end` - `--calcite-flow-item-header-border-block-end` - Removes unused private properties on panel 🧹 - Adds screenshot tests & stories - Adds usage file - Updates HTML file for panel - Adds e2e tests
Installed and assigned for verification. |
Verified in |
Check existing issues
Description
Add the ability to collapse a
calcite-panel
.Some use cases for the panel call for the ability to collapse the content of the panel with a button in the header.
For example:
Acceptance Criteria
This would be done by adding a
collapsable
property as well as acollapsed
property.Relevant Info
#7491
Which Component
calcite-panel
Example Use Case
Priority impact
p3 - want for upcoming milestone
Calcite package
Esri team
ArcGIS Maps SDK for JavaScript
The text was updated successfully, but these errors were encountered: