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

Add basic progress indicator to character tooltips #852

Merged
merged 1 commit into from
Mar 19, 2024

Conversation

Meorawr
Copy link
Member

@Meorawr Meorawr commented Mar 18, 2024

Note: this requires #850 to be merged in. The diff includes changes from that PR. The only functional change is the one added file and the tweaks to RegisterTooltip.lua.

This adds a new indicator icon to the tooltip that appears if there's any outstanding data exchange queries currently in-progress for the displayed character.

The indicator icon itself shows as the last icon at the bottom-left of the tooltip, after the glance and unread about page icons.

Wow_OOvkgfrilA.mp4

The icon only shows if we're expecting profile data from the target player. Notably, this means we don't display an icon for the initial 'vernum' exchange. If the target player does not send us any data packets for ~about a minute, then the exchange is considered to be timed out and the icon will hide.

There's two reasons for not tracking vernum exchanges. Firstly, we send that query out a lot with a very small cooldown; this would result in the icon showing and hiding quite a lot and for very small periods of time if there's no actual new data to download. The second reason is MSP addons; those never reply to vernum exchanges and so the icon ends up staying visible until the query times out.

The bulk of this work is in the actual request tracking mechanism, as our comms protocol doesn't make it trivial to track the actual progress of any queries without breaking backwards compatibility. Ideally we'd be able to track the actual progress of queries, but unfortunately the stream identifier is embedded as part of the serialized message sent through Chomp, and in most cases ends up at the very end of each full message.

@Meorawr Meorawr added this to the 2.8.0 milestone Mar 18, 2024
@Meorawr Meorawr requested a review from Solanya March 18, 2024 17:12
@Meorawr Meorawr self-assigned this Mar 18, 2024
This commit adds a new indicator icon to the tooltip that appears if
there's any outstanding data exchange queries currently in-progress for
the displayed character.

The indicator icon itself shows as the last icon at the bottom-left of
the tooltip, after the glance and unread about page icons.

The icon only shows if we're expecting profile data from the target
player. Notably, this means we *don't* display an icon for the initial
'vernum' exchange. If the target player does not send us any data
packets for ~about a minute, then the exchange is considered to be timed
out and the icon will hide.

There's two reasons for not tracking vernum exchanges. Firstly, we send
that query out a lot with a very small cooldown; this would result in
the icon showing and hiding quite a lot and for very small periods of
time if there's no actual new data to download.

The second reason is MSP addons; those never reply to vernum exchanges
and so the icon ends up staying visible until the query times out.

The bulk of this work is in the actual request tracking mechanism, as
our comms protocol doesn't make it trivial to track the actual progress
of any queries without breaking backwards compatibility. Ideally we'd be
able to track the actual progress of queries, but unfortunately the
stream identifier is embedded as part of the serialized message sent
through Chomp, and in most cases ends up at the very end of each
full message.
@Meorawr Meorawr force-pushed the feature/tooltip-transfer-progress branch from 98a1209 to 850211a Compare March 18, 2024 19:42
@Solanya Solanya merged commit 80836f6 into main Mar 19, 2024
1 check passed
@Solanya Solanya deleted the feature/tooltip-transfer-progress branch March 19, 2024 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants