pSpitzner opened a new issue, #41283:
URL: https://github.com/apache/superset/issues/41283

   ### Bug description
   
   Since PR #34276 we have the ability to adjust the tooltip of a deck.gl 
GeoJson Polygon charts through a unified interface:
   - a) how to determine each polygons color, via the `Metric` selector 
(avialable before the PR)
   - b) which metrics to include, via the list of `Tooltip contents`
   - c) how to style them, via the `Customize tooltips template`
   
   
   
   However, achieving a simple tooltip that shows an aggregated metric (say 
`computed_metric`) along with some corresponding meta data (say time and 
location) is currently not possible.
   
   ## Desired outcome
   
   <img width="740" alt="Image" 
src="https://github.com/user-attachments/assets/a78c6da6-f7be-4788-8ae3-06119abff4a4";
 />
   
   *CSP needs to be disabled
   
   ## Isolation
   
   - To use custom sytling (c), CSP has to be disabed or adjusted  (e.g. 
`TALISMAN_ENABLED = False`).
   - Without anything added to (b), the default template includes the 
`computed_metric`.
   - When adding meta data by including them in (b), the default style does not 
include the `computed_metric`. This does not require adjusting CSP.
   - The ui does not permit adding `computed_metric` in (b): Only real data 
columns can be selected, no custom sql and no predefined dataset-level metrics.
   
   ## Conclusion
   - In combination, it is currently not possible, to get tooltip with a custom 
metric _and_ metadata, without disabeling CSP.
   
   ## Proposed solution
   - The default template that is used when columns are added into (b) should 
include the defined `Metric` (a)
   - The UI should inform the user that (c) does not use handlebars (but a 
javascript render), which requires disableing CSP.
   
   
   ### Screenshots/recordings
   
   ## Screenshots
   
   default template **without** columns added to (b)
   <img width="500" alt="Image" 
src="https://github.com/user-attachments/assets/1ba02278-0e9b-4c85-84d9-b248166d822a";
 />
   
   ---
   
   default template **with** columns added to (b)
   <img width="500" alt="Image" 
src="https://github.com/user-attachments/assets/6403fb49-b0f3-46f9-982d-5c89f8756c35";
 />
   
   ---
   
   no computed metrics can be selected in (b)
   <img width="500" alt="Image" 
src="https://github.com/user-attachments/assets/9bf9b96a-4e4f-485f-aa0c-80e932fe6e1b";
 />
   
   
   ### Superset version
   
   6.1.0
   
   ### Python version
   
   Not applicable
   
   ### Node version
   
   Not applicable
   
   ### Browser
   
   Firefox
   
   ### Additional context
   
   ## Related Issues and PRs
   - #34276
   - #35665
   - #35418
   
   ### Checklist
   
   - [x] I have searched Superset docs and Slack and didn't find a solution to 
my problem.
   - [x] I have searched the GitHub issue tracker and didn't find a similar bug 
report.
   - [x] I have checked Superset's logs for errors and if I found a relevant 
Python stacktrace, I included it here as text in the "additional context" 
section.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to