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 features parity with old scaladoc/docs.scala-lang #13954

Merged
merged 15 commits into from
Nov 30, 2021

Conversation

BarkingBad
Copy link
Contributor

@BarkingBad BarkingBad commented Nov 15, 2021

This PR adds:

  • redirects for removed pages
  • arrows for easier reading static site (move to previous/next page)
  • contributors listing for static site docs
  • add Edit on github widget

I will update the docs with links/screens once CI will deploy the demo version

@BarkingBad BarkingBad marked this pull request as draft November 15, 2021 12:20
Copy link
Contributor

@julienrf julienrf left a comment

Choose a reason for hiding this comment

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

This is interesting work, thank you @BarkingBad! However, it would be definitely easier to review these changes feature by feature instead of having a single PR with everything in it.

mainFiles.flatMap { loadedTemplate =>
loadedTemplate.templateFile.settings.getOrElse("page", Map.empty).asInstanceOf[Map[String, Object]].get("redirectFrom").map { case redirectFrom: String =>
val fakeFile = new File(docsPath.toFile, redirectFrom)
val redirectTo = fakeFile.toPath.getParent.relativize(loadedTemplate.file.toPath).toString.stripSuffix(".md") + ".html"
Copy link
Contributor

Choose a reason for hiding this comment

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

Does that mean that we can’t redirect from a directory, like e.g. /foo/bar/?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I assumed that we can redirect from html but cat change that, though I would need some test cases which paths should be valid

Copy link
Contributor

Choose a reason for hiding this comment

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

Looking at the diff, I can’t tell whether this discussion is resolved or not. What’s its status? I recommend adding more tests.

@BarkingBad BarkingBad force-pushed the scaladoc/new-frame-poc branch from 2cb4280 to 14ef614 Compare November 16, 2021 09:59
@BarkingBad
Copy link
Contributor Author

@BarkingBad
Copy link
Contributor Author

obraz

Arrows and contributors list

@BarkingBad
Copy link
Contributor Author

https://scala3doc.virtuslab.com/pr-new-frame-poc/scala3/docs/reference/other-new-features/named-typeargs.html

Automatic redirect to experimentals subscetion since it was moved

@BarkingBad BarkingBad force-pushed the scaladoc/new-frame-poc branch from 3127fd2 to cc5ae76 Compare November 18, 2021 16:06
@BarkingBad BarkingBad force-pushed the scaladoc/new-frame-poc branch 2 times, most recently from 09c4690 to 150448c Compare November 29, 2021 09:47
@BarkingBad BarkingBad marked this pull request as ready for review November 29, 2021 09:47
@BarkingBad BarkingBad requested a review from julienrf November 29, 2021 09:48
@julienrf julienrf removed their assignment Nov 29, 2021
@BarkingBad BarkingBad force-pushed the scaladoc/new-frame-poc branch 2 times, most recently from 2cfbd52 to 28d15ca Compare November 29, 2021 16:52
@BarkingBad BarkingBad force-pushed the scaladoc/new-frame-poc branch from 28d15ca to 748f0ae Compare November 29, 2021 16:55
@BarkingBad
Copy link
Contributor Author

I think I addressed all of your concerns @julienrf, could you take a look?

@BarkingBad BarkingBad requested a review from julienrf November 29, 2021 16:57
Copy link
Contributor

@julienrf julienrf left a comment

Choose a reason for hiding this comment

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

That looks good to me!

Please squash your commits before merging the PR.

@BarkingBad BarkingBad merged commit f6b6e50 into scala:master Nov 30, 2021
olsdavis pushed a commit to olsdavis/dotty that referenced this pull request Apr 4, 2022
* POC

* Walk in order and collect previous/next

* Add `Edit on Github` button and `Contriubuted` sections

* Polish gathering the contributors. CSSes fixes.

* Fix tooltipping snippets

* Fix handling relative links for static site

* Add redirects mechanism for scaladoc

* Fix leftover

* Fix tests

* Fix gathering index html for sections without explicit index

* Apply requested changes to scaladoc

* Decouple Scala.js jses. Move contributors to be independent asset/

* Add support for multiple redirects

* Apply requested changes. Add static site for testcases. Fix minor bugs in scaladoc.

* Fix tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants