Skip to content

Commit adccb80

Browse files
authored
Merge pull request #10513 from Turbo87/floating-ui
Replace `ember-tooltips` with `floating-ui`
2 parents d70a1f4 + 341e951 commit adccb80

20 files changed

+165
-99
lines changed

app/components/crate-header.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
{{svg-jar "trash"}}
1010
Yanked
1111

12-
<EmberTooltip>
12+
<Tooltip>
1313
This crate has been yanked, but it is still available for download for other crates that
1414
may be depending on it.
15-
</EmberTooltip>
15+
</Tooltip>
1616
</span>
1717
{{/if}}
1818
{{/if}}

app/components/crate-row.hbs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<span>
2929
<span>
3030
All-Time:
31-
<EmberTooltip @text="Total number of downloads"/>
31+
<Tooltip @text="Total number of downloads"/>
3232
</span>
3333
{{ format-num @crate.downloads }}
3434
</span>
@@ -38,7 +38,7 @@
3838
<span>
3939
<span>
4040
Recent:
41-
<EmberTooltip @text="Downloads in the last 90 days"/>
41+
<Tooltip @text="Downloads in the last 90 days"/>
4242
</span>
4343
{{ format-num @crate.recent_downloads }}
4444
</span>
@@ -48,11 +48,11 @@
4848
<span>
4949
<span>
5050
Updated:
51-
<EmberTooltip @text="The last time the crate was updated" />
51+
<Tooltip @text="The last time the crate was updated" />
5252
</span>
5353
<time datetime="{{date-format-iso @crate.updated_at}}" data-test-updated-at>
5454
{{date-format-distance-to-now @crate.updated_at addSuffix=true}}
55-
<EmberTooltip @text={{ @crate.updated_at }}/>
55+
<Tooltip @text={{ @crate.updated_at }}/>
5656
</time>
5757
</span>
5858
</div>

app/components/crate-sidebar.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
{{svg-jar "calendar"}}
1414
<span>
1515
{{date-format-distance-to-now @version.created_at addSuffix=true}}
16-
<EmberTooltip @text={{date-format @version.created_at 'PPP'}} />
16+
<Tooltip @text={{date-format @version.created_at 'PPP'}} />
1717
</span>
1818
</time>
1919

@@ -120,7 +120,7 @@
120120
Try on Rust Playground
121121

122122
{{#if this.canHover}}
123-
<EmberTooltip
123+
<Tooltip
124124
@text="The top 100 crates are available on the Rust Playground for you to try out directly in your browser." />
125125
{{/if}}
126126
</a>

app/components/crate-sidebar.module.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
.date,
3838
.msrv,
3939
.edition {
40-
[title], :global(.ember-tooltip-target) {
40+
> span {
4141
cursor: help;
4242
}
4343
}

app/components/dependency-list/row.hbs

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -36,23 +36,20 @@
3636

3737
{{#if this.featuresDescription}}
3838
<span local-class="features-label" data-test-features>
39-
{{! extra <span> for better tooltip alignment }}
40-
<span>
41-
{{this.featuresDescription}}
39+
{{this.featuresDescription}}
4240

43-
<EmberTooltip>
44-
<ul local-class="feature-list">
41+
<Tooltip local-class="tooltip">
42+
<ul local-class="feature-list">
43+
<li>
44+
{{svg-jar (if @dependency.default_features "checkbox" "checkbox-empty")}} default features
45+
</li>
46+
{{#each @dependency.features as |feature|}}
4547
<li>
46-
{{svg-jar (if @dependency.default_features "checkbox" "checkbox-empty")}} default features
48+
{{svg-jar "checkbox"}} {{feature}}
4749
</li>
48-
{{#each @dependency.features as |feature|}}
49-
<li>
50-
{{svg-jar "checkbox"}} {{feature}}
51-
</li>
52-
{{/each}}
53-
</ul>
54-
</EmberTooltip>
55-
</span>
50+
{{/each}}
51+
</ul>
52+
</Tooltip>
5653
</span>
5754
{{/if}}
5855
</div>

app/components/dependency-list/row.module.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@
3131
--placeholder-opacity: 0.15;
3232
}
3333

34-
[title], :global(.ember-tooltip-target) {
34+
[title], .features-label {
3535
position: relative;
3636
z-index: 1;
3737
cursor: help;
3838
}
3939

40-
:global(.ember-tooltip) {
40+
.tooltip {
4141
word-break: break-all;
4242
}
4343

@@ -112,7 +112,7 @@
112112
margin-bottom: -.1em;
113113
}
114114

115-
:global(.ember-tooltip) {
115+
.tooltip {
116116
text-transform: none;
117117
letter-spacing: normal;
118118
}
@@ -133,7 +133,7 @@
133133

134134
.feature-list {
135135
padding: 0;
136-
margin: 10px 5px;
136+
margin: var(--space-2xs) var(--space-3xs);
137137
list-style: none;
138138

139139
svg {

app/components/edition.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<span>
22
{{@version.edition}} edition
33

4-
<EmberTooltip>
4+
<Tooltip>
55
This crate version does not declare a Minimum Supported Rust Version, but
66
does require the {{@version.edition}} Rust Edition.
77

@@ -10,5 +10,5 @@
1010
but this crate may require features that were added in later versions of
1111
Rust.
1212
</div>
13-
</EmberTooltip>
13+
</Tooltip>
1414
</span>

app/components/ember-tooltip.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

app/components/msrv.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<span>
22
v{{@version.msrv}}
33

4-
<EmberTooltip>
4+
<Tooltip>
55
&quot;Minimum Supported Rust Version&quot;
66
{{#if @version.edition}}
77
<div local-class="edition">requires Rust Edition {{@version.edition}}</div>
88
{{/if}}
9-
</EmberTooltip>
9+
</Tooltip>
1010
</span>

app/components/privileged-action.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
<fieldset data-test-placeholder-fieldset disabled="disabled">
1313
{{yield}}
1414
</fieldset>
15-
<EmberTooltip>
15+
<Tooltip>
1616
You must enable admin actions before you can perform this operation.
17-
</EmberTooltip>
17+
</Tooltip>
1818
</div>
1919
{{/if}}
2020
{{else}}

0 commit comments

Comments
 (0)