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: New UI design #15697

Merged
merged 180 commits into from
Aug 16, 2022
Merged

Scaladoc: New UI design #15697

merged 180 commits into from
Aug 16, 2022

Conversation

pikinier20
Copy link
Contributor

@pikinier20 pikinier20 commented Jul 18, 2022

Big thanks to all people involved in this initiative. Especially, I would like to thank @fanixus96 for implementing majority of these changes

pikinier20 and others added 30 commits February 16, 2022 11:38
…tokens-implementation

typography and color tokens implementation
@julienrf
Copy link
Contributor

julienrf commented Jul 18, 2022

Screenshot from 2022-07-18 11-25-52

I am not sure about the spacing here. I find that there is too much space in between the members, and too much padding within each member. The text “Attributes” looks too big to me. There is an overlapping issue in the “Throws” section. Last, I don’t think we should use a monospace font for descriptions.

Also, case class fields are not shown in the members' list.

For comparison, this is how it looks like before the PR:

Screenshot from 2022-07-18 11-34-42

And, with Scaladoc of Scala 2:

Screenshot from 2022-07-18 11-35-56

@pikinier20
Copy link
Contributor Author

@julienrf We already had a conversation about space between members and we decided to implement some switch with "concise" view

@julienrf
Copy link
Contributor

On mobile, when you open the burger menu there is no way to close it.

@mbovel
Copy link
Member

mbovel commented Jul 18, 2022

Minor: h1 cut:

image

Due to:

#content>div:first-child {
  overflow: hidden;
}

And the line-height being set in .body-medium with an absolute px value that is too small for h1.

@sjrd
Copy link
Member

sjrd commented Jul 18, 2022

Screenshot from 2022-07-18 11-25-52

Also about this: please don't use a monospace font for normal text. Reserve that for code.

@sjrd
Copy link
Member

sjrd commented Jul 18, 2022

Somewhat on the same topic: compare Awaitable.ready (with link) to ExecutionContext (without link):
image
They look pretty different, although both are inline code snippets. Consider making them look more similar to each other (while still keeping a distinction for the clickable one) and more different from the normal text.

@sjrd
Copy link
Member

sjrd commented Jul 18, 2022

Anchor bug: go to https://scala3doc.virtuslab.com/pr-new-ui/scala3/api/scala/concurrent/Future.html, then click on the name andThen (the very fist member) -> the whole section disappears. (If you then reload, with the updated URL, you get the expected result.) Reproducible on Firefox and Chrome.

@bishabosha
Copy link
Member

bishabosha commented Jul 18, 2022

I am looking at scala.quoted.Quotes and it suggests there are quite a few "deprecated extension methods", including matches, but In the source only valueOrError is deprecated - not sure of the cause here, perhaps annotations are copied between extensions?

Screenshot 2022-07-18 at 14 58 51

@sjrd
Copy link
Member

sjrd commented Jul 18, 2022

image
IMO we should not use a font with ligatures in documentation. When you read it there, you have no idea how to type it in your editor. (and copy-pasting is often more annoying than necessary because it's also a link)

@pikinier20
Copy link
Contributor Author

I am looking at scala.quoted.Quotes and it suggests there are quite a few "deprecated extension methods", including matches, but In the source only valueOrError is deprecated - not sure of the cause here, perhaps annotations are copied between extensions?

Screenshot 2022-07-18 at 14 58 51

This bug is not related to the new UI - https://dotty.epfl.ch/api/scala/quoted/Quotes.html#

@smarter
Copy link
Member

smarter commented Aug 4, 2022

In https://scala3doc.virtuslab.com/pr-new-ui/scala3/api/scala/collection/immutable/List.html the code samples are not fully visible without horizontal scrolling:
Screenshot_20220804_111231
Compared with https://www.scala-lang.org/api/2.13.8/scala/collection/immutable/List.html and http://dotty.epfl.ch/api/scala/collection/immutable/List.html, the font size is bigger and the width of the main content of the page is smaller in the new design.
I don't mind a fixed width but I think a bigger one would work better here. Compare also with https://doc.rust-lang.org/std/macro.matches.html

@arturopala
Copy link
Contributor

"Run" buttons need to add package import first, but it still might not be enough to compile the more complex examples:

image

vs

image

@pikinier20
Copy link
Contributor Author

image

I've got the horizontal scroll but it might be related to some browser's compatibility with used CSSes. I've used Chrome + Safari

@pikinier20
Copy link
Contributor Author

"Run" buttons need to add package import first, but it still might not be enough to compile the more complex examples:

image

vs

image

There's some work to do in terms of retrieving nested objects and importing them correctly. I think we can do it after merging the new UI.

@TheElectronWill
Copy link
Contributor

TheElectronWill commented Aug 5, 2022

In https://scala3doc.virtuslab.com/pr-new-ui/scala3/api/scala/collection/immutable/List.html the code samples are not fully visible without horizontal scrolling: [...] I don't mind a fixed width but I think a bigger one would work better here. Compare also with https://doc.rust-lang.org/std/macro.matches.html

Related to this, I've noticed that when the window is small, the width of the #content > div:first-child is bigger (this width is acceptable):
image

and when I maximize the window it gets smaller (too small):
image

I presume that this is because of:

@media (max-width: 1436px)
#content > div:first-child {
  width: auto;
}
@media (max-width: 1920px)
#content > div:first-child {
  width: calc(90 * var(--base-spacing)); /* this should be larger */
}

I've tested

@media (max-width: 1920px)
#content > div:first-child {
  width: 980px; /* on Firefox it's almost the perfect value, YMMV */
}

and it seemed quite good at avoiding the sudden shrinking of the central div :)

@pikinier20 pikinier20 merged commit cf4dd05 into scala:main Aug 16, 2022
@smarter
Copy link
Member

smarter commented Aug 17, 2022

Are all the issues which were raised in this PR planned to be addressed? Should we open new issues to track them?

@pikinier20
Copy link
Contributor Author

Are all the issues which were raised in this PR planned to be addressed? Should we open new issues to track them?

I think that if some bug wasn't addressed and is still present then we should have a separate issue for it.

TheElectronWill added a commit that referenced this pull request Oct 9, 2022
Among the multiple changes in #15697 the footer text stoped being
configurable (defaulting to an EPFL copyright).

This PR makes the footer text configurable again.

Incidentally, this will also fix the copyright message to show 2022
(notice that the current message says 2021, while [the message defined
in the
build](https://github.com/lampepfl/dotty/blob/afc6ce4d2135e3532bf28146a7700d2cc4338e90/project/Build.scala#L1887)
uses `$currentYear`).
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.

10 participants