Skip to content

Commit 29afc36

Browse files
committed
Further review changes + fixed bug with displaying old results on rare occasions
1 parent 4dc5220 commit 29afc36

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

scaladoc-js/src/searchbar/SearchbarComponent.scala

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,17 +78,19 @@ class SearchbarComponent(engine: SearchbarEngine, inkuireEngine: InkuireJSSearch
7878
handleNewFluffQuery(matchers)
7979
case BySignature(signature) =>
8080
timeoutHandle = setTimeout(1.second) {
81+
val properResultsDiv = document.createElement("div").asInstanceOf[html.Div]
82+
resultsDiv.appendChild(properResultsDiv)
8183
val loading = document.createElement("div").asInstanceOf[html.Div]
8284
loading.classList.add("loading-wrapper")
8385
val animation = document.createElement("div").asInstanceOf[html.Div]
8486
animation.classList.add("loading")
8587
loading.appendChild(animation)
86-
resultsDiv.appendChild(loading)
88+
properResultsDiv.appendChild(loading)
8789
inkuireEngine.query(query) { (p: PageEntry) =>
88-
resultsDiv.appendChild(p.toHTML(inkuire = true))
90+
properResultsDiv.appendChild(p.toHTML(inkuire = true))
8991
} { (s: String) =>
9092
animation.classList.remove("loading")
91-
resultsDiv.appendChild(s.toHTMLError)
93+
properResultsDiv.appendChild(s.toHTMLError)
9294
}
9395
}
9496
}

scaladoc/resources/dotty_res/styles/search-bar.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@
8484
}
8585

8686
.loading {
87+
left: 50%;
8788
position: relative;
8889
animation-delay: .5s;
8990
}

scaladoc/src/dotty/tools/scaladoc/Scaladoc.scala

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,16 +89,11 @@ object Scaladoc:
8989

9090
def dumpInkuireDB(output: String, parsedArgs: Args) = {
9191
val dbPath = Paths.get(output, "inkuire-db.json")
92-
println("InkuireDB created successfully!")
93-
println(s"Types: ${Inkuire.db.types.size}")
94-
println(s"Functions: ${Inkuire.db.functions.size}")
95-
println(s"ImplicitConversions: ${Inkuire.db.implicitConversions.size}")
9692
val dbFile = dbPath.toFile()
9793
dbFile.createNewFile()
9894
val dbWriter = new FileWriter(dbFile, false)
9995
dbWriter.write(s"${EngineModelSerializers.serialize(Inkuire.db)}")
10096
dbWriter.close()
101-
println(s"Saved InkuireDB in file: ${dbPath.toString}")
10297

10398
val configPath = Paths.get(output, "scripts/inkuire-config.json")
10499
val configFile = configPath.toFile()

0 commit comments

Comments
 (0)