Archipelago icon indicating copy to clipboard operation
Archipelago copied to clipboard

Core: Fix auto-fill in the text client when clicking on a hint suggestion

Open Ishigh1 opened this issue 9 months ago • 2 comments

What is this fixing or adding?

#2833 added more details to failed hints commands, which broke the hint suggestion copy system that was expecting a different string, so I fixed it here

How was this tested?

By left clicking the different things that are auto-fillable when clicked on

If this makes graphical changes, please attach screenshots.

image (previous behavior was the same but nothing in the textbox after a click)

Ishigh1 avatar May 04 '24 18:05 Ishigh1

Now that you say it, there's an edge case that won't work if the player hints for something that contains did you mean ' or ends with did you mean This case is so extreme I doubt it would be useful to spend time fixing it (the result is just something like !hint ', did you mean 'Hazardous Mechs), and there would be another edge case that would probably appear anyway, unless we totally change the way it works and the server sends a suggestion separately

Ishigh1 avatar May 04 '24 20:05 Ishigh1

Bonus Points for a Unittest that prevents this in the future.

Berserker66 avatar May 05 '24 04:05 Berserker66

I think making a new module util alongside Utils should not be part of this bug-fix pull request. (And I think other people expressed this in the discord discussions about it.)

I think it would be better to put it in Utils.py here, and another pull request could be made for reorganizing modules.

beauxq avatar May 17 '24 12:05 beauxq

Well then, where in Utils? At the end? No one gave me clear indications except Black Silver who said to put it inside a util module

Ishigh1 avatar May 17 '24 16:05 Ishigh1

Well then, where in Utils?

after get_fuzzy_results

beauxq avatar May 17 '24 20:05 beauxq

Well I moved it to where you suggested

Ishigh1 avatar May 17 '24 20:05 Ishigh1

Right, I forgot to reformat the file for once

Ishigh1 avatar May 17 '24 21:05 Ishigh1

image

Code looks fine. Let me know once this merge conflict is fixed and I'll revisit.

ThePhar avatar Jun 01 '24 11:06 ThePhar