-
Notifications
You must be signed in to change notification settings - Fork 43
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 questionnaire view driven from example yaml #1285
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #1285 +/- ##
==========================================
+ Coverage 43.08% 43.09% +0.01%
==========================================
Files 143 143
Lines 4296 4297 +1
Branches 998 998
==========================================
+ Hits 1851 1852 +1
Misses 2364 2364
Partials 81 81
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
665f00e
to
3d08047
Compare
a5a325b
to
e22354c
Compare
c08c506
to
0186998
Compare
0186998
to
669152f
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.
gave a couple thoughts but lgtm otherwise
const mapRiskToStatus = (risk: string): IconedStatusPreset => { | ||
switch (risk) { | ||
case "green": | ||
return "LowRisk"; |
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.
if you wanted to not add to the IconedStatus
component, you could just return from here...
"green" = <IconedStatus preset="ok" />
(as it already matches that preset)
"unknown" = <IconedStatus preset="unknown" />
"red" = <IconedStatus icon={<TimesCircleIcon />} status="danger" />
"yellow" = <IconedStatus icon={<WarningTriangleIcon />} status="warning" />
and then line 88 could be just { mapRiskToStatus(answer.risk) }
.. although maybe rename to getIconByRisk
but more of a matter of preference and if we expect these presets to be reused
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.
Done!
className="tab-content-container" | ||
style={{ flex: 1 }} | ||
> | ||
<Table |
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.
using the new table, nice.
would it make sense to pull this into its own component?
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.
Done - much cleaner page level component now.
3a257d8
to
47c3adf
Compare
@@ -5,6 +5,7 @@ import CheckCircleIcon from "@patternfly/react-icons/dist/esm/icons/check-circle | |||
import TimesCircleIcon from "@patternfly/react-icons/dist/esm/icons/times-circle-icon"; | |||
import InProgressIcon from "@patternfly/react-icons/dist/esm/icons/in-progress-icon"; | |||
import ExclamationCircleIcon from "@patternfly/react-icons/dist/esm/icons/exclamation-circle-icon"; | |||
import WarningTriangleIcon from "@patternfly/react-icons/dist/esm/icons/warning-triangle-icon"; |
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.
remnant
switch (risk) { | ||
case "green": | ||
return <IconedStatus preset="Ok" />; | ||
case "unknown": |
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.
nit really but could probably just let this fall into default
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.
Done.
Add answer table Add tags to be applied labels for questions with conditional tags Fix weight icons and status Signed-off-by: ibolton336 <[email protected]>
a916193
to
aa8607b
Compare
Resolves #1275