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

[Maps] Allow implementers of ITooltipProperty to return React-DOM for the tooltip-value #126631

Closed
thomasneirynck opened this issue Mar 1, 2022 · 1 comment · Fixed by #127069
Assignees
Labels
chore [Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation v8.2.0

Comments

@thomasneirynck
Copy link
Contributor

thomasneirynck commented Mar 1, 2022

Describe the feature:

The public API for ITooltipProperty should not expose getHtmlDisplayValue, and rather have implementers return React-dom.

So something like this instead:

ITooltipProperty.renderDisplayValue(): ReactElement<any> | null;

This is more safe.

Having to plugin raw-html as the base-case was less of an issue when all code was internal to Maps, and there was a guarantee that all implementations of ITooltipProperty.getHtmlDisplayValue would only use Kibana's core Field-formatters. Allowing raw-html should only be for values from the Kibana field-formatters and not for any other implementation (especially not 3rd party ones).

This was raised by #126007 (review)

@botelastic botelastic bot added the needs-team Issues missing a team label label Mar 1, 2022
@thomasneirynck thomasneirynck added chore enhancement New value added to drive a business result [Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation and removed needs-team Issues missing a team label labels Mar 1, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-gis (Team:Geo)

@thomasneirynck thomasneirynck changed the title [Maps] Allow implementers of ITooltipPropertyy to return React-DOM for the tooltip-value [Maps] Allow implementers of ITooltipProperty to return React-DOM for the tooltip-value Mar 1, 2022
@nreese nreese self-assigned this Mar 7, 2022
@nreese nreese removed the enhancement New value added to drive a business result label Mar 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore [Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation v8.2.0
Projects
None yet
3 participants