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

Block - manually setting to open still fires calciteBlockOpen event #8453

Open
2 of 6 tasks
ian13262 opened this issue Dec 19, 2023 · 3 comments
Open
2 of 6 tasks

Block - manually setting to open still fires calciteBlockOpen event #8453

ian13262 opened this issue Dec 19, 2023 · 3 comments
Labels
0 - new New issues that need assignment. 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. impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone spike Issues that need quick investigations for time estimations, prioritization, or a quick assessment.

Comments

@ian13262
Copy link

Check existing issues

Actual Behavior

Setting a calcite-block to open manually (open = true) still fires the calciteBlockOpen event. Note that the deprecated event calciteBlockToggle is not fired in this case.

Expected Behavior

Setting open = true manually should not fire an open event. Specifically relevant when a block should be open on page load, but no event should occur as a result.

Reproduction Sample

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

Reproduction Steps

1.) Open DevTools
2.) Observe that the calciteBlockOpen event is called even when the property open is set to true manually (rather than actually clicking the calcite-block element).

Reproduction Version

2.0.0

Relevant Info

cc @AdelheidF

Regression?

No response

Priority impact

p3 - want for upcoming milestone

Impact

Specifically relevant when a block should be open on page load, but no event should occur. For example, opening the block by clicking might trigger a focus event, but this event should not be triggered if the block is just set to open on page load (maybe the focus should be elsewhere).

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

@ian13262 ian13262 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 Dec 19, 2023
@github-actions github-actions bot added calcite-components Issues specific to the @esri/calcite-components package. ArcGIS Online Issues logged by ArcGIS Online team members. p3 - want for upcoming milestone labels Dec 19, 2023
@geospatialem geospatialem added the blocked This issue is blocked by another issue. label Jan 11, 2024
@jcfranco
Copy link
Member

This is behaving as expected, at least the way we've got open/close events set up. The reason we do this is because it is not possible to know exactly when the component is open when set programmatically, so the event is necessary. We've got a draft PR with an update to our event conventions on this.

We could look into providing info in the event to help distinguish open/close events between user and programmatically-triggered contexts.

@AdelheidF
Copy link

We could look into providing info in the event to help distinguish open/close events between user and programmatically-triggered contexts.

I think this would be useful.

@geospatialem
Copy link
Member

We should work through some explorations and prototypes using a spike prior to team discussions that could be useful across the calcite components package and event types.

@geospatialem geospatialem added needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. spike Issues that need quick investigations for time estimations, prioritization, or a quick assessment. and removed blocked This issue is blocked by another issue. needs triage Planning workflow - pending design/dev review. labels Apr 15, 2024
@geospatialem geospatialem added impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone and removed p3 - want for upcoming milestone labels May 21, 2024
@geospatialem geospatialem added this to the 2025-04-29 - Apr Release milestone Sep 10, 2024
@geospatialem geospatialem removed the needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. label Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 - new New issues that need assignment. 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. impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone spike Issues that need quick investigations for time estimations, prioritization, or a quick assessment.
Projects
None yet
Development

No branches or pull requests

4 participants