Skip to content

ERA-10349: Support EFB schemas in ER > Location Field [3] #1268

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

Merged
merged 2 commits into from
Mar 31, 2025
Merged

Conversation

luixlive
Copy link
Contributor

What does this PR do?

Fix bug when pressing escape while choosing location

@@ -147,20 +148,21 @@ const SideBar = () => {
}
}, [sidebarOpen, currentTab, socket, isReportDetailsViewActive]);

// NOTE: This is getting unmaintainable. Is it really a good practice to use escape like a navigation key?
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This feature has been causing many issues since we added it. This useEffect adds a key down listener in the SideBar to navigate back if Escape is pressed. I wonder if it's worth it to keep adding patches everytime we find a new unwanted side effect this is adding. Pressing Escape to navigate is not common. I know that key is used to close views, and given our navigation is related to a SideBar it kind of makes sense to expect the side bar to close when pressing it. But our SideBar is not just a presentational element to close, its tabs and its items are connected to the router, causing the mentioned side effects like the one I'm fixing it when pressing escape while picking a location in the map.

@luixlive luixlive merged commit 412989a into develop Mar 31, 2025
3 checks passed
@luixlive luixlive deleted the ERA-10349 branch March 31, 2025 16:13
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.

2 participants