Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,7 @@ object projects:
lazy val zio = SbtCommunityProject(
project = "zio",
sbtTestCommand = "testJVMDotty",
// sbtDocCommand = forceDoc("coreJVM"),
// Fails on tasty unpickling https://github.com/lampepfl/dotty/issues/10499
sbtDocCommand = forceDoc("coreJVM"),
)

lazy val munit = SbtCommunityProject(
Expand Down
3 changes: 3 additions & 0 deletions scala3doc/resources/dotty_res/styles/scalastyle.css
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,9 @@ footer .pull-right {
}
.documentableAnchor {
position: absolute;
width: 24px;
height: 24px;
background: url('data:image/svg+xml;utf8,<svg width="24" height="24" viewBox="0 0 24 24" fill="darkgray" xmlns="http://www.w3.org/2000/svg"><path d="M21.2496 5.3C20.3496 4.5 19.2496 4 18.0496 4C16.8496 4 15.6496 4.5 14.8496 5.3L10.3496 9.8L11.7496 11.2L16.2496 6.7C17.2496 5.7 18.8496 5.7 19.8496 6.7C20.8496 7.7 20.8496 9.3 19.8496 10.3L15.3496 14.8L16.7496 16.2L21.2496 11.7C22.1496 10.8 22.5496 9.7 22.5496 8.5C22.5496 7.3 22.1496 6.2 21.2496 5.3Z"></path><path d="M8.35 16.7998C7.35 17.7998 5.75 17.7998 4.75 16.7998C3.75 15.7998 3.75 14.1998 4.75 13.1998L9.25 8.6998L7.85 7.2998L3.35 11.7998C1.55 13.5998 1.55 16.3998 3.35 18.1998C4.25 19.0998 5.35 19.4998 6.55 19.4998C7.75 19.4998 8.85 19.0998 9.75 18.1998L14.25 13.6998L12.85 12.2998L8.35 16.7998Z"></path></svg> ');
}

.documentableBrief {
Expand Down
11 changes: 2 additions & 9 deletions scala3doc/src/dotty/renderers/ScalaHtmlRenderer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class SignatureRenderer(pageContext: ContentPage, sourceSetRestriciton: JSet[Dis
def renderLink(name: String, dri: DRI, modifiers: AppliedAttr*) =
link(dri) match
case Some(link) => a(href := link, modifiers)(name)
case _ => span(Attr("data-unresolved-link") := dri.toString, modifiers)(name)
case _ => span(Attr("data-unresolved-link") := "", modifiers)(name)

def renderElementWith(e: String | (String, DRI) | Link, modifiers: AppliedAttr*) = e match
case (name, dri) => renderLink(name, dri, modifiers:_*)
Expand Down Expand Up @@ -107,13 +107,6 @@ class ScalaHtmlRenderer(using ctx: DokkaContext) extends HtmlRenderer(ctx) {
}
}

private val anchor = raw("""
<svg width="24" height="24" viewBox="0 0 24 24" fill="darkgray" xmlns="http://www.w3.org/2000/svg">
<path d="M21.2496 5.3C20.3496 4.5 19.2496 4 18.0496 4C16.8496 4 15.6496 4.5 14.8496 5.3L10.3496 9.8L11.7496 11.2L16.2496 6.7C17.2496 5.7 18.8496 5.7 19.8496 6.7C20.8496 7.7 20.8496 9.3 19.8496 10.3L15.3496 14.8L16.7496 16.2L21.2496 11.7C22.1496 10.8 22.5496 9.7 22.5496 8.5C22.5496 7.3 22.1496 6.2 21.2496 5.3Z"></path>
<path d="M8.35 16.7998C7.35 17.7998 5.75 17.7998 4.75 16.7998C3.75 15.7998 3.75 14.1998 4.75 13.1998L9.25 8.6998L7.85 7.2998L3.35 11.7998C1.55 13.5998 1.55 16.3998 3.35 18.1998C4.25 19.0998 5.35 19.4998 6.55 19.4998C7.75 19.4998 8.85 19.0998 9.75 18.1998L14.25 13.6998L12.85 12.2998L8.35 16.7998Z"></path>
</svg>
""")



private def buildDocumentableList(n: DocumentableList, pageContext: ContentPage, sourceSetRestriciton: JSet[DisplaySourceSet]) =
Expand All @@ -130,7 +123,7 @@ class ScalaHtmlRenderer(using ctx: DokkaContext) extends HtmlRenderer(ctx) {
div(topLevelAttr:_*)(
div(cls := "annotations monospace")(element.annotations.map(renderElement)),
div(
a(href:=link(element.params.dri).getOrElse("#"), cls := "documentableAnchor")(anchor),
a(href:=link(element.params.dri).getOrElse("#"), cls := "documentableAnchor"),
span(cls := "modifiers monospace")(
span(cls := "other-modifiers")(otherModifiers.map(renderElement)),
span(cls := "kind")(kind.map(renderElement)),
Expand Down