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

commonlib: Add indicator for new output to TabbedOutputPanel #6198

Merged
merged 1 commit into from
Feb 19, 2025

Conversation

ricekot
Copy link
Member

@ricekot ricekot commented Feb 14, 2025

A green dot is added to the top right corner of tab icons in the tabbed output panel when new output is appended to those tabs.

The changelog was not updated because the tabbed output panel hasn't been released yet and there's already a note about it.

Partially addresses #6044 (comment).

@psiinon
Copy link
Member

psiinon commented Feb 14, 2025

Logo
Checkmarx One – Scan Summary & Details8212353e-9d8d-4eaa-808d-b8a386d28fc2

Fixed Issues (3)

Great job! The following issues were fixed in this Pull Request

Severity Issue Source File / Package
LOW Heap_Inspection /addOns/authhelper/src/test/java/org/zaproxy/addon/authhelper/AuthUtilsUnitTest.java: 864
LOW Heap_Inspection /addOns/authhelper/src/test/java/org/zaproxy/addon/authhelper/AuthUtilsUnitTest.java: 840
LOW Heap_Inspection /addOns/authhelper/src/test/java/org/zaproxy/addon/authhelper/AuthUtilsUnitTest.java: 817

@thc202
Copy link
Member

thc202 commented Feb 17, 2025

When there's a single output tab the indicator does not disappear.

@ricekot ricekot force-pushed the commonlib/output-panel-indicator branch 2 times, most recently from d014d9f to fc803f5 Compare February 17, 2025 19:39
@ricekot
Copy link
Member Author

ricekot commented Feb 17, 2025

Thank you, added a mouse listener to the text output so the indicator disappears when the mouse enters the output panel.
Another change I made was to have the indicator show even if the tab is the current selected tab. I think that's a more consistent behaviour and results in a better UX.

Some implementation notes:

  • The overlay icon construction was moved out of the lambda so we're no longer incurring that overhead on each change event
  • Instead of adding a reference to the output panel in the change listener, the TabbedOutputPanel now maintains a map from the output source to corresponding listener. This is used to remove the listener when the output source is unregistered or clear() is called.

Signed-off-by: ricekot <git@ricekot.com>
@ricekot ricekot force-pushed the commonlib/output-panel-indicator branch from fc803f5 to bdfc65a Compare February 19, 2025 11:51
Copy link
Member

@kingthorin kingthorin left a comment

Choose a reason for hiding this comment

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

Still LGTM

@thc202
Copy link
Member

thc202 commented Feb 19, 2025

Thank you!

@thc202 thc202 merged commit cfbf924 into zaproxy:main Feb 19, 2025
9 of 10 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Feb 19, 2025
@ricekot ricekot deleted the commonlib/output-panel-indicator branch February 19, 2025 15:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants