Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scaladoc - add option for dynamic side menu #19337

Merged
merged 1 commit into from
Jan 16, 2024

Conversation

Florian3k
Copy link
Contributor

@Florian3k Florian3k commented Dec 27, 2023

Closes #18543

This PR adds -dynamic-side-menu option to Scaladoc.
With this option Scaladoc doesn't generate side menu (packages etc. tree) in html files. Instead it is serialized into .json file and rendered on the client using Javascript.

@bishabosha
Copy link
Member

bishabosha commented Dec 29, 2023

to rephrase the linked issue, this is very important for large code bases to avoid enormous file sizes

@szymon-rd
Copy link
Contributor

Did you check it on various browsers?

@Florian3k
Copy link
Contributor Author

Yes, works fine in Chrome, Firefox, Safari.

@@ -45,7 +45,8 @@ object Scaladoc:
apiSubdirectory : Boolean = false,
scastieConfiguration: String = "",
defaultTemplate: Option[String] = None,
quickLinks: List[QuickLink] = List.empty
quickLinks: List[QuickLink] = List.empty,
dynamicSideMenu: Boolean = false,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be dynamic as a default for now (so the default behavior doesn't change). We can change it to default after we ensure it works in practice.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

false is the old behavior

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, right, this one if confused me. So everything looks alright!

Copy link
Contributor

@szymon-rd szymon-rd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks good, just one comment about keeping the old one as default for some time.

@Florian3k
Copy link
Contributor Author

Also fixes #19371

@Florian3k
Copy link
Contributor Author

I recon scala/docs.scala-lang#2942 should be merged after new Scala version with those changes is released to avoid confusion about new option not working.
cc @szymon-rd?

@szymon-rd
Copy link
Contributor

@Florian3k Yes

@Florian3k Florian3k merged commit 2945fd1 into scala:main Jan 16, 2024
19 checks passed
@Kordyjan Kordyjan added this to the 3.4.1 milestone Feb 14, 2024
WojciechMazur added a commit that referenced this pull request Jun 28, 2024
Backports #19337 to the LTS branch.

PR submitted by the release tooling.
[skip ci]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants