Inventory Sorting

Inventory Sorting

15M Downloads

Sorting method lock

AstroAbyss opened this issue ยท 25 comments

commented

Lock the sorting method to prevent accidental switching via the mouse wheel.

commented

๐ŸŽ‰ This issue has been resolved in version 2.0.1 ๐ŸŽ‰

The release is available on GitHub release

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€

commented

Oh, thanks for the suggestion! Would you imagine just a simple setting in the configuration to "Scroll Wheel" [on/off] or something else?

Or it could be something like ctrl+scroll to actually change the sort type

commented

Oh, thanks for the suggestion! Would you imagine just a simple setting in the configuration to "Scroll Wheel" [on/off] or something else?

Or it could be something like ctrl+scroll to actually change the sort type

Yes, just configure a scroll wheel switch in the settings.

commented

Sweet, I've got a good idea for this too ^^

commented

Sweet, I've got a good idea for this too ^^

Wow, is that another new idea?

commented

Give it a go! Here's the dev build, it should contain both 1.21.4 and 1.21.5 versions.

https://github.com/KyrptonaughtMC/Inventory-Sorter/actions/runs/14452865430/artifacts/2942306883

Went with optionally putting it behind a modifier button.
It strikes a better balance between accessibility, discoverability, and fluid gameplay.
Unlike a static lock setting (which hides functionality unless users dig into configs), the modifier key keeps the feature available in context and players can still scroll to change modes, but only when they intend to.

It aligns a bit better with existing patterns in the mod (like Ctrl + click to hide buttons), is easier to teach via tooltips, and avoids creating friction for players who occasionally want to switch sort modes without toggling a setting back and forth.

The additional improvement I had in the meantime is to extract the modifier key to a keybind (in the controls menu) to allow people with any keyboard layout and preferences to also use it with ease! :)

commented

Yeah, that's a good idea too, but I still want a switch that completely locks or turns off the scroll wheel, maybe to ensure that I'm always using the same sorting method :|
How about merging the three options of 'disable scroll wheel', 'enable scroll wheel', and 'hold Ctrl to enable scroll wheel' in this setting? The default value of 'enabled' does not affect the players to discover and use this functionality.

commented

You should be able to do it with what's there now if you turn on requiring the modifier key and then unbinding the modifier in the controls settings. But honestly if you turn on the require modifier to be pressed, you shouldn't be able to accidentally change it unless you hold that button AND scroll While you are hovering over the button.

Or am I missing something?

commented

By the way it's a solid suggestion to have these 3 in a switch, I'm just curious :)

commented

Yeah, that's a good idea too, but I still want a switch that completely locks or turns off the scroll wheel, maybe to ensure that I'm always using the same sorting method :| How about merging the three options of 'disable scroll wheel', 'enable scroll wheel', and 'hold Ctrl to enable scroll wheel' in this setting? The default value of 'enabled' does not affect the players to discover and use this functionality.

Try this one! :) https://github.com/KyrptonaughtMC/Inventory-Sorter/actions/runs/14456998319/artifacts/2943741457

commented

You haven't missed anything. This is just my personal habit. I usually set these switch settings from the beginning and won't change them unless necessary. Of course, putting these three options in one switch is the best result, as it takes good care of everyone.

commented

Yeah, that's a good idea too, but I still want a switch that completely locks or turns off the scroll wheel, maybe to ensure that I'm always using the same sorting method :| How about merging the three options of 'disable scroll wheel', 'enable scroll wheel', and 'hold Ctrl to enable scroll wheel' in this setting? The default value of 'enabled' does not affect the players to discover and use this functionality.

Try this one! :) https://github.com/KyrptonaughtMC/Inventory-Sorter/actions/runs/14456998319/artifacts/2943741457

Yes, this is the best :)

commented

But I encountered some other bugs during use, so I will add them as separate issues.

commented

If it's related to this switching, just add them here but if it's something else, a new issue is best

commented

There is also a bug that can be fixed or not because players may not use this feature very much:
In creative mode, the scrolling behavior of the sorting button in the player's inventory can only switch between two types, which is why I initially wanted to send issues because I thought all buttons were like this.
But later I found out that this bug does not occur in inventory in survival mode or in containers :|

commented

What in the world, let me check that one too. It should all be the same. Turns out that in the Minecraft code (although I suspect in Fabric) the "horizontal" and "vertical" parameters are switched up :D

That's what was causing the issue as the code was checking the vertical amount but the actual scroll value was coming through the horizontal ๐Ÿคฏ

Image

commented

Yes, there is indeed a little issue with the scroll wheel: scrolling up and scrolling down are arranged in the same order, which is not very intuitive.

commented

HAHAHAHA, how did I not notice that!?

The code seems fine but it clearly isn't intuitive. I'll fix that too

commented

Really? Although I don't understand the code very well, I know that finding bugs is much more troublesome than solving them.

commented

Try this both for these issues and #147

https://github.com/KyrptonaughtMC/Inventory-Sorter/actions/runs/14491211274/artifacts/2955281224

I will try to test it after deleting config.

commented

I've put in an automatic fix so if it detects the old values in the config, it will just remove it itself

commented

Hey, it's great that these features are functioning properly! ๐ŸŽฎ

But suppose in the future, if there are any issues related to sorting buttons that are not related to button locking, how should I provide feedback?

commented

Opening a new issue is always a good way and then we can triage it.

That, or join the Discord server

commented

Opening a new issue is always a good way and then we can triage it.

That, or join the Discord server

Thank you for the invitation! I'm not very active on Discord, but will gladly join if needed. ๐Ÿ˜Š