Repository navigation
Quest list editor shows all list entries at once, and refactor list autosizer - #43
Merged
Merged
Conversation
There was a problem hiding this comment.
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
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
CollapsiblePanelAPIs 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.
Comment on lines
+207
to
+211
| if (alreadyRetried) { | ||
| return; | ||
| } | ||
| SwingUtilities.invokeLater(() -> resizeListToFit(list, maxRows, true)); | ||
| return; |
Collaborator
Author
There was a problem hiding this comment.
true, but this is good enough for now
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



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:
CollapsiblePanel, improving code documentation and maintainability. [1] [2] [3] [4]UiUtils.createCollapsibleItemListby renaming variables and ensuring all references use the new names. [1] [2]List Sizing Enhancements:
UiUtils.resizeListToFitto 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]resizeListToFitwith the new signature, e.g., inQuestEditor.Nested Scrolling Improvements:
NestedScrollListenerto 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:
These changes collectively make the UI more robust, flexible, and maintainable, especially when dealing with nested scrollable lists and collapsible sections.