Refined Storage

Refined Storage

77M Downloads

Grid search mode “Normal autoselect” prevents JEI usage

rpop0 opened this issue · 6 comments

commented

Describe the bug

Just as the title says, if using the “Normal autoselected” search box mode, you cannot use JEI as the grid search box takes priority over the input and you also can’t deselect the grid search box.

As a possible suggestion to fix this, clicking the JEI search bar could just deselect the grid search box.

How can we reproduce this bug or crash?

  1. Have refined storage and JEI installes
  2. Set up a grid with items.
  3. Set the grid search box mode to”Normal autoselect”.
  4. Attempt to use the JEI search, it does not work.

What Minecraft version is this happening on?

Minecraft 1.19.2

What Forge version is this happening on?

1.19.2-4.3.1.55

What Refined Storage version is this happening on?

1.11.4

Relevant log output

No response

commented

I am unsure how the autoselected feature should behave.

Is the expected behavior:

  1. that after each action the search box should get focus again?
  2. that when the grids open the search box should be focused once.

At this moment the implementations tends to try to achieve option 1 but is broken in multiple ways:

  • JEI search box is not focusable because the RS Grid Searchbox tries to get focus after each action
  • The forcing the focus breaks when some actions are performed (ex. double clicked on empty slot in grid)

This issue does not occur when using the JEI syncronized - autoselected mode because the input from the RS Search Box is syncronized to the JEI search box.

commented

I believe the better functionality would be option 2, so that the search box gets autoselected only when opening the grid,because the current options renders JEI totally useless if you need to search with the grid open.

I personally dislike JEI syncronization because on multiple occasions I alternate between searching in JEI and in the grid.

Additionally, another mode could be added so there are two nods, one for each option you outlined above.

commented

I am not a fan of adding another Grid Search Box Mode.

At this moment there are already 6 modes which i think are already too much.
For new users it's already hard to differentiate between them. Adding another one only increases the learning curve.

After some consideration i even think the amount of modes can be brought back to two:

  1. Normal
  2. JEI Syncronized

In normal mode the grid just focuses the Grid Search Box when opened (I don't know why we wouldn't want that by default?) and the Grid Search Box can lose focus (to interact with JEI)

In JEI Syncronized mode the Grid Search Box focuses on open and regains focus after each action. It's a non-issue we cannot select the JEI Search Box because the input to the Grid Search Box is replicated to the JEI Search Box (and thus synchronized)

commented

I agree with you that the normal modes could be condensed down into a single mode that autoselects by default and can lose focus, but I don't believe the same thing should happen to the JEI modes because that might impact the people who like using them.

In order to make this change, I still need to figure out a way to fix the issue outlined in PR #3448

@raoulvdberge Tagging you so we get your opinion about this.

commented

If i am not mistaken the modes SEARCH_BOX_MODE_JEI_SYNCHRONIZED_2WAY_AUTOSELECTED, SEARCH_BOX_MODE_JEI_SYNCHRONIZED_AUTOSELECTED do behave the same way. Because user input is always being inserted in the Grid Search Box (because of the never losing focus of the this widget)

The only difference with SEARCH_BOX_MODE_JEI_SYNCHRONIZED_2WAY is that both Search Box widgets (Grid and JEI) can lose focus (user input is discarded). But do we really want that?

commented

As I said in PR #3448, let's not discuss further based on RS 1. RS 1 won't be taking new features, and the grid settings have changed slightly in RS 2. So I prefer to discuss changes based on the current behavior in RS 2.

I will be merging PR #3470 to fix the initial issue.