On Mon, 10 Oct 2022 19:03:21 GMT, Jonathan Gibbons <[email protected]> wrote:

> 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.

This pull request has now been integrated.

Changeset: f5dabf94
Author:    Jonathan Gibbons <[email protected]>
URL:       
https://git.openjdk.org/jdk/commit/f5dabf94400b0a6082bc2eaf3ff33a11a36ad138
Stats:     226 lines in 27 files changed: 117 ins; 6 del; 103 mod

8295088: Update External Spec page to show tabs for hosts

Reviewed-by: hannesw

-------------

PR: https://git.openjdk.org/jdk/pull/10636

Reply via email to