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

#10264: Fix - Layer visibility limits may prevent the Info panel of search results from opening #10325

Merged
merged 6 commits into from
May 17, 2024

Conversation

mahmoudadel54
Copy link
Collaborator

@mahmoudadel54 mahmoudadel54 commented May 15, 2024

Description

In this PR:

  • handle showing feature info in case of search within single layer, all layers or plus map-query-parameters actions is implemented
  • edit featureInfoClick action creator by passing an optional param called 'layerWithIgnoreVisibilityLimits' to enforce it to queryable layers if not exist due to visibility limits

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

#10264

What is the current behavior?
#10264

What is the new behavior?
If the layer has a limited visibility like showing features from a specific scale level, and user searches for an existing feature into the searched layer while the hidden scale level ---> if the feature is existing, it will open the info panel showing the feature info data

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

…anel of search results from opening [resolve review comments]

Description:
- edit featureInfoClick action creator by passing an optional param called 'layerWithIgnoreVisibilityLimits' to enforce it to querable layers if not exist due to visibility limits
- handle showing feature info in case of search within single layer or All layers
…anel of search results from opening [resolve review comments]

Description:
- handle showing feature info in case of action in queryParameters
…anel of search results from opening [resolve review comments]

Description:
- add missing check on the layer with ignoring visibility limits of making sure it is queryable
- fix FE failure test
@dsuren1 dsuren1 changed the title #10264: Layer visibility limits may prevent the Info panel of search results from opening [fix missing implementation] #10264: Layer visibility limits may prevent the Info panel of search results from opening May 16, 2024
@dsuren1 dsuren1 changed the title #10264: Layer visibility limits may prevent the Info panel of search results from opening #10264: Fix - Layer visibility limits may prevent the Info panel of search results from opening May 16, 2024
Copy link
Contributor

@dsuren1 dsuren1 left a comment

Choose a reason for hiding this comment

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

@mahmoudadel54

  • Missing unit tests

  • Selected layer is not queried

    incorrect_selected_layer.mp4
  • With All Layers as info launch panel option, only one layer is shown in GFI panel. (same with queryparam search)

    all_layers_incorrect.mp4

web/client/actions/mapInfo.js Outdated Show resolved Hide resolved
web/client/epics/search.js Outdated Show resolved Hide resolved
if (!queryableLayersIgnoreingVisiblimits && layer && defaultQueryableFilter(layer)) {
queryableLayers = [...queryableLayers, layer];
}
const isLayerNotQueryableSelected = queryableLayers.filter(l => l.name === name ).length === 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const isLayerNotQueryableSelected = queryableLayers.filter(l => l.name === name ).length === 0;
const isLayerNotQueryableSelected = queryableLayers.filter(l => l.name === name).length === 0;

web/client/epics/identify.js Outdated Show resolved Hide resolved
web/client/epics/identify.js Outdated Show resolved Hide resolved
…anel of search results from opening [resolve review comments]

Description:
- add unit tests
- fix handling search for layers has visibility limits
…anel of search results from opening [resolve review comments]

Description:
- fix unit test
Copy link
Contributor

@dsuren1 dsuren1 left a comment

Choose a reason for hiding this comment

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

@mahmoudadel54
Kindly amend this and we should be good to merge

web/client/epics/identify.js Outdated Show resolved Hide resolved
…anel of search results from opening [resolve review comments]

Description:
- add reserve to querable layers in identify file to keep the same sort of toc layers in case of 'ignoreVisibilityLimits'
- edit unit test based on the change
@dsuren1 dsuren1 merged commit 13fe763 into geosolutions-it:master May 17, 2024
6 checks passed
@dsuren1 dsuren1 added BackportNeeded Commits provided for an issue need to be backported to the milestone's stable branch and removed Backport labels May 17, 2024
@dsuren1
Copy link
Contributor

dsuren1 commented May 17, 2024

@ElenaGallo Kindly test it in DEV and let us know if it's good to be backported. Thanks!

@ElenaGallo
Copy link
Contributor

Test passed, @mahmoudadel54 please backport to 2024.01.xx. Thanks

mahmoudadel54 added a commit to mahmoudadel54/MapStore2 that referenced this pull request May 20, 2024
…Info panel of search results from opening (geosolutions-it#10325)

* geosolutions-it#10264: Layer visibility limits may prevent the Info panel of search results from opening [resolve review comments]
Description:
- edit featureInfoClick action creator by passing an optional param called 'layerWithIgnoreVisibilityLimits' to enforce it to querable layers if not exist due to visibility limits
- handle showing feature info in case of search within single layer or All layers

* geosolutions-it#10264: Layer visibility limits may prevent the Info panel of search results from opening [resolve review comments]
Description:
- handle showing feature info in case of action in queryParameters

* geosolutions-it#10264: Layer visibility limits may prevent the Info panel of search results from opening [resolve review comments]
Description:
- add missing check on the layer with ignoring visibility limits of making sure it is queryable
- fix FE failure test

* geosolutions-it#10264: Layer visibility limits may prevent the Info panel of search results from opening [resolve review comments]
Description:
- add unit tests
- fix handling search for layers has visibility limits

* geosolutions-it#10264: Layer visibility limits may prevent the Info panel of search results from opening [resolve review comments]
Description:
- fix unit test

* geosolutions-it#10264: Layer visibility limits may prevent the Info panel of search results from opening [resolve review comments]
Description:
- add reserve to querable layers in identify file to keep the same sort of toc layers in case of 'ignoreVisibilityLimits'
- edit unit test based on the change
@mahmoudadel54
Copy link
Collaborator Author

Test passed, @mahmoudadel54 please backport to 2024.01.xx. Thanks

Backport is done --- > #10345

tdipisa pushed a commit that referenced this pull request May 20, 2024
… Info panel of search results from opening (#10302, #10325) (#10345)

* #10264: Layer visibility limits may prevent the Info panel of search results from opening (#10302)

* #10264: Layer visibility limits may prevent the Info panel of search results from opening
Description:
- isolate getFeature [identify] action from epic 'searchItemSelected' to be applied after zoom and AddMarker events by creating a new epic called 'getFeatureInfoOfSelectedItem'
- write unit test for that

* Update web/client/epics/search.js

---------

Co-authored-by: Suren <dsuren1@gmail.com>

* #10264: Fix - Layer visibility limits may prevent the Info panel of search results from opening (#10325)

* #10264: Layer visibility limits may prevent the Info panel of search results from opening [resolve review comments]
Description:
- edit featureInfoClick action creator by passing an optional param called 'layerWithIgnoreVisibilityLimits' to enforce it to querable layers if not exist due to visibility limits
- handle showing feature info in case of search within single layer or All layers

* #10264: Layer visibility limits may prevent the Info panel of search results from opening [resolve review comments]
Description:
- handle showing feature info in case of action in queryParameters

* #10264: Layer visibility limits may prevent the Info panel of search results from opening [resolve review comments]
Description:
- add missing check on the layer with ignoring visibility limits of making sure it is queryable
- fix FE failure test

* #10264: Layer visibility limits may prevent the Info panel of search results from opening [resolve review comments]
Description:
- add unit tests
- fix handling search for layers has visibility limits

* #10264: Layer visibility limits may prevent the Info panel of search results from opening [resolve review comments]
Description:
- fix unit test

* #10264: Layer visibility limits may prevent the Info panel of search results from opening [resolve review comments]
Description:
- add reserve to querable layers in identify file to keep the same sort of toc layers in case of 'ignoreVisibilityLimits'
- edit unit test based on the change

---------

Co-authored-by: Suren <dsuren1@gmail.com>
@ElenaGallo ElenaGallo removed the BackportNeeded Commits provided for an issue need to be backported to the milestone's stable branch label May 20, 2024
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.

Layer visibility limits may prevent the Info panel of search results from opening
3 participants