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
Feature: Filter engine build menu by name and NewGRF extra text #10519
Merged
Conversation
This file contains 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
2TallTyler
added
preview
This PR is receiving preview builds
work: still in progress (draft)
This Pull Request is a draft
labels
Feb 28, 2023
It would be nice if the nested results were expanded down the tree to the search result, I think? Not a huge issue, but that would seem more intuitive to me |
James103
reviewed
Feb 28, 2023
frosch123
reviewed
Feb 28, 2023
frosch123
reviewed
Feb 28, 2023
2TallTyler
added
size: small
This Pull Request is small, and should be relative easy to process
needs review: NewGRF
Review requested from a NewGRF expert
and removed
work: still in progress (draft)
This Pull Request is a draft
labels
Mar 3, 2023
rubidium42
reviewed
Mar 4, 2023
rubidium42
reviewed
Apr 29, 2023
rubidium42
approved these changes
May 1, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks okay to me.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
preview
This PR is receiving preview builds
size: small
This Pull Request is small, and should be relative easy to process
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.
Motivation / Problem
In #8984, @perezdidac started the work of adding a text filter to the build vehicle menu, but hasn't been touched in 10 months. Let's finish it.
Description
Implements #8984 with a change to put the editbox below the other lines:
I added the ability to search NewGRF extra text, which is often used to describe a vehicle's role:
It also works with the vehicle name callback added in #10399 (there's an example trainset in that PR):
If variants are used (unreleased Iron Horse 2 in this screenshot), a subvariant that meets the filter, nested inside a parent does not, will show up underneath its greyed-out parent variant, collapsed by default.
Closes #8984.
Limitations
I tried swapping the cargo filter dropdown and the editbox in the GUI, and the cargo filter all by itself looked much more wrong than a full-width textbox (which we have elsewhere in the GUI, including the object menu).
Checklist for review
Some things are not automated, and forgotten often. This list is a reminder for the reviewers.