-
Notifications
You must be signed in to change notification settings - Fork 413
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
#9825: Add an config option to enable mapInfo highlight by default #9829
Conversation
* Description: - Adding an option called "identifyHighlight" to enable/disable mapInfo highlight by default in localConfig file - implement intiate highlight value based on the added option and the default is false - write unit tests based on change
* Description: - fix FE test failure by editing a unit test in identifyContainer that test calling initiateOrResetHighlight on close identify
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.
it works, but please refactor this by reusing the INIT_PLUGIN action
generally when there is a cfg prop that needs to initialize the state and then change due to user actions we follow this approach
- only when plugin mounts (where connect is ) we call an onMount onInit action
- in the reducer we initialize the configuration
- we then user another action to change a specific prop value and a selector to fetch the value
Also please remember to avoid touching localConfig.json if not needed. undefined or null are falsy values as well, and it's better not not list props in cfg if not needed and use the default value associated to it at plugin level
* Description: - resolve review comments by using INIT_PLUGIN action instead of the new created one - Remove the new created action ' INIT_IDENTIFY_HIGHLIGHT' and its dependent code - Remove the added config from localConfig file
@ElenaGallo please test in DEV using a context and customizing the cfg of Identify plugin with "highlightEnabledFromTheStart": true |
@ElenaGallo let us know for the backport |
Test passed, @mahmoudadel54 please backport to 2023.02.xx. Thanks |
…t by default (geosolutions-it#9829) * geosolutions-it#9825: Add option to enable mapInfo highlight by default * Description: - Adding an option called "identifyHighlight" to enable/disable mapInfo highlight by default in localConfig file - implement intiate highlight value based on the added option and the default is false - write unit tests based on change * geosolutions-it#9825: Add option to enable mapInfo highlight by default * Description: - fix FE test failure by editing a unit test in identifyContainer that test calling initiateOrResetHighlight on close identify * geosolutions-it#9825: Add option to enable mapInfo highlight by default * Description: - resolve review comments by using INIT_PLUGIN action instead of the new created one - Remove the new created action ' INIT_IDENTIFY_HIGHLIGHT' and its dependent code - Remove the added config from localConfig file
Backport is done ---> #9871 |
…9829) (#9871) * #9825: Add option to enable mapInfo highlight by default * Description: - Adding an option called "identifyHighlight" to enable/disable mapInfo highlight by default in localConfig file - implement intiate highlight value based on the added option and the default is false - write unit tests based on change * #9825: Add option to enable mapInfo highlight by default * Description: - fix FE test failure by editing a unit test in identifyContainer that test calling initiateOrResetHighlight on close identify * #9825: Add option to enable mapInfo highlight by default * Description: - resolve review comments by using INIT_PLUGIN action instead of the new created one - Remove the new created action ' INIT_IDENTIFY_HIGHLIGHT' and its dependent code - Remove the added config from localConfig file
Description
This PR enables mapInfo highlight in identify by default if the option 'identifyHighlight' is added to config file.
The PR includes:
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (check one with "x", remove the others)
Issue
#9825
What is the current behavior?
#9825
What is the new behavior?
Now if the config option 'identifyHighlight' is defined by true, the mapInfo highlight in identify side bar will be active by default.
Breaking change
Does this PR introduce a breaking change? (check one with "x", remove the other)