Skip to content

Commit b5b8aa3

Browse files
committed
fix filters position, trigger graph func when document is loaded
1 parent ca8c06b commit b5b8aa3

File tree

6 files changed

+34
-33
lines changed

6 files changed

+34
-33
lines changed

scaladoc/resources/dotty_res/scripts/ux.js

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -51,24 +51,6 @@ window.addEventListener("DOMContentLoaded", () => {
5151

5252
document.querySelectorAll(".side-menu a").forEach(elem => elem.addEventListener('click', e => e.stopPropagation()))
5353

54-
$('.names .tab').on('click', function () {
55-
parent = $(this).parents(".tabs").first()
56-
shown = $(this).hasClass('selected')
57-
single = parent.hasClass("single")
58-
59-
if (single) parent.find(".tab.selected").removeClass('selected')
60-
61-
id = $(this).attr('data-togglable')
62-
myTab = parent.find("[data-togglable='" + id + "'].tab")
63-
if (!shown) { myTab.addClass('selected') }
64-
if (shown && !single) myTab.removeClass('selected')
65-
66-
if (!shown && $(this).filter(".showGraph").length > 0) {
67-
showGraph()
68-
$(this).find(".showGraph").removeClass("showGraph")
69-
}
70-
})
71-
7254
if (location.hash) {
7355
var target = location.hash.substring(1);
7456
// setting the 'expand' class on the top-level container causes undesireable styles
@@ -136,6 +118,10 @@ window.addEventListener("DOMContentLoaded", () => {
136118
mobileMenuCloseIcon.addEventListener('click', _e => {
137119
document.getElementById("mobile-menu").classList.remove("show")
138120
})
121+
122+
123+
// when document is loaded graph needs to be shown
124+
showGraph();
139125
});
140126

141127
var zoom;

scaladoc/resources/dotty_res/styles/theme/components/api-filters.css

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
.documentableFilter {
22
display: flex;
3-
position: fixed;
4-
top: calc(10 * var(--base-spacing));
53
flex-wrap: wrap;
64
z-index: 2;
5+
row-gap: calc(2 * var(--base-spacing));
6+
position: relative;
77
}
88

99
.filtersContainer {
1010
display: flex;
1111
flex-wrap: wrap;
12+
row-gap: calc(2 * var(--base-spacing));
1213
}
1314

1415
.filterableInput {

scaladoc/resources/dotty_res/styles/theme/components/attributes.css

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
margin: 0;
66
}
77

8+
.attributes p {
9+
margin: 0;
10+
}
11+
812
.attributes > dt {
913
float: left;
1014
width: 30%;
@@ -26,3 +30,17 @@
2630
padding-top: calc(2.5 * var(--base-spacing));
2731
padding-bottom: calc(2.5 * var(--base-spacing));
2832
}
33+
34+
.attributes > dd > .attributes > dt {
35+
border-top: none;
36+
padding: 0;
37+
text-align: initial;
38+
width: 20%;
39+
}
40+
41+
.attributes > dd > .attributes > dd {
42+
border-top: none;
43+
padding: 0;
44+
text-align: initial;
45+
width: 80%;
46+
}

scaladoc/resources/dotty_res/styles/theme/components/pill.css

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,6 @@
6363
.pill-container ul li {
6464
padding: calc(1 * var(--base-spacing)) calc(4 * var(--base-spacing));
6565
cursor: pointer;
66-
display: none;
67-
}
68-
69-
.pill-container ul li.visible {
7066
display: flex;
7167
}
7268

scaladoc/resources/dotty_res/styles/theme/layout/content.css

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,31 +90,31 @@
9090
}
9191

9292
.cover-header .micon.cl-wc {
93-
content: url("../../../images/class_comp-big.svg");
93+
content: url("../../../images/class-big.svg");
9494
}
9595

9696
.cover-header .micon.ob {
9797
content: url("../../../images/object-big.svg");
9898
}
9999

100100
.cover-header .micon.ob-wc {
101-
content: url("../../../images/object_comp-big.svg");
101+
content: url("../../../images/object-big.svg");
102102
}
103103

104104
.cover-header .micon.tr {
105105
content: url("../../../images/trait-big.svg");
106106
}
107107

108108
.cover-header .micon.tr-wc {
109-
content: url("../../../images/trait_comp-big.svg");
109+
content: url("../../../images/trait-big.svg");
110110
}
111111

112112
.cover-header .micon.en {
113113
content: url("../../../images/enum-big.svg");
114114
}
115115

116116
.cover-header .micon.en-wc {
117-
content: url("../../../images/enum_comp-big.svg");
117+
content: url("../../../images/enum-big.svg");
118118
}
119119

120120
.cover-header .micon.gi {
@@ -151,31 +151,31 @@
151151
}
152152

153153
.theme-dark .cover-header .micon.cl-wc {
154-
content: url("../../../images/class_comp-big.svg");
154+
content: url("../../../images/class-big.svg");
155155
}
156156

157157
.theme-dark .cover-header .micon.ob {
158158
content: url("../../../images/object-dark-big.svg");
159159
}
160160

161161
.theme-dark .cover-header .micon.ob-wc {
162-
content: url("../../../images/object_comp-big.svg");
162+
content: url("../../../images/object-big.svg");
163163
}
164164

165165
.theme-dark .cover-header .micon.tr {
166166
content: url("../../../images/trait-dark-big.svg");
167167
}
168168

169169
.theme-dark .cover-header .micon.tr-wc {
170-
content: url("../../../images/trait_comp-big.svg");
170+
content: url("../../../images/trait-big.svg");
171171
}
172172

173173
.theme-dark .cover-header .micon.en {
174174
content: url("../../../images/enum-dark-big.svg");
175175
}
176176

177177
.theme-dark .cover-header .micon.en-wc {
178-
content: url("../../../images/enum_comp-big.svg");
178+
content: url("../../../images/enum-big.svg");
179179
}
180180

181181
.theme-dark .cover-header .micon.gi {

scaladoc/src/dotty/tools/scaladoc/renderers/MemberRenderer.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,9 +407,9 @@ class MemberRenderer(signatureRenderer: SignatureRenderer)(using DocContext) ext
407407
)
408408
PageContent(
409409
div(
410-
buildDocumentableFilter,
411410
intro,
412411
memberInfo(m, withBrief = false),
412+
buildDocumentableFilter,
413413
buildMembers(m)
414414
),
415415
Seq.empty // For now, we don't support table of contents in members

0 commit comments

Comments
 (0)