Skip to content

Gem Selection Improvements#9786

Open
Peechey wants to merge 3 commits intoPathOfBuildingCommunity:devfrom
Peechey:feature/gem-select-improvements
Open

Gem Selection Improvements#9786
Peechey wants to merge 3 commits intoPathOfBuildingCommunity:devfrom
Peechey:feature/gem-select-improvements

Conversation

@Peechey
Copy link
Copy Markdown
Contributor

@Peechey Peechey commented Apr 20, 2026

Description of the problem being solved:

Fixing up the GemSelects to process only when the buffer matches a gem name rather than always running the code for the gem at index 1 in the search list for every single change to the buf. The gem will only be added if you: 1) click the gem 2) type the name out entirely or 3) use the arrows to select one from the list. If you have a gem and then backspace, we would now only run the cycle once to remove the gem as it doesn't match anymore. Simple rule is one cycle per match, not one cycle per changeFunc/buf change.

I would like to do this for the other GemSelects but the changeFunction and structure of those are not the same and it's proving difficult.

Update 1: I've got it working for the slotGemSelects. Adding a before and after to show we are calling the buildFlag less often. The behavior is not exactly 1:1 between Imbued and Slot because the gemChangeFuncs are quite different. The main one I can think of is for imbued if you have a valid gem and backspace a character/make it an invalid name it will immediately process and remove the imbued. However, for the SlotGems it won't process with an invalid gem name until you click away from the dropdown. With the SlotGems, processing an invalid name means delete the gemInstance and I don't necessarily want to do that the moment the gem name doesn't match anymore.

Steps taken to verify a working solution:

There are a couple different states to keep in mind:

  • No Imbued > Open Dropdown > Click/Arrow to any in the list > Verify on group hover the correct gem is imbued
  • No Imbued > Open Dropdown > Type whatever that matches a support > Verify on group hover no gems are imbued unless the buffer matches a full gem name
  • Imbued > Dropdown > Backspace against the name, verify on first backspace the gem is removed as an imbued on hover > Verify clicking off the dropdown with an incomplete/non-matching name that the imbued select is cleared out.
  • Double check the clear button as I did a slight refactor of the function to reuse it elsewhere
  • Double check importing imbued as I slightly changed the gemChangeFunc for imbued

  • Click new gemInstance, click away from dropdown, verify no gem added
  • Click new gemInstance, type any character, e.g. "c", verify "Cast When Stunned" NOT added when hovering the gemList, click away from dropdown, verify Cast When Stunned NOT added and verify gemInstance was deleted
  • Click new gemInstance, click Cast When Stunned, verify added as expected, click Cast When Stunned, backspace at least one character and then click away, verify gemInstance deleted and CWS removed from the gemList on hover
  • Click new gemInstance, pick CWS, backspace the gemName completely and verify Cruelty is NOT active on gemList hover

Link to a build that showcases this PR:

eNqtXN132rgSf97-FT68N3yGkD2ke8gHTc5JGi6k7b1PPcIWoK1ssZJMwv71VyPZxoCNZew-tGDmNzMazYyk0bjDvz586mwwF4QFN432Ravh4MBlHgmWN43vb-PPg8ZfXz4NJ0iuXhe3IaHwy5dPfwz1Z8dHJJgx9zeWXzkL14pDw9kQ_P7CPHzTeHqZvE7fGs4cBR6RN41vLMANh-INpprSpUiIb8hXpDNXKdBwkHBx4N3tnhvIGgVyhVnwgv5m_Cvzjp6TYO-5u0IcuRLzZ5A1CiUzCkkeql8l4kssf8SD7v5qNdSI_hhOKNpiPpNIOkL9ddMYKcOgJX4kUo0K0VBx6Pc6F53WZaN5EnEbciHvka8-2iJna4y9hLiTRzbh-GGxwK4kG3zHibxbocBNCcnDlaV9Cakka0owT-jbF7nKPx4xb7daecRvTCJ6P5ntaDuD3kWvfZqe7eYgl_NPIle3VNmxBHfAPC0DInFJ0IQRwYIzxpGG5A7lLqRURZoV7RQLzDdIkn118nkzf06CUlYacYxeF8bzpsgjoXjBkmOR4LsX13nYFxSgOyZ289dpnSKdYK5ygNxDFAFm2GUqbaQhPRsh2dBc5DNZYHvKUgOJAGW1OW8cDzNbutKMz1NoqhKlHeWMhdSSUnILj5vif9KE3as8wnv8YcHuKZB2QtOE7cvLfKkbJvXKWDRcnV0eHiepALjoXrWuW4Pe4GpwlTuuyWoriIvoC_ogfuirTP6GfuOdwP4J_1uuZKCSVB4035hjwnEeqnedn7eoV16WWpiYyIUNTkWXhRHUsu3-CbRPgWsXst8DrvN1arXvnwRMVSDBtmJOsSViJyIKR5tl2Yha4iCSt7UbzjPG7uqr2gZOkcR2CTuhujxtVqC1MisQZpi127EDHBqp3zuFy7HR6fWvpJUeAsyX29mKYOqVo44Vu0NrixQJVk6jray9L66U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HggVZRm0U5kvUSKGVTJ44kkiKYdOqe5z2myQmFLl4xaiHeXTsxKDmfl_q7pza6cSvMOVC4bRzCOu28kHrpCM37g_b4XqtImHqSTkdXWMWdQiSHNE3ssT8DnpfdvjLIpnQB3kodHDdt1B1Ak6SGMXCkPFJzFa3dP9rgikyYrIdTKoRrXavSLuk6fQcF0k10dpo6SfvSuoYekSUsnclWjeCHRVRTk_codxukXXivXYM6LevB9cFmKi2EEOuWkVCdLtjypt6ttYv5VHgHWdMF8BKyYm62VUynKIgLeyqZTuu89wDXhvFHHszXbWBsJ5hukh5yIn4mbmMuyuNFFY-JciS0NeF3nApmN6aWcBmK3V2KSEGWnMzUuOpoewMsh8qRuoU-2yDvdvtiNLtcQmymSwcZo3S3-DjG8cYqobOv4zF_bndhv72P9P9qIuhM8mhXxIe_9c8zu3q08uYXtgcDwtJAhQdXKmKBWWn95G3gVG_qd1Gqtt3vcaBt7cUgmpxF7BufYzWQPji-EhIzLdRQQN0C5gHOlwOBt0uqA29hIhvR7t346FQrPs_XRoC-hGJ1Rh6kXdvtXcajgSL7N5y7wyiN-6jMjPa59eKltzv02fTPrqSci3-bDbf398v1kiu2AJ_qGXwwmV-c61AajSfdbn4MwhqjtSf2-VI_zFNmDGnoSlai8ghYPfDiRpiNKFgBT2XYKYvn4bNw_9s4P_KCrk3

imbued before

beforeImbuedImprovements

imbued after

afterImbuedImprovements

buildFlag calls for slotGemSelect before

buildFlagCountBefore

buildFlag calls for slotGemSelect after

buildFlagCountAfter

@Peechey Peechey changed the title Imbued Support Selection Improvements Gem Selection Improvements Apr 21, 2026
@Peechey Peechey marked this pull request as ready for review April 21, 2026 05:52
@Peechey Peechey added the bug: behaviour Behavioral differences label Apr 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug: behaviour Behavioral differences

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant