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

Ensure left search results panel is always visible. #8088

Merged
merged 2 commits into from
Dec 28, 2024

Conversation

mbien
Copy link
Member

@mbien mbien commented Dec 23, 2024

initialize divider position with a minimal value. This will always reset the value to at least 250 even if it is changed by the user to less.

fixes #8064

I could reproduce this sometimes with

  • fresh user conf (no divider location stored)
  • search something in an empty folder (e.g favorites view; ensures that the search finishes fast with no results)

I believe what happens in this case is that the divider isn't initialized (which is fine by itself) but the computed width of the left panel is 0 for some reason too (which is not ok).

@mbien mbien added Editor Platform [ci] enable platform tests (platform/*) UI User Interface ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) labels Dec 23, 2024
@mbien mbien added this to the NB25 milestone Dec 23, 2024
Copy link
Contributor

@matthiasblaesing matthiasblaesing left a comment

Choose a reason for hiding this comment

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

Looks sane to me.

Copy link
Contributor

@matthiasblaesing matthiasblaesing left a comment

Choose a reason for hiding this comment

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

And this was nagging at me: There is also BasicReplaceResultsPanel. This looks as if it should get the same treatment.

@mbien
Copy link
Member Author

mbien commented Dec 25, 2024

And this was nagging at me: There is also BasicReplaceResultsPanel. This looks as if it should get the same treatment.

Good catch - I'll take a look. Oh boy, I really hate copy pasted code. Will try to deduplicate this a bit if possible.

initialize divider position with a minimal value.
 - BasicReplaceResultsPanel extends BasicSearchResultsPanel
 - less code duplication
@mbien mbien force-pushed the fix-search-result-divider branch from fc77252 to 6635544 Compare December 26, 2024 03:05
@mbien
Copy link
Member Author

mbien commented Dec 26, 2024

@matthiasblaesing added the change to the first commit. The second commit refactors the two panels (BasicSearchResultsPanel extends now BasicAbstractResultsPanel) to make it more DRY. Let me know what you think about the refactoring.

Copy link
Contributor

@matthiasblaesing matthiasblaesing left a comment

Choose a reason for hiding this comment

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

We might have to bikeshed the 250px value at some point, but as it is saved, it should be ok. So makes sense to me. Thank you.

@mbien mbien merged commit 874d3bd into apache:master Dec 28, 2024
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) Code cleanup Editor Platform [ci] enable platform tests (platform/*) UI User Interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Find in Projects not working in NetBeans 24
2 participants