Fix #3608 improved tooltip customization in TOC#3618
Fix #3608 improved tooltip customization in TOC#3618tdipisa merged 2 commits intogeosolutions-it:masterfrom
Conversation
| onSelect: PropTypes.func, | ||
| titleTooltip: PropTypes.bool, | ||
| tooltipOptions: PropTypes.object | ||
| truncateLength: PropTypes.number, |
There was a problem hiding this comment.
use a tooltipOptions object to wrap all the things and change the names (joinString --> separator) (truncateLength --> maxLength)
There was a problem hiding this comment.
@tdipisa should we align the two tooltips?
@offtherailz regarding the translations, i just added some missing translations to the non mantained ones
| "nodeType": "groups", | ||
| "options": {} | ||
| }; | ||
| const flat = [ |
There was a problem hiding this comment.
Please remove all the layers not necessary for this test
web/client/translations/data.nl-NL
Outdated
| "singleTile": "Single Tile", | ||
| "cached": "Gebruik cache-opties", | ||
| "styleCustom": "Gebruik een stijl genaamd \"{value} \"", | ||
| "styleCustom": "G ebruik een stijl genaamd \"{value} \"", |
There was a problem hiding this comment.
I think there is a typo here
| "styleCustom": "G ebruik een stijl genaamd \"{value} \"", | |
| "styleCustom": "Gebruik een stijl genaamd \"{value} \"", |
web/client/utils/LayersUtils.js
Outdated
| * adds or update node property in a nested node | ||
| * similar to deepchange but it overrides a whole group of options instead of one | ||
| */ | ||
| const deepOptionsChange = (nodes, findId, propValues = {}) => { |
There was a problem hiding this comment.
I think this can be implemented by iterating on propValues keys for deepChange (or vice-versa deepChange can be implemented using this). There is a little of redundancy.
It's deepChange enough tested to replace the implementation? otherwise you can skip, maybe comment
* also added tocitem settings in hte dcoma config
Description
This pr enhances the way tooltips for TOC nodes are configured and customized
As described in TOC plugin documentation you can:
or customize some options like max length of the tooltip or the join string
Issues
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (check one with "x", remove the others)
What is the current behavior? (You can also link to an open issue here)
you cannot setup tooltip options for each node and subgroup
What is the new behavior?
you can change tooltip options for each node (groups, subgroups, and layers)
Does this PR introduce a breaking change? (check one with "x", remove the other)
If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...
Other information:
also added some English translation to non supported ones
this is a screenshot of the new UI
