-
Notifications
You must be signed in to change notification settings - Fork 15
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
Add remediation content #1114
Add remediation content #1114
Conversation
20554dc
to
1da0f4d
Compare
1da0f4d
to
a83b97a
Compare
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.
Nice catch on this @nelsonkopliku
|
||
export const getCheckRemediation = (catalog, checkID) => { | ||
const check = findCheck(catalog, checkID); | ||
return check?.remediation; |
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.
I guess having null
or undefined
here doesn't make much difference
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.
i guess so 😄 But if any preference I can change it to if whathever
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.
I changed to an if
for consistency with getCheckDescription
@@ -108,6 +111,13 @@ const prepareStateData = (checkExecutionStatus) => { | |||
|
|||
describe('ExecutionResults', () => { | |||
it('should render ExecutionResults with successfully fetched results', async () => { | |||
window.IntersectionObserver = jest.fn().mockImplementation(() => ({ |
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.
What is this IntersectionObserver
for?
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.
Headlessui dialog related need. Without it we get an error (which I don't remember now) and google helped me 😄
By the way @nelsonkopliku , I noticed in the gif that we are not rendering the modal title as markdown. Yet another good to have fix hehe |
@arbulu89 made also the dialog title a markdown. Thanks! I missed it 🚀 |
4734083
to
b4708ce
Compare
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.
LGTM!
Just a small idea about the Modal component.
For now we need to click somewhere outside the Modal, this may confuse the user on the first usage.
What do you think to add an Exit/Close button to it ?
@EMaksy I think it is a good idea, however, since we are going to revisit this soon I'd keep the close button as part of that improvement. Makes sense? |
Description
Adds the remediation content in the dialog that opens when clicking on a check row in ExecutionResults
How was this tested?
Automatic test added