Skip to content

Quest list editor shows all list entries at once, and refactor list autosizer - #43

Merged
gmn42 merged 5 commits into
Next_Releasefrom
list-size
Sep 19, 2026
Merged

gmn42 merged 5 commits into
Next_Releasefrom
list-size

Conversation

@gmn42

@gmn42 gmn42 commented Sep 19, 2026

Copy link
Copy Markdown
Collaborator

This pull request refactors and enhances the UI utilities and related components for collapsible panels and scrollable lists. The main improvements include better documentation, more flexible and robust list sizing, improved nested scrolling behavior, and some code cleanup and naming consistency.

UI Component Improvements:

  • Added detailed JavaDoc comments to public methods in CollapsiblePanel, improving code documentation and maintainability. [1] [2] [3] [4]
  • Improved naming and consistency in UiUtils.createCollapsibleItemList by renaming variables and ensuring all references use the new names. [1] [2]

List Sizing Enhancements:

  • Refactored UiUtils.resizeListToFit to support a customizable maximum row count, store the row limit as a client property, and add an extra row when a horizontal scrollbar is needed. Now, the method can be called with a specific row limit or defaults to 8. [1] [2]
  • Updated usages to call resizeListToFit with the new signature, e.g., in QuestEditor.

Nested Scrolling Improvements:

  • Improved NestedScrollListener to better handle mouse wheel events, including bubbling events to parent scroll panes when appropriate, and installed it automatically on relevant scroll panes. [1] [2] [3]

Code Cleanup:

  • Removed unnecessary comments and imports, and ensured all new utility classes are imported as needed. [1] [2]

These changes collectively make the UI more robust, flexible, and maintainable, especially when dealing with nested scrollable lists and collapsible sections.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Deferred resizing can continuously enqueue EDT callbacks, and nested wheel forwarding does not preserve wheel-event data.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity · 1 Medium severity · 1 Low severity

Open (3)
What changed in this PR

This PR improves Swing list sizing and nested scrolling, especially for collapsible quest and dialogue editor lists.

Changes:

  • Adds configurable list row limits and horizontal-scroll compensation.
  • Installs nested scroll handling on generated list panels.
  • Documents CollapsiblePanel APIs and displays all quest stages.
File Description
UiUtils.java Refactors list sizing and installs nested scrolling.
NestedScrollListener.java Updates scroll-boundary bubbling.
QuestEditor.java Uses unlimited row sizing for quest stages.
CollapsibleScrollList.java Removes trailing whitespace.
CollapsiblePanel.java Adds JavaDoc and serialization annotation.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

The one-shot resize retry can leave quest lists at the default eight rows when invoked before layout.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 Medium severity

Open (1)
Resolved since last review (3)

Comment on lines +207 to +211
if (alreadyRetried) {
return;
}
SwingUtilities.invokeLater(() -> resizeListToFit(list, maxRows, true));
return;

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

true, but this is good enough for now

@gmn42
gmn42 merged commit 7569561 into Next_Release Sep 19, 2026
3 checks passed
@gmn42
gmn42 deleted the list-size branch September 19, 2026 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants