Esri / calcite-design-system

A monorepo containing the packages for Esri's Calcite Design System
https://developers.arcgis.com/calcite-design-system/
Other
295 stars 76 forks source link

[Alert] Allow the Alter component to position itself based on the extent of its closest parent container #9971

Open fendiaoxiaoshuazi opened 3 months ago

fendiaoxiaoshuazi commented 3 months ago

Check existing issues

Description

Currently, the alter component positions itself based on the extent of the entire page, and we would like to have the alter component positions based on the closest parent container.

Acceptance Criteria

Allow the alter component to be positioned based on the extent of the closest parent container.

Relevant Info

No response

Which Component

Alter

Example Use Case

We create a feature report component embedded in the Experience builder. The alter component hosted in the feature report component is not in our expected position. image which

Priority impact

impact - p3 - not time sensitive

Calcite package

Esri team

ArcGIS Survey123

driskull commented 3 months ago

We added an alerts slot to the calcite-panel component which can handle this use case.

nanzhang01 commented 3 months ago

Thanks @driskull. I tried using the alerts slot in the calcite-panel component(here is my testing page: https://codepen.io/nan9266/pen/wvLmoWJ), but seems it didn't fully address the issue. Could you please let me know about any additional adjustments or provide additional guidance? Thanks.

driskull commented 3 months ago

@nanzhang01 here is an updated codepen with what you're looking for I think. https://codepen.io/driskull/pen/JjQLpxo

nanzhang01 commented 3 months ago

Thanks @driskull ! The updated codepen works perfectly and has resolved our issue. Much appreciated!