Skip to content

fix #9367 review of geo processing tool#9351

Merged
offtherailz merged 17 commits intogeosolutions-it:masterfrom
MV88:9263_fix_highlight_interaction
Sep 20, 2023
Merged

fix #9367 review of geo processing tool#9351
offtherailz merged 17 commits intogeosolutions-it:masterfrom
MV88:9263_fix_highlight_interaction

Conversation

@MV88
Copy link
Copy Markdown
Contributor

@MV88 MV88 commented Aug 22, 2023

Description

fixed

not including complete refactor of the logic to get more abstracted processes, this will be done here #9398

Please check if the PR fulfills these requirements

What kind of change does this PR introduce? (check one with "x", remove the others)

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

Issue

What is the current behavior?

fix #9367

What is the new behavior?

Breaking change

Does this PR introduce a breaking change? (check one with "x", remove the other)

  • Yes, and I documented them in migration notes
  • No

Other useful information

@MV88 MV88 requested a review from allyoucanmap August 22, 2023 13:49
@MV88 MV88 self-assigned this Aug 22, 2023
@MV88 MV88 requested review from offtherailz and removed request for allyoucanmap August 24, 2023 09:44
@MV88 MV88 mentioned this pull request Aug 25, 2023
12 tasks
Copy link
Copy Markdown
Member

@offtherailz offtherailz left a comment

Choose a reason for hiding this comment

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

screencast-dev-mapstore.geosolutionsgroup.com-2023.08.29-11_55_01.webm

I tried to switch to buffer, but I don't see any improvement. The 2nd feature remains highlighted.

If it is not a strict requirement, I think that when switching the tool from buffer to intersection and viceversa, we could simply reset the full status, including the selection.
In fact the presence of a field with a feature to select depends on the tool, and it is only a case that the 2 tools shares a feature to select as first element.
What do you thing @tdipisa ? I'm not fully aware if it is a requirement or not.

@tdipisa tdipisa mentioned this pull request Aug 29, 2023
6 tasks
@tdipisa tdipisa added this to the 2023.02.00 milestone Aug 29, 2023
@tdipisa tdipisa added the bug label Aug 29, 2023
@tdipisa
Copy link
Copy Markdown
Member

tdipisa commented Aug 29, 2023

@MV88 @offtherailz I agree with that

If it is not a strict requirement, I think that when switching the tool from buffer to intersection and viceversa, we could simply reset the full status, including the selection.
In fact the presence of a field with a feature to select depends on the tool, and it is only a case that the 2 tools shares a feature to select as first element.

In addition I've created a new issue (#9367) to capture also other things I've notified.

@MV88
Copy link
Copy Markdown
Contributor Author

MV88 commented Sep 4, 2023

screencast-dev-mapstore.geosolutionsgroup.com-2023.08.29-11_55_01.webm
I tried to switch to buffer, but I don't see any improvement. The 2nd feature remains highlighted.

idk what have you tested exactly but in my local branch it works.

anyway i'll check internal comments and related feedbacks made here #9367

@MV88 MV88 changed the title fix #9263 highlight interaction fix #9367 highlight interaction and other points Sep 7, 2023
@MV88 MV88 requested a review from offtherailz September 7, 2023 14:56
@MV88 MV88 changed the title fix #9367 highlight interaction and other points fix #9367 review of geo processing tool Sep 7, 2023
Copy link
Copy Markdown
Member

@tdipisa tdipisa left a comment

Choose a reason for hiding this comment

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

@MV88

I think something similar to this would be nicer and coherent for this tool

image

or this

image

Copy link
Copy Markdown
Member

@offtherailz offtherailz left a comment

Choose a reason for hiding this comment

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

Here my review. Some issues found

Tested using http://localhost:8081/#/context/geoprocessing_rev/45727

  • As you can see the layers are still unconsistent. Running twice the process, we have 2 groups. The two group seem to have the same ID, because when you try to select one, the second is selected too. This doesn't happen with Buffered layer. I'd suggest to use only one group named "Geoprocessing Outputs" to use as target group for all the layers. What do you think?
    double_layer.webm

  • When you close the panel afte the selction, the interaction with the tool is still active.

closing_click_map.webm
  • Trying the tool I had a crash
crash.webm

This is the log:

Error in epic "zoomToExtentEpic". Original error: TypeError: coordinates must be finite numbers
    at checkCoord (checkSanity.js:14:11)
    at __WEBPACK_DEFAULT_EXPORT__ (checkSanity.js:6:3)
    at Function.transform (transform.js:27:56)
    at Object.reproject (CoordinatesUtils.js:248:158)
    at reprojectBbox (CoordinatesUtils.js:481:42)
    at eval (Map.jsx:276:92)
    at SwitchMapSubscriber.eval [as project] (map.js:206:7)
    at SwitchMapSubscriber._next (switchMap.js:88:27)
    at Subscriber.next (Subscriber.js:89:18)
    at FilterSubscriber._next (filter.js:88:30)
    at Subscriber.next (Subscriber.js:89:18)
    at MapSubscriber._next (map.js:83:26)
    at Subscriber.next (Subscriber.js:89:18)
    at FilterSubscriber._next (filter.js:88:30)
    at Subscriber.next (Subscriber.js:89:18)
    at WithLatestFromSubscriber._next (withLatestFrom.js:113:34)
overrideMethod @ console.js:213
eval @ EpicsUtils.js:28
CatchSubscriber.error @ catch.js:104
Subscriber._error @ Subscriber.js:128
[...]

EpicsUtils.js:31 Uncaught TypeError: coordinates must be finite numbers
    at checkCoord (checkSanity.js:14:11)
    at __WEBPACK_DEFAULT_EXPORT__ (checkSanity.js:6:3)
    at Function.transform (transform.js:27:56)
    at Object.reproject (CoordinatesUtils.js:248:158)
    at reprojectBbox (CoordinatesUtils.js:481:42)
    at eval (Map.jsx:276:92)
    at SwitchMapSubscriber.eval [as project] (map.js:206:7)
    at SwitchMapSubscriber._next (switchMap.js:88:27)
    at Subscriber.next (Subscriber.js:89:18)
    at FilterSubscriber._next (filter.js:88:30)
    at Subscriber.next (Subscriber.js:89:18)
    at MapSubscriber._next (map.js:83:26)
    at Subscriber.next (Subscriber.js:89:18)
    at FilterSubscriber._next (filter.js:88:30)
    at Subscriber.next (Subscriber.js:89:18)
    at WithLatestFromSubscriber._next (withLatestFrom.js:113:34)
checkCoord @ checkSanity.js:14
__WEBPACK_DEFAULT_EXPORT__ @ checkSanity.js:6
transform @ transform.js:27
reproject @ CoordinatesUtils.js:248
reprojectBbox @ CoordinatesUtils.js:481
eval @ Map.jsx:276
[...]
  • I see advanced options are not understandable.
    image
    This is because you used the descriptions of the process options without using the name. This is conusing. "Indicates" what indicates ?
    image
    I suggest to use the name as label. If we want a better description, add a tooltip with the description of the field.

Summarizing the points in the #9367 , here I list them providing the current status. Please correct me if I'm wrong somewhere

  1. It seems all times I try to use the Intersection process, the tool returns the same error. This need to be investigated PENDING
    • I understood it is probably due to the process and still to investigate. So this will not be part of the PR. Should we open an issue for that?
  2. There is no need to have the validation icon clickable as a button. FIXED.
  3. Let's use simply GeoProcessing and Select the process to use FIXED
  4. One of the main goal of a tool should be to display the result clearly without letting the user to find it. It is not the case here [...]
    • Both Buffer and intersection layers are appended in TOC and for this reason they are not visible - FIXED now they are on top FIXED
    • Changing the style of the generated layer to yellow-orange. FIXED
    • At the end of the process the map should zoom to the interested area covered by the geometry produced by the process. At the same time the layer should have a good default style to properly highlight it and make it more evident. FIXED the zoom is done, the style changed.
  5. Tow consecutive runs of the same process generate an inconsistent behavior in TOC. STILL TO BE PROPERLY FIXED
  6. When selecting the layer result of a process, the "zoom to" doesn't appear in TOC toolbar but it should be. FIXED
  7. A more coherent tool icon must be created FIXED -- @tdipisa the layer with "i" has been used. Did you sync on this?
  8. If you click on the tool icon with the catalog tool opened the tool's panel is not visible. Visibility rules and thees kind of interactions must be better managed WONT DO - This requires a window manager for mapstore
  9. Typo to be fixed for the following notification message FIXED
  10. As I indicated [...] IN PROGRESS something is done in this PR, something have to be done in a separate issue.

So point 1 and 8 are remaining, but they need to be done separately.
Please also cinfirm me the point about the icon.

@MV88
Copy link
Copy Markdown
Contributor Author

MV88 commented Sep 15, 2023

Tested using http://localhost:8081/#/context/geoprocessing_rev/45727

Hi, can you provide the exported map/context and/or save it on dev?

  1. it seems all times I try to use the Intersection process, the tool returns the same error. This need to be investigated PENDING
    I understood it is probably due to the process and still to investigate. So this will not be part of the PR. Should we open an issue for that?

addressed here https://github.com/geosolutions-it/MapStore-C265/issues/20

  1. Two consecutive runs of the same process generate an inconsistent behavior in TOC. STILL TO BE PROPERLY FIXED

fixed, it will add in the same group now, two different groups. didn't want to change this now

  1. If you click on the tool icon with the catalog tool opened the tool's panel is not visible. Visibility rules and thees kind of interactions must be better managed WONT DO - This requires a window manager for mapstore

this is done within PR, when you have the geo processing tool opened, and you open the catalog, the geoprocess tool gets closed

  1. A more coherent tool icon must be created FIXED -- @tdipisa the layer with "i" has been used. Did you sync on this?

i propose this
image

Trying the tool I had a crash

I cannot replicate this, and seems strange on the video itself, are there any steps that replicates this any time, maybe issue is data related

* add unregister of click event, when closing the tool
* changed icon
* add tooltips and changed labels for advanced settings
# Conflicts:
#	web/client/themes/default/icons.less
#	web/client/themes/default/icons/icons.eot
#	web/client/themes/default/icons/icons.svg
#	web/client/themes/default/icons/icons.ttf
#	web/client/themes/default/icons/icons.woff
#	web/client/themes/default/icons/icons.woff2
@MV88 MV88 added the BackportNeeded Commits provided for an issue need to be backported to the milestone's stable branch label Sep 15, 2023
@tdipisa tdipisa self-requested a review September 18, 2023 08:31
Copy link
Copy Markdown
Member

@offtherailz offtherailz left a comment

Choose a reason for hiding this comment

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

When posting an incomplete review fix, it could be a good practice ( sometimes happens also to me to forget) to summarize what is missing, and why, and what has been ackieved to be changed.

Here the issues I noticed.

  • If you run a process, click on home, get back in instory and re-open the panel ,the panel contains the old setting. I suppose this is not a desired behavior. I noticed this while trying to replicate the crash.

  • I noticed that on panel close I have an error in console

EpicsUtils.js:28 Error in epic "toggleHighlightLayersOnOpenCloseGPTEpic". Original error: TypeError: You provided an invalid object where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.
    at Object.subscribeToResult (subscribeToResult.js:73:27)
    at MergeAllSubscriber._next (mergeAll.js:85:42)
    at Subscriber.next (Subscriber.js:89:18)
    at ArrayObservable._subscribe (ArrayObservable.js:114:28)
    at Observable._trySubscribe (Observable.js:57:25)
    at Observable.subscribe (Observable.js:45:27)
    at MergeAllOperator.call (mergeAll.js:63:23)
    at Observable.subscribe (Observable.js:42:22)
    at Observable._subscribe (Observable.js:113:28)
    at Observable._trySubscribe (Observable.js:57:25)
    at Observable.subscribe (Observable.js:45:27)
    at Object.subscribeToResult (subscribeToResult.js:22:27)
    at SwitchMapSubscriber._innerSub (switchMap.js:101:63)
    at SwitchMapSubscriber._next (switchMap.js:94:14)
    at Subscriber.next (Subscriber.js:89:18)
    at FilterSubscriber._next (filter.js:88:30)
screencast-github.com-2023.09.18-14_34_42.webm

I noticed that this is caused by the layer bbox.bounds is for some reason:

maxx: -Infinity
maxy: -Infinity
minx: Infinity
miny: Infinity

* reset of state when location change or reset controls happen
* fix crash for invalid bbox, was based on wrong state
* fix undergister of cliek event
@MV88 MV88 requested a review from offtherailz September 18, 2023 20:20
@MV88
Copy link
Copy Markdown
Contributor Author

MV88 commented Sep 18, 2023

When posting an incomplete review fix, it could be a good practice ( sometimes happens also to me to forget) to summarize what is missing, and why, and what has been ackieved to be changed.

ACKNOWLEDGED will better do this

Here the issues I noticed.

  • If you run a process, click on home, get back in instory and re-open the panel ,the panel contains the old setting. I suppose this is not a desired behavior. I noticed this while trying to replicate the crash.

FIXED this issue has been fixed reducer side

  • I noticed that on panel close I have an error in console

FIXED there was a typo in the epic,

FIXED on reducer side because when you were selecting the intersection layer having activated the draw with source you ended up updating the wrong piece of state

All the rest of the points were done in previous iteration of code reviews

@tdipisa tdipisa requested review from tdipisa and removed request for tdipisa September 19, 2023 12:56
@offtherailz offtherailz enabled auto-merge (squash) September 19, 2023 13:10
@MV88 MV88 removed the request for review from tdipisa September 19, 2023 15:04
@offtherailz offtherailz requested a review from tdipisa September 20, 2023 08:13
@offtherailz offtherailz requested review from tdipisa and removed request for tdipisa September 20, 2023 08:51
@offtherailz offtherailz merged commit 8deccc2 into geosolutions-it:master Sep 20, 2023
@ElenaGallo
Copy link
Copy Markdown
Contributor

ElenaGallo commented Sep 22, 2023

@MV88 @tdipisa

1_ In Advanced Settings, the option names are incorrect and are not translated correctly.

translation.mp4

@tdipisa
Copy link
Copy Markdown
Member

tdipisa commented Sep 22, 2023

@ElenaGallo please open a new issue for the above, we can manage that separately for 2023.02.00 and backport this in the meantime. Thank you so much.

@ElenaGallo
Copy link
Copy Markdown
Contributor

@tdipisa New issue here: #9474
@MV88 please backport this to stable branch. Thanks

MV88 added a commit to MV88/MapStore2 that referenced this pull request Sep 25, 2023
…it#9351)

# Conflicts:
#	web/client/themes/default/icons.less
#	web/client/themes/default/icons/icons.eot
#	web/client/themes/default/icons/icons.svg
#	web/client/themes/default/icons/icons.ttf
#	web/client/themes/default/icons/icons.woff
#	web/client/themes/default/icons/icons.woff2
tdipisa pushed a commit that referenced this pull request Sep 26, 2023
# Conflicts:
#	web/client/themes/default/icons.less
#	web/client/themes/default/icons/icons.eot
#	web/client/themes/default/icons/icons.svg
#	web/client/themes/default/icons/icons.ttf
#	web/client/themes/default/icons/icons.woff
#	web/client/themes/default/icons/icons.woff2
@tdipisa tdipisa removed the BackportNeeded Commits provided for an issue need to be backported to the milestone's stable branch label Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GeoProcessing tool review

4 participants