Fix accidental dismissal of MultipleProductKey dialog #2109
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.
Overview 📄
Hey folks, this PR aims to improve the experience of user input when filling out Multiple Product Keys, by turning off dialog dismissals that could happen accidentally.
This came out of my own "Oh no, all my keys!" moment, when I accidentally clicked outside of the dialog.
Problem 🤔
The following are user interactions to dismiss the Multple Product Keys dialog, and the changes made to each
🖱️ Mouse
👍 No changes.
💥 This has now been disabled.
⌨️ Keyboard
💥 This has now been disabled.
The latter two user interactions can be awkward and were at fault for me personally, so I'm got rid of 'em.
Ideally, an alert of some kind like "You have unsaved Product Keys" canceable alert shown before dialog dismissal would be the solution I'd aim for, but I'm unfamiliar with the codebase and the solution in this PR seemed a reasonable shortcut.
Solution 🚀
There is a
bExplicitDismissalOnly
param that can be passed to the underlyingCModal
implementation in the SteamScriplet, this takes advantage of that! It's already in use in this extension, so I reckon it's a safe usage.