-
Notifications
You must be signed in to change notification settings - Fork 203
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
(fix) O3-3890 Help menu (and menu items) should use a standard Carbon… #1164
base: main
Are you sure you want to change the base?
Conversation
{t('docs', 'Docs')} | ||
</Link> | ||
label={t('documentation', 'Documentation')} | ||
onClick={() => window.open('https://o3-docs.openmrs.org', '_blank')} |
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.
Can we move the onClick handler to a function that's wrapped in a useCallback hook?
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.
Noted
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 wouldn’t expect these changes to be included here. Bad rebase?
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.
Yes, a mistake on my end, I'll fix it
{t('communityforum', 'Community forum')} | ||
</Link> | ||
label={t('communityforum', 'Community forum')} | ||
onClick={() => window.open('https://talk.openmrs.org', '_blank')} |
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.
Can we wrap the onClick
handlers in use callback hooks? Additionally, for security, it’s good to add noreferrer noopener
to external links:
const handleClick = useCallback(() => {
window.open('https://talk.openmrs.org', '_blank', 'noopener,noreferrer');
}, [url]);
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.
Noted
Requirements
feat
,fix
, orchore
, among others). See existing PR titles for inspiration.For changes to apps
If applicable
Summary
I have updated the help menu to use standard carbon menu items. This PR is related to this PR openmrs/openmrs-esm-user-onboarding#21
Screenshots
Related Issue
https://openmrs.atlassian.net/browse/O3-3890
Other