fabulously-optimized icon indicating copy to clipboard operation
fabulously-optimized copied to clipboard

AdaptiveTooltips

Open isXander opened this issue 2 years ago • 25 comments

CurseForge link

https://curseforge.com/minecraft/mc-mods/adaptive-tooltips

CurseForge Mod Distribution

Allowed

Modrinth link

https://modrinth.com/mod/adaptive-tooltips

Source/other link

https://github.com/isxander/adaptivetooltips

Mod file size

64.75 KB

License

(any other license)

What it does

AdaptiveTooltips contains various modifications to vanilla tooltips to allow users to always read them, no matter how badly implemented they are by server owners.

Why should it be in the modpack

It is a frequent problem where players cannot read large tooltips. This mod contains a a few tweaks that make sense for FO:

  • Bedrock Centering - Parity with Bedrock edition, if the tooltip is cut off on the left and right of the screen, AT places it above (or below if required) the cursor. This fix feels very vanilla and fits right in in Minecraft.
  • Text Wrapping - When required, AT can wrap text in tooltips into multiple lines so it can always fit on the screen. Screen Width mode feels very natural with Bedrock Centering enabled while Remaining Width is similar to tooltipfix that can feel a bit unnatural when you move the cursor.
  • Tooltip Scrolling - It is common for FO users to go on servers such as Hypixel, where they implement wrapping themselves so vanilla users can read tooltips, the problem is, there is only so much a server can do to help with this. Tooltips end up being taller than your screen, so being able to scroll on them can help with this.
  • Prioritize Tooltip Top - This follows the previous tweak very well; by default, when a tooltip is taller than your screen, it moves it upwards so the bottom of the tooltip fits on the screen while the top is clipped off. This fix changes this so it is instead moved down, allowing the (often more important) top of the tooltip to be read.

Why shouldn't it be in the modpack

This gives server owners an excuse to not implement better server-side handling of tooltips for vanilla users, however this shouldn't be FO's problem to enforce these kind of things and not being included in FO is unlikely to convince a server owner to do this.

Additional details

No response

isXander avatar Nov 19 '22 19:11 isXander

Still don't know any use cases outside that one Hypixel minigame where this would be still needed.

Madis0 avatar Nov 19 '22 19:11 Madis0

Why was Debugify's fix and tooltipfix added in the past?

isXander avatar Nov 19 '22 19:11 isXander

Because it was an issue in the past and people convinced me to add it. But in 1.19.3 snapshot Mojang fixed it - not perfectly, but covers 90%+ of use cases imo.

So - I need more convincing about the big bad use cases that Mojang's fix does not cover.

Madis0 avatar Nov 19 '22 19:11 Madis0

Mojang didn't fix it. All they did was prevent it going off the left side of the screen.

This is bad for a few reasons:

  • Tooltips would cover up a whole row in the inventory, including the item the user is hovering over.
  • It can still happen; if a line is just a little longer than in 1.19.2, it will still go off-screen (and look bad)

isXander avatar Nov 19 '22 19:11 isXander

Also, you must remember, tooltips can appear in other aspects of the game other than the inventory, it can help other mods too.

isXander avatar Nov 19 '22 19:11 isXander

Tooltips would cover up a whole row in the inventory, including the item the user is hovering over.

That's a minor visual detail, which can be but does not necessarily have to be fixed.

It can still happen; if a line is just a little longer than in 1.19.2, it will still go off-screen (and look bad) Also, you must remember, tooltips can appear in other aspects of the game other than the inventory, it can help other mods too.

Indeed, that is the theory. Now I want practical examples to prove it (as of 1.19.3).

Madis0 avatar Nov 19 '22 19:11 Madis0

Alright, did some quick testing - here's the results: The vanilla instances were adjusted to use GUI scale 3 to match the default FO. Command if you want to test yourself: give <user> stick{display:{Name:'{"text":"this is a very long tooltipthis is a very long tooltipthis is a very long tooltipthis is a very long tooltipthis is a very long tooltipthis is a very long tooltipthis is a very long tooltipthis is a very long tooltipthis is a very long tooltipthis is a very long tooltipthis is a very long tooltipthis is a very long tooltipthis is a very long tooltipthis is a very long tooltipthis is a very long tooltipthis is a very long tooltipthis is a very long tooltipthis is a very long tooltipthis is a very long tooltip"}'}}

FO 4.5.2 (fixes it the right way IMO): FO-4 5 2

Vanilla 1.19.2 (for comparison only): Vanilla-1 19 2

Vanilla 22w46a: Vanilla-22w46a

TL;DR Mojang doesn't wrap tooltips which is needed here.

I have a friend who made a game with one item having an extremely large tooltip, so I'll retest it if I can get my hands on said item now (which may qualify more as a 'practical example').

osfanbuff63 avatar Nov 19 '22 20:11 osfanbuff63

Those long lines of text are an easy way to demonstrate the possibility of recreating the problem, but not prove it in practice.

In survival, it is not possible to do this. Minigame servers, custom maps and datapacks would not intentionally do this.

So I want examples where actual content would accidentally overflow.

Madis0 avatar Nov 19 '22 20:11 Madis0

In singleplayer survival it wouldn't. But FO isn't just that and there are an infinite amount of servers that would.

What I don't understand is why you previously added these other mods/fixes. I don't see any situation where 1.19.3 fix would actually change anything in those scenarios.

isXander avatar Nov 20 '22 10:11 isXander

Languages with long words? That was used when suggesting tooltipfix.

isXander avatar Nov 20 '22 10:11 isXander

What I don't understand is why you previously added these other mods/fixes. I don't see any situation where 1.19.3 fix would actually change anything in those scenarios.

The mods were added primarily for the alignment, with wrapping being a bonus. Now I feel that because the alignment is fixed, the necessity of including a new mod just for wrapping needs to be elaborated - where is wrapping still critical and simple alignment is insufficient?

there are an infinite amount of servers that would. Languages with long words?

Screenshots?

Madis0 avatar Nov 20 '22 11:11 Madis0

play.wynncraft.net at FO default GUI scale:

Resolution --->
v Version v
854x480 (default) 1920x1080
Vanilla 1.19.2 2022-11-22_16 05 22 2022-11-22_16 05 09
1.19.2
with AT
2022-11-22_16 09 30 2022-11-22_16 09 16
Vanilla 1.19.3
(Wynncraft doesn't yet support 1.19.3)
2022-11-22_17 03 57 2022-11-22_17 03 52

command: /give @p stick{display:{Lore:['"this is a tall tooltip"','"this is a tall tooltip"','"this is a tall tooltip"','"this is a tall tooltip"','"this is a tall tooltip"','"this is a tall tooltip"','"this is a tall tooltip"','"this is a tall tooltip"','"this is a tall tooltip"','"this is a tall tooltip"','"this is a tall tooltip"','"this is a tall tooltip"','"this is a tall tooltip"','"this is a tall tooltip"','"this is a tall tooltip"','"this is a tall tooltip"','"this is a tall tooltip"','"this is a tall tooltip"','"this is a tall tooltip"','"this is a tall tooltip"','"this is a tall tooltip"','"this is a tall tooltip"','"this is a tall tooltip"','"this is a tall tooltip"','"this is a tall tooltip"','"this is a tall tooltip"','"this is a tall tooltip"','"this is a tall tooltip"','"this is a tall tooltip"']}}

Thanos1716 avatar Nov 22 '22 16:11 Thanos1716

What I don't understand is why you previously added these other mods/fixes. I don't see any situation where 1.19.3 fix would actually change anything in those scenarios.

The mods were added primarily for the alignment, with wrapping being a bonus. Now I feel that because the alignment is fixed, the necessity of including a new mod just for wrapping needs to be elaborated - where is wrapping still critical and simple alignment is insufficient?

There is a lot more than just wrapping in AT:

  • Transparency modification is QOL
  • Prioritize Tooltip Top is very useful for most servers (see above)
  • Tooltip scrolling is very useful for most servers (see above)
  • Bedrock centering is parity

And wrapping is also very versatile allowing the power user to decide which technique they like best: tooltipfix or debugify.

isXander avatar Nov 25 '22 21:11 isXander

Also a lot to come for the 1.19.3 update, more info soon.

isXander avatar Nov 25 '22 21:11 isXander

New features for 1.19.3:

  • Overwrite vanilla wrapping: prevents vanilla wrapping gui button tooltips and replaces with AdaptiveTooltip's (makes the game feel more consistent with AT on, all tooltips wrapped the same)
  • New 'half screen width' wrapping option: self explanatory
  • Only reposition hover tooltips: As of 1.19.3, Minecraft added two types of tooltip positioning: Hover & Focused. 'Hover' is the old method, 'Focused' places tooltips above or below a button widget. Disabling this setting allows AdaptiveTooltips to reposition all types of positioners, including focused and any other modded ones. This option is needed because it may result in unexpected behaviour with modded tooltips and such.
  • Prevent vanilla clamping: Removes the 1.19.3 "fix", required for some tweaks to function properly (Bedrock Centering).
  • Use YACL-style Tooltips: In GUIs, tooltips are positioned with the same method they are in YetAnotherConfigLib.
  • Remove first line padding: for some reason a 2px gap was made between the first and second line of tooltips which can look inconsistent in guis such as descriptions of vanilla options.

As you can see AdaptiveTooltips is more than just wrapping and has a lot more of QOL that makes the game just feel easier to deal with.

isXander avatar Nov 26 '22 17:11 isXander

Because it was an issue in the past and people convinced me to add it. But in 1.19.3 snapshot Mojang fixed it - not perfectly, but covers 90%+ of use cases imo.

So - I need more convincing about the big bad use cases that Mojang's fix does not cover.

What previous practical use cases got covered by this new .3 fix? Screenshots? I don't believe this fix actually does anything helpful.

isXander avatar Dec 08 '22 18:12 isXander

Well, 4.6.0-alpha.1 is out so y'all can have a test how it works in vanilla now :P

Madis0 avatar Dec 08 '22 19:12 Madis0

Is there any interest for this on the upcoming beta(s)? @Madis0

RaptaG avatar Apr 02 '23 19:04 RaptaG

No. 1.19.4 and even the April Fools snapshot showed that Mojang is taking tooltips more seriously now, so I don't see a need in a mod anymore.

Madis0 avatar Apr 02 '23 19:04 Madis0

Even the April Fools snapshot

How so?

RaptaG avatar Apr 02 '23 19:04 RaptaG

image image buttons being Copy to clipboard, Done

This will probably be properly introduced in the next 1.20 snapshot.

Madis0 avatar Apr 02 '23 19:04 Madis0

I hope they add something good, similar & serious (:trollface:) in vanilla, though this mod is super good

RaptaG avatar Apr 02 '23 19:04 RaptaG

I don't think a whole screen is really a good solution.

isXander avatar Apr 03 '23 15:04 isXander

I see the thumbs, so what things are still missing in vanilla 1.20.1?

Madis0 avatar Jul 05 '23 04:07 Madis0

Long tooltips can still get off-screen, Mojang's implementation is rather a workaround than a patch. When too long, tooltips are moved to the top left of the screen (which is also visually unpleasant for some people) and there, if they are even longer, they can still get cut off the screen. Adaptive Tooltips fixes that, tooltips stay on place without getting cut off and when they are too long, the is a tooltip scrolling option which can also be enabled. I think this sums it up..

RaptaG avatar Jul 05 '23 08:07 RaptaG