Integrated: 8350260: Improve HTML instruction formatting in PassFailJFrame

Alexey Ivanov aivanov at openjdk.org
Wed Feb 19 12:25:55 UTC 2025


On Tue, 18 Feb 2025 11:48:09 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

> **Problem:**
> 
> When instructions are long, the formatting in `PassFailJFrame` looks off:
> 
> 1. When the instructions are displayed on the screen for the first time, the HTML is scrolled to the bottom, which isn't convenient;
> 2. Numbers above 10 in the list are clipped on the left;
> 3. No border around the HTML text.
> 
> These problems were found while converting the instructions for `test/jdk/javax/accessibility/TestJCheckBoxToggleAccessibility.java` in https://github.com/openjdk/jdk/pull/23436.
> 
> <details>
> <summary>Screenshots of the instructions</summary>
> 
> The instructions are scrolled to the bottom when the test starts:  
> ![01-instructions-bottom](https://github.com/user-attachments/assets/66c8d319-83d7-4219-91a5-96c964b9a0fe)
> 
> The number 10 in the list is clipped on the left:  
> ![02-clipped-numbering](https://github.com/user-attachments/assets/8db421ff-7b91-4db8-988c-03828097890e)
> 
> The headings _“Testing with…”_ are flushed to the left, there's no additional space between the scroll pane border and the text.
> 
> </details>
> 
> **Fix:**
> 
> 1. Adjust the list margins to accommodate for longer text;
> 2. Install the text border to either text instruction component;
> 3. Scroll the text to the top.
> 
> <details>
> <summary>Screenshot of the instructions <i>with the fix</i></summary>
> 
> The stated issues are resolved:  
> ![03-top-no-clipping](https://github.com/user-attachments/assets/d14cfae2-733d-468d-93b9-c93d2d00cb3c)
> 
> </details>

This pull request has now been integrated.

Changeset: 014701a0
Author:    Alexey Ivanov <aivanov at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/014701a09b23d21f57edb5b085820532804475bd
Stats:     7 lines in 1 file changed: 2 ins; 1 del; 4 mod

8350260: Improve HTML instruction formatting in PassFailJFrame

Reviewed-by: kizune, azvegint, abhiscxk

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

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


More information about the client-libs-dev mailing list