Skip to content

Commit 01391fc

Browse files
authored
Embedding Projector: fix tooltips (#6325)
## Motivation for features / changes fix broken/inconsistent tooltips ## Technical description of changes Some places tooltips aren't showing up (Spherize), some place we have two tooltips show up ## Screenshots of UI changes Before: ![image](https://user-images.githubusercontent.com/31378877/232664920-383f052c-842d-4263-a07c-7fede98101bc.png) After: ![image](https://user-images.githubusercontent.com/31378877/232665054-045a4995-3982-4b67-b8b8-5e6a3a62a8e6.png) ## Detailed steps to verify changes work correctly (as executed by you) Hover over tabs and Spherize option, verify things show up as expected ## Alternate designs / implementations considered
1 parent c674933 commit 01391fc

File tree

2 files changed

+31
-46
lines changed

2 files changed

+31
-46
lines changed

tensorboard/plugins/projector/vz_projector/vz-projector-data-panel.html.ts

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -625,17 +625,22 @@ export const template = html`
625625
</paper-dialog>
626626
</div>
627627
<paper-checkbox id="normalize-data-checkbox" checked="{{normalizeData}}">
628-
Sphereize data
629-
<paper-icon-button icon="help" class="help-icon"></paper-icon-button>
630-
<paper-tooltip
631-
position="bottom"
632-
animation-delay="0"
633-
fit-to-visible-bounds
634-
>
635-
The data is normalized by shifting each point by the centroid and making
636-
it unit norm.
637-
</paper-tooltip>
628+
Spherize data
638629
</paper-checkbox>
630+
<paper-icon-button
631+
id="normalize-data-help"
632+
icon="help"
633+
class="help-icon"
634+
></paper-icon-button>
635+
<paper-tooltip
636+
for="normalize-data-help"
637+
position="bottom"
638+
animation-delay="0"
639+
fit-to-visible-bounds
640+
>
641+
The data is normalized by shifting each point by the centroid and making
642+
it unit norm.
643+
</paper-tooltip>
639644
<div class="dirs">
640645
<table>
641646
<tr>

tensorboard/plugins/projector/vz_projector/vz-projector-projections-panel.html.ts

Lines changed: 16 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -142,42 +142,30 @@ export const template = html`
142142
<div id="main">
143143
<div class="ink-panel-header">
144144
<div class="ink-tab-group">
145-
<div data-tab="umap" id="umap-tab" class="ink-tab projection-tab">
145+
<div
146+
data-tab="umap"
147+
id="umap-tab"
148+
class="ink-tab projection-tab"
149+
title="Uniform manifold approximation and projection"
150+
>
146151
UMAP
147152
</div>
148-
<paper-tooltip
149-
for="umap-tab"
150-
position="bottom"
151-
animation-delay="0"
152-
fit-to-visible-bounds
153+
<div
154+
data-tab="tsne"
155+
id="tsne-tab"
156+
class="ink-tab projection-tab"
157+
title="t-distributed stochastic neighbor embedding"
153158
>
154-
uniform manifold approximation and projection
155-
</paper-tooltip>
156-
157-
<div data-tab="tsne" id="tsne-tab" class="ink-tab projection-tab">
158159
t-SNE
159160
</div>
160-
<paper-tooltip
161-
for="tsne-tab"
162-
position="bottom"
163-
animation-delay="0"
164-
fit-to-visible-bounds
161+
<div
162+
data-tab="pca"
163+
id="pca-tab"
164+
class="ink-tab projection-tab"
165+
title="Principal component analysis"
165166
>
166-
t-distributed stochastic neighbor embedding
167-
</paper-tooltip>
168-
169-
<div data-tab="pca" id="pca-tab" class="ink-tab projection-tab">
170167
PCA
171168
</div>
172-
<paper-tooltip
173-
for="pca-tab"
174-
position="bottom"
175-
animation-delay="0"
176-
fit-to-visible-bounds
177-
>
178-
Principal component analysis
179-
</paper-tooltip>
180-
181169
<div
182170
data-tab="custom"
183171
id="custom-tab"
@@ -186,14 +174,6 @@ export const template = html`
186174
>
187175
Custom
188176
</div>
189-
<paper-tooltip
190-
for="custom-tab"
191-
position="bottom"
192-
animation-delay="0"
193-
fit-to-visible-bounds
194-
>
195-
Search for two vectors upon which to project all points.
196-
</paper-tooltip>
197177
</div>
198178
</div>
199179
<div class="container">

0 commit comments

Comments
 (0)