Skip to content

Commit 907435d

Browse files
authored
Merge pull request #9997 from Turbo87/edition-display
Show Rust Edition requirement if set
2 parents 93f8da5 + cf749de commit 907435d

File tree

5 files changed

+27
-5
lines changed

5 files changed

+27
-5
lines changed

app/components/crate-sidebar.hbs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,13 @@
2222
{{svg-jar "rust"}}
2323
<span>
2424
v{{@version.msrv}}
25-
<EmberTooltip @text="Minimum Supported Rust Version" />
25+
26+
<EmberTooltip>
27+
&quot;Minimum Supported Rust Version&quot;
28+
{{#if @version.edition}}
29+
<div local-class="edition">requires Rust Edition {{@version.edition}}</div>
30+
{{/if}}
31+
</EmberTooltip>
2632
</span>
2733
</div>
2834
{{/if}}

app/components/crate-sidebar.module.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@
4040
}
4141
}
4242

43+
.edition {
44+
margin-top: var(--space-2xs);
45+
}
46+
4347
.license {
4448
a {
4549
color: var(--main-color);

app/components/version-list/row.hbs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,13 @@
7171
<span local-class="msrv">
7272
{{svg-jar "rust"}}
7373
v{{@version.msrv}}
74+
75+
<EmberTooltip>
76+
&quot;Minimum Supported Rust Version&quot;
77+
{{#if @version.edition}}
78+
<div local-class="edition">requires Rust Edition {{@version.edition}}</div>
79+
{{/if}}
80+
</EmberTooltip>
7481
</span>
7582
{{/if}}
7683

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,17 @@
4646
z-index: 1;
4747
cursor: help;
4848
}
49-
50-
:global(.ember-tooltip) {
51-
word-break: break-all;
52-
}
5349
}
5450

5551
.version {
5652
display: grid;
5753
grid-template-columns: auto auto;
5854
place-items: center;
5955

56+
:global(.ember-tooltip) {
57+
word-break: break-all;
58+
}
59+
6060
@media only screen and (max-width: 550px) {
6161
grid-template-columns: auto;
6262
margin: 0 var(--space-s);
@@ -212,6 +212,10 @@
212212
}
213213
}
214214

215+
.edition {
216+
margin-top: var(--space-2xs);
217+
}
218+
215219
.bytes {
216220
font-variant-numeric: tabular-nums;
217221
text-transform: none;

app/styles/application.module.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,5 +202,6 @@ noscript {
202202
}
203203

204204
:global(.ember-tooltip) {
205+
max-width: 300px;
205206
font-weight: normal;
206207
}

0 commit comments

Comments
 (0)