-
Notifications
You must be signed in to change notification settings - Fork 66
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
(feat) adding support for questionInfo #152
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.
Looking at this UI now. A part of me thinks we should consider dedicating time and moving this tooltip next to the label.
<div className={styles.tooltipWithUnspecified}> | ||
<OHRIUnspecified question={field} onChange={onChange} handler={formFieldHandlers[field.type]} /> | ||
{field.questionInfo && <OHRITooltip field={field} />} | ||
</div> | ||
</div> | ||
) : ( | ||
questionFragment | ||
<div className={styles.parent}> | ||
{questionFragment} | ||
<div className={styles.tooltip}>{field.questionInfo && <OHRITooltip field={field} />}</div> | ||
</div> |
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.
Having 2 different references looks unnecessary. This can be condensed by renaming the class to some thing more generic and then adding the check only to show the Tooltip component
<div className={styles.tooltipWithUnspecified}> | ||
<OHRIUnspecified question={fieldDescriptor} onChange={onFieldChange} handler={handler} /> | ||
{fieldDescriptor.questionInfo && <OHRITooltip field={fieldDescriptor} />} | ||
</div> |
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.
same comment applies here about drying this out
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.
This has been resolved.
Requirements
Summary
This PR adds support for rendering a tooltip which gives the user more information about a field within the React Form Engine.
Screenshots
Related Issue
Other