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

New scaladoc version #16310

Merged

Conversation

szymon-rd
Copy link
Contributor

@szymon-rd szymon-rd commented Nov 9, 2022

PR with new scaladoc version. We want to merge it to language-ref, because there is already a reference version generated with older scaladoc that is bugged in some places. It would be best to replace it fairly quickly.
This version deployed: https://szymon-rd.github.io/dotty/scala3/index.html

Major changes (broadly described):

  • New search engine and algorithm. It is faster and gives better results. We also fixed its UI and introduced no results page.
  • Adjustments in articles layout.
  • Packages now form a tree instead of a linear structure. The scala package is first and expanded by default. It also behaves differently now (it doesn't jump in a way that was confusing to the user anymore)
  • Removed flickering of the page. It now behaves as it was written with some framework with virtual DOMs. We made it by intercepting the event that would make the browser reload the page, and prerendering the page before replacing it. The navigation is also faster because of it. It required us to rework some parts of the website.
  • New layout of members section and their contents (more concise and with improved readability).
  • Quick Navigation in API members. ToC are sticky now.
  • Member section filters are now faster and sticky. Added no results page.
  • Reworked code snippets style and fonts.
  • Removed contributors (see comments)
  • Styled tables in the Docs.
  • Fixed flow of releasing ScalaDoc by modyfing the tasks. It should be now easier to generate the stable docs, and the versions are fixed in the testcases config.
  • A lot of minor changes in styling and structure of both docs and API sections. We've redesigned the majority of the page and analyzed the implementation side to side to make it strictly match the designs.
  • Introduced new icons.
  • More details pages are now visible (going to change that and make them not appear under Next instead)

Fixed bugs with:

  • Search overlay not always disappearing when clicked outside.
  • Bad paths in search results.
  • Rendering of members filters. The clear icon now appears where it should and with fixed styling. Dropdown fixed as well.
  • Empty pages in docs
  • Rendering, updating and structure of ToC (In this article)
  • Missing pointer cursor
  • Article content shifting when no ToC.
  • Collapsing side nav items.
  • Page jumping when going directly to members.
  • Mobile menu not appearing on some resolutions.
  • Member details hiding on interaction with inheritance graph.
  • Missing spaces in search results.
  • Recent searches not working as intended.
  • Linking to a section that has its name duplicated in one doc. Now they get unique id on duplicates.
  • More minor ones.

Additional fixes TODO (from @julienrf )

  • Instead of showing in the sidebar the previously hidden pages, hide them also from the “Next” buttons
  • Don’t show all the super types of classes in the list view
  • In the detailed view, show the super types of classes, but use a comma instead of with
  • Bring back the “This is a nightly documentation. …” banner (with proper styling)
  • Fix the “Uncaught TypeError”s
  • Make the table of contents (“In this article” box) scrollable
  • Make header names (long package names) scrollable
  • Bring back the list of contributors (use --ignore-revs-file)

actions-user and others added 30 commits July 7, 2022 13:59
This pull request is created automatically after push to stable documentation branch and backports the changes
- Increase all header levels in files without h2 headers
- Fix docs starting with h3 headers
- Few other minor header fixes
@szymon-rd
Copy link
Contributor Author

szymon-rd commented Dec 6, 2022

@julienrf Please take a look at the current version when you have some time, I believe we addressed all the issues aside from the contributors one. The "nightly" banner is now visible. (Deployed to https://szymon-rd.github.io/dotty/scala3/index.html)

Rationale for leaving contributors out for now:

I played a bit with the contributors and the logic was always to use GH API with /commits endpoint. The rate limiting made it throw errors after about 5-6 requests, so after that, the contributors would not render, and there would be an error. Aside from that, it would be harder to filter out the commits using this endpoint, as you suggested. So the solution seems to be a bigger rework of the contributors' element, including pre-fetching the data during documentation generation and storing this data on the page beforehand. What I’m asking is to maybe put in the next task, as this would take some considerable time to implement. I can revert to the previous version, but the problem with it is that it:

  • Shows wrong authors
  • After a couple of refreshes throws errors, breaks, and doesn’t recover for a while. (it was like this before too)

So I think it may be a good idea to go ahead without this element for the current version, as it does not work right now even on the older docs. Given granularity of the contributor's element rework, and the massive size of this PR, I think it would be a good idea to fix in the next task, opening a new PR for it.

Additional changes, aside from addressing comments

julienrf
julienrf previously approved these changes Dec 6, 2022
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.

Thank you!

@julienrf
Copy link
Contributor

julienrf commented Dec 6, 2022

Could you please create an issue (or feature request?) on bringing back the documentation contributors? I think that’s an important feature to have. It would be good to explain the solutions you tried and why they didn’t work.

@szymon-rd
Copy link
Contributor Author

Here is the new issue: #16472

@TheElectronWill
Copy link
Contributor

Congrats for the new Scaladoc! 🎉

I've noticed one last little bug: the message "No results match your filter criteria" does not disappear if you edit your filter (it only disappears when you click on "clear all filters").
How to reproduce:

  1. Go to an api page, for instance https://szymon-rd.github.io/dotty/scala3/api/scala/collection/immutable/List.html

  2. Filter and get no result. The No results match your filter criteria shows up:
    image

  3. Edit the filter input to get some results. The No results match your filter criteria is still there, at the end of the div.
    image

@szymon-rd
Copy link
Contributor Author

@TheElectronWill Thank you! I just fixed it :) (It won't deploy, I did it on branch here only)

@szymon-rd szymon-rd merged commit 8772756 into scala:language-reference-stable Dec 9, 2022
@szymon-rd szymon-rd deleted the scaladoc-fixes-to-merge branch December 9, 2022 17:11
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.

9 participants