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

Map: add tooltip and popup templating #4443

Merged
merged 4 commits into from Dec 14, 2019

Conversation

deecay
Copy link
Contributor

@deecay deecay commented Dec 14, 2019

What type of PR is this? (check all applicable)

  • Feature

Description

Adds feature to define your own tooltip and popup format for Map Visualization

Related Tickets & Documents

Mobile & Desktop Screenshots/Recordings (if there are UI changes)

image

Copy link
Collaborator

@kravets-levko kravets-levko left a comment

Choose a reason for hiding this comment

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

In general looks fine, good work!

Two more suggestions:

  1. I think tooltip/popup inputs need some placeholder that will tell user that default template will be used. It may even use that default template as a placeholder. Also, the same should be mentioned in context help tooltip (e.g. "Leave this field empty to use default template").
  2. WDYT about using markdown instead of plain HTML for templates?

@deecay
Copy link
Contributor Author

deecay commented Dec 14, 2019

  1. I think tooltip/popup inputs need some placeholder that will tell user that default template will be used. It may even use that default template as a placeholder. Also, the same should be mentioned in context help tooltip (e.g. "Leave this field empty to use default template").

tooltip is fine, but popup is an issue. Default value is something impossible to recreate in simple HTML. We would need some kind of template engine that can iterate over a list.

  1. WDYT about using markdown instead of plain HTML for templates?

I assumed markdown cannot handle image layout very well, but I guess you can align images to the left etc. these days. There was a discussion of which library to use in #3170. Are we going with mustache #3776?

@kravets-levko
Copy link
Collaborator

1 - let's add a "Leave this field empty to use default template" text to TemplateFormatHint component - I think it will be enough.

2 - noticed that Choropleth does not use markdown as well 😅 Let's keep it as is 👍

@deecay
Copy link
Contributor Author

deecay commented Dec 14, 2019

@kravets-levko, I've added placeholder, too.

image

Copy link
Collaborator

@kravets-levko kravets-levko left a comment

Choose a reason for hiding this comment

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

🌟

@kravets-levko kravets-levko self-assigned this Dec 14, 2019
@kravets-levko kravets-levko merged commit 944adb9 into getredash:master Dec 14, 2019
@deecay deecay deleted the map-popup-format branch December 14, 2019 18:14
@shashwat-kalpvaig
Copy link

The format option is not showing up in the latest build. Did you guys removed it ?

image

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.

None yet

3 participants