Fix tooltip positioning and size for multi-column tooltips#9806
Open
majochem wants to merge 6 commits intoPathOfBuildingCommunity:devfrom
Open
Fix tooltip positioning and size for multi-column tooltips#9806majochem wants to merge 6 commits intoPathOfBuildingCommunity:devfrom
majochem wants to merge 6 commits intoPathOfBuildingCommunity:devfrom
Conversation
If tooltips with more than 1 column overflow the viewport they are now moved to the left, as much as needed and the viewport allows
Tooltip column size previously blindly copied the width of the first column, which could lead to massive waste of space for uniques with very long mods.
Disclaimer: I had an AI generate the texts for this one, as it's just busy work, but I did check the output for correctness and I do find the annotations generally helpful. You can totally leave out this commit though, if you prefer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of the problem being solved:
Hover tooltips that require multiple columns (usually item comparisons), do not always correctly reposition to the maximum amount of content on screen, which hides a lot of valuable information
Multi-column tooltips generally often waste horizontal space, because they inherit the width from the first columns, which can be much wider, e.g. for unique items with long mods
This PR makes two changes to address that behavior:
viewPortSteps taken to verify a working solution:
Limitations:
Link to a build that showcases this PR:
https://pobb.in/P0OpEhfbjoHc
(Just random build, not specifically generated for this issue)
Before vs After Screenshot 1:
Hover tooltip cut off

Repositioned and no longer cut off

Before vs After Screenshot 2:
Static tooltip wasting space (trying to add Abberath's Hooves)

Second column only as wide as needed for the text
