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

Search Box Suggestion Display Fix (1.21) #752

Open
wants to merge 1 commit into
base: 1.21
Choose a base branch
from

Conversation

augustsaintfreytag
Copy link

This pull request fixes the placeholder/suggestion text (e.g. "Search EMI…") being visible together with the insertion point, overlapping each other. These changes make it so the TextFieldWidget used for EMI's search now hides its suggestion text whenever the field has focus, when the player wants to type. Once it loses focus, the suggestion is displayed again. Existing logic for hiding the suggestion when the text field has input is kept as-is.

I’m opening this because the one for 1.20 was rejected and closed.

@augustsaintfreytag
Copy link
Author

Apparently, the same change would have to be done for the config field, as well, it has the same issue.

@emilyploszaj
Copy link
Owner

The title calls this change a "fix" but I'm not sure either behavior is more correct. Does vanilla have examples where it might disagree with this, or is there something else justifying this? It is probably just me being used to it, but I kinda prefer it as is.

@augustsaintfreytag
Copy link
Author

Well, the insertion point overlaps with the placeholder text, looks like a visual bug to me. I've got that from other players of the mod pack I'm maintaining right now. Generally, in input fields where the placeholder text stays, the insertion point is a vertical bar, not an underscore, so there it can't intersect. Vanilla Minecraft doesn't have a lot of examples, it doesn't use many text fields and some don't have a placeholder at all (like chat input).

I took the effort to go through gameplay recordings to give you the most direct comparison, this is REI:

ezgif-2-d20707ce19

Their devs seem to have either used an existing option to use a vertical bar as an insertion point or actually built their own little rendering logic for it.

From a UX standpoint, it's simple. If the search box is not focussed, it may be useful to convey what it does with the placeholder label. If the player clicks the search box, they want to type. They already know what the search box is for, they don't need a placeholder.

@SiverDX
Copy link

SiverDX commented Oct 17, 2024

Don't have a personal opinion on this but in the world creation screen in 1.21 (maybe 1.20 too? not sure) it looks like this:

image

image

@emilyploszaj
Copy link
Owner

Alright that's reasonable to me then, I will request you remove the non-functionality formatting changes made to the file

@augustsaintfreytag
Copy link
Author

Am I going to have to write the changes for the config text field, too? And then open eight individual pull requests for every version of Minecraft EMI supports?

@emilyploszaj
Copy link
Owner

I handle all the versioning, if it gets merged into 1.21 then it'll get merged backwards. Adjusting the config text field is your choice, I just asked for the formatting changes to be removed.

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.

3 participants