Skip to content

Add support for genotype names to phenogrid tooltips #826

@kevinschaper

Description

@kevinschaper

Diego let me know that when they're using the multi-compare phenogrid at IMPC, genotype names aren't displaying correctly in the phenogrid tooltips.

This should be an easy fix. Genotype names contain sup html tags, so we need them to be interpreted as html. We took care of this elsewhere in the UI with #720.

The change is essentially replacing <span class="name">{{ name }}</span> with <span class="name" v-html="name"></span>

Potentially, this tooltip involving the column label is the one that we need to covert to passing html into a span:

          <tooltip
            v-for="(col, colIndex) in cols"
            :key="colIndex"
            :interactive="true"
            placement="bottom"
            follow-cursor="initial"
            :append-to="appendToBody"
            :tag="null"
          >
            <text
              :data-hovered="hovered ? hovered.col === colIndex : ''"
              :transform="`translate(${(0.5 + colIndex) * cellSize}, -${
                cellSize * 0.25
              }) rotate(-45)`"
            >
              {{ truncateLabels ? truncate(col.label) : col.label }}
            </text>
            <template #content>
              <AppNodeBadge :node="col" :absolute="true" :show-id="true" />
              <div class="mini-table">
                <span>Total Score</span>
                <span>{{ col.total.toFixed(3) }}</span>
              </div>
            </template>
          </tooltip>

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions