-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Handle Undefined Ability in Adversary Profile #2574
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wohoo! Your first PR -- thanks for contributing!
Kudos, SonarCloud Quality Gate passed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clean code and clean interface -- great work! The feature itself works well, just a couple of minor comments. There are also a couple of console errors that pop up when I load the "Advanced Thief" adversary:
Those functions likely just need a catch for if a property is undefined since they don'
t affect how the page works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works great and the code is super clean, well done!
2db8783
to
6b3ad60
Compare
Kudos, SonarCloud Quality Gate passed! |
Description
Previously an "undefined ability" (An ability ID in the atomic ordering the .yml file that does not map to a known ability) would cause the UI to lock up and require a page reload. This PR resolves that lock up and adds a series of UI indicators to inform the user of the problem. Specifically a Icon and error message appears at the bottom of the Ability table. Also the undefined abilities are highlighted in red and call out the unknown Ability ID from the .yml file. This change also involved changing the look of the "unmet requirements" call out from a red outline to a orange outline to better fit the icons in use.
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
I added multiple "bogus" Ability IDs in the .yml file (data/adversaries/ade13716-230a-48ea-a9b6-2446c83fe716.yml) and verified that they locked up the page before. After my fix I verified that they no longer lock up the page or cause any unexpected behavior to occur.
Checklist:
Screenshots of new callouts:
Undefined Ability and Unmet Requirements:

Undefined Ability:
