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

making popper dissapear on esc click #1869

Conversation

cphelefu
Copy link
Contributor

@cphelefu cphelefu commented Feb 27, 2024

Description

This PR does two things;

  • Make Popper dissapear when user click ESC key.
  • Disable clicking layers when they are in loading mode.

Fixes #1870

https://cphelefu.github.io/geoview

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.

Checklist:

  • I have build (rush build) and deploy (rush host) my PR
  • I have connected the issues(s) to this PR
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have created new issue(s) related to the outcome of this PR is needed
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

This change is Reviewable

@cphelefu cphelefu requested a review from jolevesq February 28, 2024 04:14
@cphelefu cphelefu marked this pull request as ready for review February 28, 2024 04:14
@cphelefu cphelefu force-pushed the make-popper-dissapear-on-esc branch from 391628f to 4ce3c9f Compare February 28, 2024 14:47
Copy link
Member

@jolevesq jolevesq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 3 of 4 files at r1, 2 of 3 files at r2, all commit messages.
Reviewable status: 3 of 4 files reviewed, 2 unresolved discussions (waiting on @cphelefu)


packages/geoview-core/src/ui/popper/popper.tsx line 1 at r1 (raw file):

/* eslint-disable react/function-component-definition */

REmove global eslint comment and add a line disable


packages/geoview-core/src/ui/popper/popper.tsx line 19 at r1 (raw file):

  useEffect(() => {
    const handleEscapeKey = (event: KeyboardEvent) => {

Add a TODO: refactor... this process of escape - going back to caller should be implemented globally

@cphelefu
Copy link
Contributor Author

packages/geoview-core/src/ui/popper/popper.tsx line 19 at r1 (raw file):

Previously, jolevesq (Johann Levesque) wrote…

Add a TODO: refactor... this process of escape - going back to caller should be implemented globally

Hmm, not sure if we want to do that. Its specific to this method. Where would we put it globally?

Copy link
Contributor Author

@cphelefu cphelefu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 2 of 4 files reviewed, 2 unresolved discussions (waiting on @jolevesq)


packages/geoview-core/src/ui/popper/popper.tsx line 1 at r1 (raw file):

Previously, jolevesq (Johann Levesque) wrote…

REmove global eslint comment and add a line disable

Done.

Copy link
Member

@jolevesq jolevesq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 2 of 2 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @cphelefu)


packages/geoview-core/src/ui/popper/popper.tsx line 19 at r1 (raw file):

Previously, cphelefu (Christopher Phelefu) wrote…

Hmm, not sure if we want to do that. Its specific to this method. Where would we put it globally?

The esc key should be dealt globally. UI should keep track of focus component. We will do this as part pf another issue.

@jolevesq jolevesq merged commit f47c139 into Canadian-Geospatial-Platform:develop Feb 28, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] <Disable clicking layers when they are in loading mode.
2 participants