RFR: JDK-8295088: Update External Spec page to show tabs for hosts [v2]
Jonathan Gibbons
jjg at openjdk.org
Fri Oct 21 19:29:26 UTC 2022
> Please review a medium but interesting fix to display tabs on the `External Specifications` page to indicate the host name for the spec.
>
> The underlying "fun" part is to update `Table` to be `Table<T>`, where `T` is the type parameter for the predicates used to classify each row to determine the tabs when it will be displayed.
>
> The changes to `Table` are relatively simple, but there is a downstream cost to update all the existing use sites to avoid introducing any raw types (i.e. because `Table` now takes a type parameter). While it would have been simple to just change existing uses from `Table` to `Table<Element>`, the changes are done more appropriately. In particular, if a table does not use tabs at all, the type parameter can be `Void`, and in other situations, the type parameter can be a subtype of `Element`, such as `ModuleElement`, `PackageElement` or `TypeElement`.
>
> With `Table` updated to be `Table<T>`, the table in `ExternalSpecsWriter` can be `Table<URI>` with table-tab predicates examining the host name for the URL.
>
> Eventually, it might be good to do a further upgrade to use a horizontal list of checkboxes instead of table tabs, for the potentially open-ended set of host names, but this will require an update to the JavaScript we use for checkboxes, which seems out of scope for the work presented here. I note that in demo JDK docs, there are only about half-a-dozen spec hosts, so table tabs are a reasonable compromise for now.
Jonathan Gibbons has updated the pull request incrementally with one additional commit since the last revision:
remove excess whitespace
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/10636/files
- new: https://git.openjdk.org/jdk/pull/10636/files/a3af7eeb..4d6e84f8
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=10636&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=10636&range=00-01
Stats: 2 lines in 2 files changed: 0 ins; 0 del; 2 mod
Patch: https://git.openjdk.org/jdk/pull/10636.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/10636/head:pull/10636
PR: https://git.openjdk.org/jdk/pull/10636
More information about the javadoc-dev
mailing list