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

input-time-zone emits multiple open/close events when toggling open #9315

Closed
2 of 6 tasks
nwhittaker opened this issue May 10, 2024 · 8 comments
Closed
2 of 6 tasks
Assignees
Labels
4 - verified Issues that have been released and confirmed resolved. ArcGIS Field Apps Issues logged by ArcGIS Field Apps 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. estimate - 8 Requires input from team, consider smaller steps. impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone p - medium Issue is non core or affecting less that 60% of people using the library p3 - want for upcoming milestone User set priority status of p3 - want for upcoming milestone
Milestone

Comments

@nwhittaker
Copy link
Contributor

nwhittaker commented May 10, 2024

Check existing issues

Actual Behavior

When enabling the input-time-zone component's open prop, events are emitted in this order:

  1. calciteInputTimeZoneOpen
  2. calciteInputTimeZoneBeforeOpen
  3. calciteInputTimeZoneOpen

When disabling the input-time-zone component's open prop, events are emitted in this order:

  1. calciteInputTimeZoneClose
  2. calciteInputTimeZoneBeforeClose
  3. calciteInputTimeZoneClose

Expected Behavior

Presumably the first calciteInputTimeZoneOpen and calciteInputTimeZoneClose events never occur.

Reproduction Sample

https://codepen.io/nwhittaker-esri/pen/BaeaXom

Reproduction Steps

  1. Visit the sample and open the console
  2. Click the Toggle time zone input button a few times and see the order of emitted events appear in the console

Reproduction Version

2.8.0

Relevant Info

Encountered while investigating a workaround for the issue where opened overlays do not dismiss when clicking outside of them but on an element that stops event propagation.

Regression?

No response

Priority impact

p3 - want for upcoming milestone

Impact

Impact is minimal since we don't currently make use of these input-time-zone events.

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 Field Apps

@nwhittaker nwhittaker 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 May 10, 2024
@github-actions github-actions bot added p3 - want for upcoming milestone calcite-components Issues specific to the @esri/calcite-components package. ArcGIS Field Apps Issues logged by ArcGIS Field Apps team members. labels May 10, 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 p - low Issue is non core or affecting less that 10% of people using the library estimate - 8 Requires input from team, consider smaller steps. needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. and removed needs triage Planning workflow - pending design/dev review. labels May 28, 2024
@jcfranco
Copy link
Member

Picking this one up since I found out the cause of this while working on #9018. I think this one is doable for this upcoming release. cc @geospatialem

@jcfranco jcfranco self-assigned this Jul 26, 2024
@jcfranco jcfranco added 1 - assigned Issues that are assigned to a sprint and a team member. and removed 0 - new New issues that need assignment. labels Jul 26, 2024
@jcfranco jcfranco added this to the 2024-07-30 - Jul Release milestone Jul 26, 2024
@jcfranco jcfranco added 2 - in development Issues that are actively being worked on. and removed 1 - assigned Issues that are assigned to a sprint and a team member. labels Jul 26, 2024
@geospatialem geospatialem removed the needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. label Jul 30, 2024
@geospatialem
Copy link
Member

Reallocated to August for additional testing and follow-up! 💪🏻

jcfranco added a commit that referenced this issue Aug 14, 2024
… properly (#9958)

**Related Issue:** #9641, #9315

## Summary

This addresses some issues that prevented `beforeOpen`/`open` and
`beforeClose`/`close` events from emitting as expected.

### Notable changes:

* Removes redundant/unused transitions in favor of ones used for
open/close transitions
* Updates `input-date-picker` to set `open` via a prop instead of a
attribute to avoid the transition starting before
`onToggleOpenCloseComponent` was called. We could refactor this if
`popover` and similar components use a different, internal, attribute to
control transitions.
* Updates tests that would now have a transition when opening/closing
* Remove unnecessary `OpenCloseComponent` implementation from
`input-time-picker` as it can delegate to the internal `popover`.
* Updates `block` to use on margin transition to determine when it is
open or closed. I will create a refactor issue to refactor the
open/close transition, focusing on the content, and will update the
implementation to use this instead.
* Refactored `notice`'s styles to properly transition when
opened/closed.
* Added missing `openClose` tests to `sheet` and `tooltip` E2E test
suites.
* Added option to `openClose` test helper for tests that are expected to
use the fallback due to the normal transition start/end events not being
able to fire properly.
* Improved `openClose` test helper to consider timing between
beforeOpen/Close and open/close events.
* Fixed `whenTransitionOrAnimationDone` issue that prevented the correct
duration to be associated with the open/close transition.
@jcfranco jcfranco added 3 - installed Issues that have been merged to master branch and are ready for final confirmation. and removed 2 - in development Issues that are actively being worked on. labels Aug 14, 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 15, 2024
@github-actions github-actions bot added the p3 - want for upcoming milestone User set priority status of p3 - want for upcoming milestone label Sep 5, 2024
@nwhittaker
Copy link
Contributor Author

@DitwanP, can we reopen this issue? I'm not seeing any change in behavior in your codepen nor 2.12.1 when I use the toggle buttons to open/close the time zone dropdown:

Screenshot 2024-09-05 at 10 50 56 AM

@geospatialem
Copy link
Member

@DitwanP, can we reopen this issue? I'm not seeing any change in behavior in your codepen nor 2.12.1 when I use the toggle buttons to open/close the time zone dropdown:

Screenshot 2024-09-05 at 10 50 56 AM

Confirmed the above is not mitigated in 2.12.1 - reopening and will assign to a milestone soon.

@geospatialem geospatialem reopened this Sep 5, 2024
@geospatialem geospatialem added 0 - new New issues that need assignment. and removed 4 - verified Issues that have been released and confirmed resolved. labels Sep 5, 2024
@geospatialem geospatialem added p - medium Issue is non core or affecting less that 60% of people using the library needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. and removed p - low Issue is non core or affecting less that 10% of people using the library labels Sep 5, 2024
@geospatialem geospatialem removed this from the 2024-08-27 - Aug Release milestone Sep 5, 2024
@jcfranco jcfranco added 2 - in development Issues that are actively being worked on. and removed 0 - new New issues that need assignment. labels Sep 5, 2024
@jcfranco jcfranco self-assigned this Sep 5, 2024
@jcfranco jcfranco added this to the 2.12.2 patch milestone Sep 5, 2024
@jcfranco jcfranco removed the needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. label Sep 5, 2024
@jcfranco jcfranco added 3 - installed Issues that have been merged to master branch and are ready for final confirmation. and removed 2 - in development Issues that are actively being worked on. labels Sep 9, 2024
@github-actions github-actions bot assigned geospatialem and DitwanP and unassigned jcfranco Sep 9, 2024
Copy link
Contributor

github-actions bot commented Sep 9, 2024

Installed and assigned for verification.

@geospatialem geospatialem 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 Sep 9, 2024
@geospatialem
Copy link
Member

Verified in 2.12.2-next.1 with JavaScript (via the codepen sample), accessing the component via mouse and keyboard. 🎉

image

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. ArcGIS Field Apps Issues logged by ArcGIS Field Apps 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. estimate - 8 Requires input from team, consider smaller steps. impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone p - medium Issue is non core or affecting less that 60% of people using the library p3 - want for upcoming milestone User set priority status of p3 - want for upcoming milestone
Projects
None yet
Development

No branches or pull requests

4 participants