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

Calcite-Block event handlers doesn't fire instantly. #10703

Open
2 of 6 tasks
sanikapatilEsri opened this issue Nov 6, 2024 · 0 comments
Open
2 of 6 tasks

Calcite-Block event handlers doesn't fire instantly. #10703

sanikapatilEsri opened this issue Nov 6, 2024 · 0 comments
Assignees
Labels
1 - assigned Issues that are assigned to a sprint and a team member. ArcGIS Knowledge Issues logged by ArcGIS Knowledge team members. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. calcite-components-react Issues specific to the @esri/calcite-components-react package. impact - p3 - not time sensitive User set priority impact status of p3 - not time sensitive p - high Issue should be addressed in the current milestone, impacts component or core functionality spike Issues that need quick investigations for time estimations, prioritization, or a quick assessment.

Comments

@sanikapatilEsri
Copy link

sanikapatilEsri commented Nov 6, 2024

Check existing issues

Actual Behavior

The onCalciteBlockBeforeOpen and onCalciteBlockBeforeClose events are not firing instantly as expected when user interacts with the calcite-block. This problem was found when tracking a calcite block's status and determining when its open or closed state needed to be maintained using the onOpen / onClose handlers. During debugging, it was discovered that a re-render interrupts a calcite block's toggling and onCalciteBlockBeforeClose is never getting called.

The block collapse expand also occurs even if the component is left uncontrolled (i.e removing the event handlers and just using the open property and a re-render occurs between the open and close. Additionally if a header-menu-actions slot is there along with the block being collapsible, adding onClick event doesn't let the header-menu-actions and the block contents be open at the same time where as in previous versions(2.8.5) it did allow that.

We are using the deprecated method onCalciteBlockToggle while this issue is fixed, hence we need this issue to be fixed before the onCalciteBlockToggle method is removed.

This is the repro link for the initial off eventing: https://codepen.io/jcfranco/pen/dyxgONL?editors=1001

I have also attached the sandbox link to reproduce the re-render issue: https://codesandbox.io/p/devbox/calcite-block-collapse-forked-49pwqv

Issue discussion reference: https://teams.microsoft.com/l/message/19:fd15b51dacd24e70895ec1218a54ae06@thread.skype/1730754470623?tenantId=aee6e3c9-711e-4c7c-bd27-04f2307db20d&groupId=56fae21a-9407-4943-859f-a9bfcf0bbad3&parentMessageId=1730754470623&teamName=Calcite%20Design%20System&channelName=Get%20Help%20-%20Development&createdTime=1730754470623

Expected Behavior

The calcite block events should fire instantly on interaction.

Reproduction Sample

https://codepen.io/jcfranco/pen/dyxgONL?editors=1001

Reproduction Steps

  1. Open the codepen link
  2. Toggle the calcite block and observe the close event doesn't fire instantly

Reproduction Version

https://codepen.io/jcfranco/pen/dyxgONL?editors=1001

Relevant Info

No response

Regression?

No response

Priority impact

impact - p3 - not time sensitive

Impact

No response

Calcite package

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

Esri team

ArcGIS Knowledge

@sanikapatilEsri sanikapatilEsri 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 Nov 6, 2024
@github-actions github-actions bot added ArcGIS Knowledge Issues logged by ArcGIS Knowledge team members. calcite-components-react Issues specific to the @esri/calcite-components-react package. impact - p3 - not time sensitive User set priority impact status of p3 - not time sensitive labels Nov 6, 2024
@geospatialem geospatialem added p - high Issue should be addressed in the current milestone, impacts component or core functionality spike Issues that need quick investigations for time estimations, prioritization, or a quick assessment. and removed needs triage Planning workflow - pending design/dev review. labels Nov 12, 2024
@geospatialem geospatialem added 1 - assigned Issues that are assigned to a sprint and a team member. and removed 0 - new New issues that need assignment. labels Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 - assigned Issues that are assigned to a sprint and a team member. ArcGIS Knowledge Issues logged by ArcGIS Knowledge team members. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. calcite-components-react Issues specific to the @esri/calcite-components-react package. impact - p3 - not time sensitive User set priority impact status of p3 - not time sensitive p - high Issue should be addressed in the current milestone, impacts component or core functionality spike Issues that need quick investigations for time estimations, prioritization, or a quick assessment.
Projects
None yet
Development

No branches or pull requests

3 participants