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

Dialog: closable calcite panels placed inside a dialog will close the dialog #10129

Closed
2 of 6 tasks
driskull opened this issue Aug 21, 2024 · 2 comments
Closed
2 of 6 tasks
Assignees
Labels
4 - verified Issues that have been released and confirmed resolved. 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 - 3 A day or two of work, likely requires 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

Comments

@driskull
Copy link
Member

Check existing issues

Actual Behavior

When placing a panel inside a dialog and closing the panel, the dialog will be closed.

This is because the dialog listens for the calcitePanelClose event to close the dialog. If the event bubbles up, it closes the dialog. The workaround is to stop propagation of the calcitePanelClose event.

Expected Behavior

I would expect closing internal panels to not close the dialog.

Reproduction Sample

https://codepen.io/fcbasson/pen/YzoazZE

Reproduction Steps

  1. open the codepen
  2. close the panel inside the dialog
  3. notice the dialog closes

Reproduction Version

2.11.1

Relevant Info

In components that use calcite-panel internally and listen to its events, we should make sure the element we are looking for is emitting the events and that any other elements do not trigger any action.

Regression?

No response

Priority impact

impact - p1 - need for current milestone

Impact

No response

Calcite package

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

Esri team

N/A

@driskull driskull added bug Bug reports for broken functionality. Issues should include a reproduction of the bug. 0 - new New issues that need assignment. needs triage Planning workflow - pending design/dev review. labels Aug 21, 2024
@github-actions github-actions bot added 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 Aug 21, 2024
@DitwanP DitwanP added p - high Issue should be addressed in the current milestone, impacts component or core functionality 1 - assigned Issues that are assigned to a sprint and a team member. estimate - 3 A day or two of work, likely requires updates to tests. and removed 0 - new New issues that need assignment. needs triage Planning workflow - pending design/dev review. labels Aug 21, 2024
@DitwanP DitwanP added this to the 2024-08-27 - Aug Release milestone Aug 21, 2024
driskull added a commit that referenced this issue Aug 22, 2024
…component (#10130)

**Related Issue:** #10129

## Summary

- updates `dialog` and `flow-item` to only listen to panel events for
the internal panel. Excluding any other bubbling events.
- uses `IDS` for unique ids of elements instead of `data-test`
attributes.
- stops propagation of internal panel events on dialog.
- adds tests
@driskull driskull added 3 - installed Issues that have been merged to master branch and are ready for final confirmation. and removed 1 - assigned Issues that are assigned to a sprint and a team member. labels Aug 22, 2024
@github-actions github-actions bot assigned geospatialem and DitwanP and unassigned driskull Aug 22, 2024
Copy link
Contributor

Installed and assigned for verification.

@DitwanP
Copy link
Contributor

DitwanP commented Aug 22, 2024

🍡 Verified locally on dev

Screen.Recording.2024-08-22.at.3.17.08.PM.mov

@DitwanP DitwanP closed this as completed Aug 22, 2024
@DitwanP DitwanP added 4 - verified Issues that have been released and confirmed resolved. and removed 3 - installed Issues that have been merged to master branch and are ready for final confirmation. labels Aug 22, 2024
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. 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 - 3 A day or two of work, likely requires 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

3 participants