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 support for genotype names to phenogrid tooltips #826

Open
kevinschaper opened this issue Sep 26, 2024 · 0 comments
Open

Add support for genotype names to phenogrid tooltips #826

kevinschaper opened this issue Sep 26, 2024 · 0 comments
Assignees

Comments

@kevinschaper
Copy link
Member

kevinschaper commented Sep 26, 2024

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant