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

AdaptiveTooltips #520

Open
isXander opened this issue Nov 19, 2022 · 25 comments
Open

AdaptiveTooltips #520

isXander opened this issue Nov 19, 2022 · 25 comments
Labels
mod New Fabric mod to include on hold Mods that are waiting for something before inclusion

Comments

@isXander
Copy link
Contributor

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 isXander added the mod New Fabric mod to include label Nov 19, 2022
@isXander isXander changed the title [Mod Request] AdaptiveTooltips AdaptiveTooltips Nov 19, 2022
@Madis0
Copy link
Member

Madis0 commented Nov 19, 2022

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

@Madis0 Madis0 added the on hold Mods that are waiting for something before inclusion label Nov 19, 2022
@isXander
Copy link
Contributor Author

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

@Madis0
Copy link
Member

Madis0 commented Nov 19, 2022

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.

@isXander
Copy link
Contributor Author

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
Copy link
Contributor Author

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

@Madis0
Copy link
Member

Madis0 commented Nov 19, 2022

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).

@osfanbuff63
Copy link
Member

osfanbuff63 commented Nov 19, 2022

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').

@Madis0
Copy link
Member

Madis0 commented Nov 19, 2022

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.

@isXander
Copy link
Contributor Author

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
Copy link
Contributor Author

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

@Madis0
Copy link
Member

Madis0 commented Nov 20, 2022

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?

@Thanos1716
Copy link

Thanos1716 commented Nov 22, 2022

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"']}}

@isXander
Copy link
Contributor Author

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
Copy link
Contributor Author

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

@isXander
Copy link
Contributor Author

isXander commented Nov 26, 2022

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
Copy link
Contributor Author

isXander commented Dec 8, 2022

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.

@Madis0
Copy link
Member

Madis0 commented Dec 8, 2022

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

@osfanbuff63 osfanbuff63 mentioned this issue Dec 31, 2022
@RaptaG
Copy link
Contributor

RaptaG commented Apr 2, 2023

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

@Madis0
Copy link
Member

Madis0 commented Apr 2, 2023

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.

@RaptaG
Copy link
Contributor

RaptaG commented Apr 2, 2023

Even the April Fools snapshot

How so?

@Madis0
Copy link
Member

Madis0 commented Apr 2, 2023

image
image
buttons being Copy to clipboard, Done

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

@RaptaG
Copy link
Contributor

RaptaG commented Apr 2, 2023

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

@isXander
Copy link
Contributor Author

isXander commented Apr 3, 2023

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

@Madis0
Copy link
Member

Madis0 commented Jul 5, 2023

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

@RaptaG
Copy link
Contributor

RaptaG commented Jul 5, 2023

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..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mod New Fabric mod to include on hold Mods that are waiting for something before inclusion
Projects
None yet
Development

No branches or pull requests

5 participants