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

Add tooltips to detail page section titles and metrics #296

Open
justinanderson opened this issue Jun 17, 2022 · 0 comments
Open

Add tooltips to detail page section titles and metrics #296

justinanderson opened this issue Jun 17, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@justinanderson
Copy link
Member

There should be tooltips on the detail page for section titles and metrics when tooltips are defined in the layout response. Note that no tooltip content exists as of yet, so some lorem ipsum gibberish or other placeholder should be used for now.

For example, if the detail layout returned in http://localhost:8000/datasets/small-business-support/ looks like:

"detailLayout":
{
  ...
  "sections":
  [
    ...
    {
      "title": "Economy",
      "tooltip": "Income and employment of workers in South Australia.\n\nSource: Australian Bureau of Statistics",
      "metrics":
      [
        {
          "title": "Income Gini Coefficient",
          "tooltip": "A common measurement of economic inequality within a region. A Gini coefficient of 0.0 implies an equal distribution of income among all workers in the region. A coefficient of 1.0 implies all of the region's income is concentrated in just a few workers."
        },
        ...
      ]
    },
    ...
  ]
}

Then the detail page should have an InfoOutlinedIcon <IconButton> appended after the "Economy" section title and after the "Income Gini Coefficient" metric title. When an info icon is clicked, it should show its tooltip content in a MUI Tooltip. An info icon should default to the color hsl(0,0%,70%) and, when hovered, be hsl(0,0%,40%). Sections and metrics without a defined tooltip should not have any icon.

So, the above might end up looking like:
Untitled

@justinanderson justinanderson added the enhancement New feature or request label Jun 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants