-
Notifications
You must be signed in to change notification settings - Fork 400
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
#10136: Search for Map CRS coordinates #10220
Conversation
Description: - handle current map CRS coordinate search - Add new component for current map CRS coordinates search - create a util function for getting extent based on extent to validate the mapCRS extent in case of seach by mapCRS coords - write some unit tests accroding the new added code + changes
Description: - add translations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mahmoudadel54
Kindly fix the following as some are deviating from requirement, and I shall resume the reviewing once the following are amended. Thanks!
web/client/components/mapcontrols/searchcoordinates/CurrentMapCRSCoordSearch.js
Outdated
Show resolved
Hide resolved
Description: - resolve review comments - handle projection bounds range
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mahmoudadel54 I don't see any new commit since the last review but requested for a re-review. Kindly check if you have missed to commit your new changes
@mahmoudadel54 Some unit tests are failing in |
Description: - fix FE failure by creating a custom component for DecimalCoordinateEditorSearch
Description: - revert change in DecimalCoordinateEditor file to keep it as it is in MS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mahmoudadel54
Kindly look into these issues. Thanks!
- UI agreed in the issue shows x and y. Interchange the fields
- 0,0 is not considered as valid value even when it falls within crs limits
- with CRS search performed, logout and loggin back to map, the app crashes
crs_search_crash.mp4
- Mouse pointer showing x value doesn't match with user input on the marker placed by the crs search. Projection used
EPSG:2154
. Kindly check why the difference
- Unable to edit X or Y value when the value is near limits of the CRS
limit-edit.mp4
web/client/components/misc/coordinateeditors/editors/DecimalCoordinateEditorSearch.jsx
Outdated
Show resolved
Hide resolved
Description: - resolve review comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mahmoudadel54
Kindly look into these issues
-
Looks like the limit validation is broken, as I can enter value beyond crs limits now. I can see error shown but this behavior is not similar to how coordinate search field validation works. It limits user from entering the value beyond the bound
-
Able to enter 0,0 but CRS search is not performed
0_0_issue.mp4
Description: - resolve review comments - fix issue of not zooming to 0,0 for map crs option - don't allow to change coords inputs beyond the allowable crs extent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mahmoudadel54
Kindly look into these,
-
In some case, on changing search to CRS, Y field is cleared and unable to enter value in the field
field_issue.mp4
-
Even with valid coordinates the marker is cleared on the map, on switching to CRS search
marker_cleared.mp4
Hi @tdipisa @dsuren1 The reason why clearing the input is the validation of the entered values based on the map crs extent range:
I previously implement this point mentioned here: #10220 (review) by validating the entered data but with allowing showing the entered input value with showing a red border outline around the not valid like the empty inputs validation. What I think is allow out of range, I will highlight the input with red border and showing an error message with that to differentiate bet. out of range case and empty input case |
@tdipisa @mahmoudadel54 |
The tool should't prevent the user from entering a number in any case, of course, and it isn't also acceptable that the user needs to copy and paste an entire value because that would make the tool unusable @mahmoudadel54 |
@mahmoudadel54 |
Description: - resolve review comments
Fixing milestone from 2024.01.00 to 2024.01.01, accordingly to the issue. |
Description: - handle localization into onFocus event in CRS coordinate editor
Description: - remove util function and its test and add its logic to onFocus function directly to fix FE failure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mahmoudadel54
The requirements of the current issue seem to be functioning properly as of this commit. However, the cursor position issue originates from the Localized number field component and addressing it within this pull request is proving to be time-consuming. Additionally, a regression-free fix at this point is not guaranteed. Therefore, I have created a separate issue to handle it.
Kindly revert your changes pertaining to the number field, formatting etc i.e up until this commit and keep any changes from this comment
Thank you @dsuren1. @mahmoudadel54 once you have done with this you can keep #10289 as part of your backlog |
Description: - revert changes of onFocus, onBlur for IntlNumberFormControl
Description: - fix issue in lon field
@ElenaGallo Kindly test it in DEV and please factor in this comment while testing. Thanks! |
@mahmoudadel54 1.mp42_ Switching between CRS CURRENT MAP and SEARCH BY BOOKMARK the mark on the map does not disappear 2.mp4 |
Hi @ElenaGallo test.change.values.in.switch.mp4For the 2nd point, I think it has the same behavior if you switch from lon/lat coordinates to bookmark which means it is preexisting. Should I handle this scenario on both coordinate search [lon/lat and X/Y] ? |
Point 1
Point 2 |
@ElenaGallo Previously, I made round for the X/Y numbers with 4 digits after the sign (e.g 1.9999 to 2.0000) and it was reviewed to remove this rounding : #10220 (comment) |
yes please, since it is a preexisting bug unrelated to this PR. Link me the issue once you have created it. Thank you.
It is happening on DEV but it is simply a matter of how the number is rounded, I think. In theory we should restore it to the exact value the client entered initially but, in any case, a minimum variation within an acceptable threshold is good. Any thoughts @dsuren1 @mahmoudadel54? Can we restore the exact value provided by the user with a really short effort? |
@tdipisa @mahmoudadel54 Do you think you can do it quickly? If you think it would take more effort, then I'm inclined to agree with @tdipisa's point of a minimum variation within an acceptable threshold is good i.e in the fractional 0.00001 or lesser |
Test passed, @mahmoudadel54 please backport to 2024.01.xx. Thanks |
…t#10220) * geosolutions-it#10136: Search for Map CRS coordinates Description: - handle current map CRS coordinate search - Add new component for current map CRS coordinates search - create a util function for getting extent based on extent to validate the mapCRS extent in case of seach by mapCRS coords - write some unit tests accroding the new added code + changes * geosolutions-it#10136: Search for Map CRS coordinates Description: - add translations * geosolutions-it#10136: Search for Map CRS coordinates Description: - resolve review comments - handle projection bounds range * geosolutions-it#10136: Search for Map CRS coordinates Description: - fix FE failure by creating a custom component for DecimalCoordinateEditorSearch * geosolutions-it#10136: Search for Map CRS coordinates Description: - revert change in DecimalCoordinateEditor file to keep it as it is in MS * geosolutions-it#10136: Search for Map CRS coordinates Description: - resolve review comments * geosolutions-it#10136: Search for Map CRS coordinates Description: - resolve review comments - fix issue of not zooming to 0,0 for map crs option - don't allow to change coords inputs beyond the allowable crs extent * geosolutions-it#10136: Search for Map CRS coordinates Description: - resolve review comments * geosolutions-it#10136: Search for Map CRS coordinates Description: - fix clearing marker in switch to different crs * geosolutions-it#10136: Search for Map CRS coordinates Description: - fix issue in switch to aeronautical inputs then switch to map crs coord search * geosolutions-it#10136: Search for Map CRS coordinates Description: - resolve review comments * geosolutions-it#10136: Search for Map CRS coordinates Description: - resolve review comments * geosolutions-it#10136: Search for Map CRS coordinates Description: - resolve jumping cursor to last number in input number in change - Rename component to CRSCoordinateEditor * geosolutions-it#10136: Search for Map CRS coordinates Description: - handle localization into onFocus event in CRS coordinate editor * geosolutions-it#10136: Search for Map CRS coordinates Description: - remove util function and its test and add its logic to onFocus function directly to fix FE failure * geosolutions-it#10136: Search for Map CRS coordinates Description: - revert changes of onFocus, onBlur for IntlNumberFormControl * geosolutions-it#10136: Search for Map CRS coordinates Description: - fix issue in lon field
|
…#10305) (#10317) * #10136: Search for Map CRS coordinates (#10220) * #10136: Search for Map CRS coordinates Description: - handle current map CRS coordinate search - Add new component for current map CRS coordinates search - create a util function for getting extent based on extent to validate the mapCRS extent in case of seach by mapCRS coords - write some unit tests accroding the new added code + changes * #10136: Search for Map CRS coordinates Description: - add translations * #10136: Search for Map CRS coordinates Description: - resolve review comments - handle projection bounds range * #10136: Search for Map CRS coordinates Description: - fix FE failure by creating a custom component for DecimalCoordinateEditorSearch * #10136: Search for Map CRS coordinates Description: - revert change in DecimalCoordinateEditor file to keep it as it is in MS * #10136: Search for Map CRS coordinates Description: - resolve review comments * #10136: Search for Map CRS coordinates Description: - resolve review comments - fix issue of not zooming to 0,0 for map crs option - don't allow to change coords inputs beyond the allowable crs extent * #10136: Search for Map CRS coordinates Description: - resolve review comments * #10136: Search for Map CRS coordinates Description: - fix clearing marker in switch to different crs * #10136: Search for Map CRS coordinates Description: - fix issue in switch to aeronautical inputs then switch to map crs coord search * #10136: Search for Map CRS coordinates Description: - resolve review comments * #10136: Search for Map CRS coordinates Description: - resolve review comments * #10136: Search for Map CRS coordinates Description: - resolve jumping cursor to last number in input number in change - Rename component to CRSCoordinateEditor * #10136: Search for Map CRS coordinates Description: - handle localization into onFocus event in CRS coordinate editor * #10136: Search for Map CRS coordinates Description: - remove util function and its test and add its logic to onFocus function directly to fix FE failure * #10136: Search for Map CRS coordinates Description: - revert changes of onFocus, onBlur for IntlNumberFormControl * #10136: Search for Map CRS coordinates Description: - fix issue in lon field * #10136: Search for Map CRS coordinates (#10305) * #10136: Search for Map CRS coordinates Description: - resolve a threshold in CRS coordinate in switch * #10136: Search for Map CRS coordinates Description: - resolve not update the X/Y coods in case switch between map crs by storing the currentMapCRS into coordinate object
Description
In this PR, the Map CRS coordinate search functionality is implemented. If the curent map CRS is different than
EPSG:4326
a sub menu will be added to search menu and it will include the current map CRS option. Validation of CRS extent, zoom to point are implemented.Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (check one with "x", remove the others)
Issue
#10136
What is the current behavior?
#10136
What is the new behavior?
User now can apply map CRS coordinate search based on the CRS.
Breaking change
Does this PR introduce a breaking change? (check one with "x", remove the other)
Other useful information
These are the changes added to this PR: