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

8332239: Improve CSS for block tags #19264

Closed
wants to merge 1 commit into from
Closed

Conversation

hns
Copy link
Member

@hns hns commented May 16, 2024

Please review a change to improve the layout of definition lists used to display block tags:

  • Add indentation to the <dd> elements used for block tag details
  • Set the margin of lists within block tag details so they do not appear as nested lists, except for lists with CSS classes tag-list or tag-list-long, which are used for block tags containing lists, such as @see.

Before/after comparison (contains java.base and java.compiler modules):
https://cr.openjdk.org/~hannesw/8332239/api.00/index.html
https://cr.openjdk.org/~hannesw/8332239/api.01/index.html

Comparison for block tag layout:
https://cr.openjdk.org/~hannesw/8332239/api.00/java.base/java/lang/Object.html#hashCode()
https://cr.openjdk.org/~hannesw/8332239/api.01/java.base/java/lang/Object.html#hashCode()

Example of very long block tag details containing a list:
https://cr.openjdk.org/~hannesw/8332239/api.00/java.compiler/javax/lang/model/util/package-summary.html
https://cr.openjdk.org/~hannesw/8332239/api.01/java.compiler/javax/lang/model/util/package-summary.html

Note that the indentation also applies to the definition lists at the top of class/interface documentation as they use the same markup as block tags:
https://cr.openjdk.org/~hannesw/8332239/api.00/java.base/java/lang/Exception.html
https://cr.openjdk.org/~hannesw/8332239/api.01/java.base/java/lang/Exception.html

This was not an intended change but might or might not be desirable. It could be avoided with some additional CSS changes.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8332239: Improve CSS for block tags (Enhancement - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/19264/head:pull/19264
$ git checkout pull/19264

Update a local copy of the PR:
$ git checkout pull/19264
$ git pull https://git.openjdk.org/jdk.git pull/19264/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 19264

View PR using the GUI difftool:
$ git pr show -t 19264

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/19264.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented May 16, 2024

👋 Welcome back hannesw! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented May 16, 2024

@hns This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8332239: Improve CSS for block tags

Reviewed-by: prappo, liach, jjg

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 36 new commits pushed to the master branch:

  • fa3e94d: 8332393: Problemlist compiler/rangechecks/TestArrayAccessAboveRCAfterRCCastIIEliminated.java
  • a33cb90: 8332098: Add missing @ since tags to jdk.jdi
  • 910d77b: 8331953: ubsan: metaspaceShared.cpp:1305:57: runtime error: applying non-zero offset 12849152 to null pointer
  • f9f8d0b: 8332101: Add an @since to StandardOperation:REMOVE in jdk.dynalink
  • f398cd2: 8331575: C2: crash when ConvL2I is split thru phi at LongCountedLoop
  • 96c5c3f: 8329998: Remove double initialization for parts of small TypeArrays in ZObjArrayAllocator
  • ee4a9d3: 8321622: ClassFile.verify(byte[] bytes) throws unexpected ConstantPoolException, IAE
  • ab8d7b0: 8324517: C2: crash in compiled code because of dependency on removed range check CastIIs
  • fe8a2af: 8307778: com/sun/jdi/cds tests fail with jtreg's Virtual test thread factory
  • 95f79c6: 8332253: Linux arm32 build fails after 8292591
  • ... and 26 more: https://git.openjdk.org/jdk/compare/4ba74475d44831c1fe49359458163cd1567e9619...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot changed the title JDK-8332239: Improve CSS for block tags 8332239: Improve CSS for block tags May 16, 2024
@openjdk openjdk bot added the rfr Pull request is ready for review label May 16, 2024
@openjdk
Copy link

openjdk bot commented May 16, 2024

@hns The following label will be automatically applied to this pull request:

  • javadoc

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the javadoc javadoc-dev@openjdk.org label May 16, 2024
@mlbridge
Copy link

mlbridge bot commented May 16, 2024

Webrevs

Copy link
Member

@pavelrappo pavelrappo left a comment

Choose a reason for hiding this comment

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

Looks good in a rendered form. However, that mix of CSS units that we have -- %, px, em -- always looked suspicious to me.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label May 16, 2024
@hns
Copy link
Member Author

hns commented May 16, 2024

Thanks @pavelrappo.

However, that mix of CSS units that we have -- %, px, em -- always looked suspicious to me.

There are reasons for using one or the other. em is the font size of the local element, so it can be used to space things relative to the element's font size. 1em is the default top and bottom margin for top-level lists, so the list will be laid out correctly independent of the list's font.

px on the other hand is an absolute unit. We use it to set the default font size to 14px as the default 16px will look too big, and to set up the basic layout of the page. In this case, the indentation should be the same regardless of the element's font size (which might vary for proportional and monospaced font, for example).

Copy link
Contributor

@jonathan-gibbons jonathan-gibbons left a comment

Choose a reason for hiding this comment

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

Nice. It works well for short collections of block tags. It works less well for the really long ones,, but it is definitely better than before. Maybe we should still consider other ways of rendering very large block tags. But this is a good first step.

@hns
Copy link
Member Author

hns commented May 17, 2024

/integrate

@openjdk
Copy link

openjdk bot commented May 17, 2024

Going to push as commit 44bdf99.
Since your change was applied there have been 54 commits pushed to the master branch:

  • 9bb6169: 8317621: --add-script should support JavaScript modules
  • 4eb1eaf: 8329617: Update stylesheet for specs and tool documentation
  • d4c2edf: 8331855: Convert jdk.jdeps jdeprscan and jdeps to use the Classfile API
  • beeffd4: 8332109: Convert remaining tests using com.sun.tools.classfile to ClassFile API
  • e0d1c4b: 8321428: Deprecate for removal the package java.beans.beancontext
  • 0b0445b: 8331724: Refactor j.l.constant implementation to internal package
  • d84a8fd: 8332327: Return _methods_jmethod_ids field back in VMStructs
  • f1ce9b0: 8331557: Serial: Refactor SerialHeap::do_collection
  • 14198f5: 8329653: JLILaunchTest fails on AIX after JDK-8329131
  • ae999ea: 8129418: JShell: better highlighting of errors in imports on demand
  • ... and 44 more: https://git.openjdk.org/jdk/compare/4ba74475d44831c1fe49359458163cd1567e9619...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label May 17, 2024
@openjdk openjdk bot closed this May 17, 2024
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels May 17, 2024
@openjdk
Copy link

openjdk bot commented May 17, 2024

@hns Pushed as commit 44bdf99.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integrated Pull request has been integrated javadoc javadoc-dev@openjdk.org
4 participants