Banalian / ExtraLeaderboardPositions

Trackmania Next (2020) Plugin to see more key positions on the leaderboard
3 stars 8 forks source link

Refresh on crossing the finish line #21

Closed salem83 closed 1 year ago

salem83 commented 1 year ago

Thanks for the plugin! It replaces 3 other plugins ... Ultimate Medals, Map Rank, Champion Medal :) But I'm missing a small important feature ...

FR: could you please add a trigger to refresh when the finish line is crossed?

Thanks

Banalian commented 1 year ago

Hi ! Do you mean a way to refresh when crossing the end even if it wasn't a pb ? I might be able to, but that could lead to a lot of spam for shorter maps 😅. If you mean when a pb is set, that should already be the case, so if that doesn't work, that's a bug for me to fix !

In the meantime, you can shorten the refresh time in the settings to one minute, if that's enough for you

salem83 commented 1 year ago

Yes, if PB would be good. Currently i do a manual refresh, or set the auto refresh to 1min - but this is not healthy for the API ...

Or just update the PB time an let the auto refresh do the full update.

Banalian commented 1 year ago

Oh don't worry about the API side, if that becomes a trouble, i'll be the one doing changes on the backend to cache some stuff. Right now the usage is correct :D ! (If you're talking about my API)

Refreshing when a new PB is set should already be working. If that doesn't work, could you please tell me if there's anything in the log when that happens ? If there's nothing, i'm not sure what could be the trouble, but i'll do some research (also if you can manage to have some steps to reproduce that bug, that would help !)

salem83 commented 1 year ago

Just tested it. It seems already to work but it takes a few seconds. The time gets updated when the scoreboard is shown. The "Ultimate Medals" plugin updates the time immediately when the PB is set

image

Banalian commented 1 year ago

Oh yes, you can see the refreshing icon on the top right of the plugin :p

it's the current logic, I make requests to nadeo until I can get the new PB, meaning that the new record has been uploaded correctly, then I make all the requests to update the leaderboard, which is why it takes a few seconds sometimes

Is there anything that could help convey this ? Perhaps showing the new PB, but somehow telling that I don't have all the information on this new leaderboard yet ?

salem83 commented 1 year ago

Yes, it would be good to have the PB updated immediately.

As long as the refreshing icon is shown, i think this is enough to inform the user. Or would it be possible to make the icon yellow or red that it's more noticeable for the user?

Banalian commented 1 year ago

I could change the color, but I think it would make it less clear (yellow = warning and red = error). I might try to make it spin instead ?

About changing the PB immediatly, i'll try to see how feasable it is (either change the PB, and grey out the line while it's refreshing, OR show the new pb elsewhere, i'll see 🤔 )

salem83 commented 1 year ago

I get the point about the colors ... just green as long as its not a warning nor an error.

Basically, my issue was, I was not able to see the current PB (and how much i need to improve or I've achieved the time for hunting a specific medal).

From the view of the user, it would/might change the list 2 times ... once, for the updated PB and secondly, after the data retrieval has completed. This might be confusing, but is technically correct (since the update takes a while).

Would a setting like "Update PB immediately" (with a description) feasible? This wouldn't change the current known behaviour but could give the possibility to have the PB updated immediately and lets the user know, that the list might refresh twice.

Banalian commented 1 year ago

I'll look into it yes ! having an option to at least update the PB entry even if the leaderboard isn't refreshed should be doable I think. And i'll also see what I can do to make that refresh icon better ! I'll close this issue when these things are added 👌