Skip to content
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) O3-4026: Add an icon for the vitals and biometrics link to the left panel #2076

Closed
wants to merge 3 commits into from

Conversation

Munyua123
Copy link

@Munyua123 Munyua123 commented Oct 25, 2024

Requirements

  • This PR has a title that briefly describes the work done including the ticket number. If there is a ticket, make sure your PR title includes a conventional commit label. See existing PR titles for inspiration.
  • My work conforms to the OpenMRS 3.0 Styleguide and design documentation.
  • My work includes tests or is validated by existing tests.

Summary

I have added a function that allows someone to have an icon before the nav menu title

Screenshots

image
image

Related Issue

Other

Copy link
Collaborator

@CynthiaKamau CynthiaKamau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Munyua123 for this, kindly add a video or image so that guys can easily see the new changes

@Munyua123
Copy link
Author

@CynthiaKamau I have added the screenshots

@denniskigen denniskigen changed the title O3-4026 Add an icon for vitals and biometrics on the left nav (feat) O3-4026: Add an icon for the vitals and biometrics link to the left panel Oct 28, 2024
Copy link
Member

@denniskigen denniskigen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @Munyua123. I've left some comments.

return (
<div key={path}>
<div key={path} style={{ display: 'flex', alignItems: 'center' }}>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we move these styles to an .scss file?

<ConfigurableLink
className={classNames('cds--side-nav__link', { 'active-left-nav-link': path === navLink })}
to={`${basePath}/${encodeURIComponent(path)}`}
>
{t(title)}
<span style={{ display: 'flex', alignItems: 'center' }}>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto

@@ -22,13 +23,18 @@ export const DashboardExtension = ({
const location = useLocation();
const navLink = useMemo(() => decodeURIComponent(last(location.pathname.split('/'))), [location.pathname]);

const renderIcon = title === 'Vitals & Biometrics' ? <Activity style={{ marginRight: '8px' }} /> : null;
Copy link
Member

@denniskigen denniskigen Oct 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use ActivityIcon from the CarbonMRS icon pack in the framework here instead?

@Munyua123
Copy link
Author

@denniskigen All the comments above have been noted and iam making the changes

@Munyua123 Munyua123 closed this Oct 28, 2024
@Munyua123 Munyua123 deleted the vitals-biometrics branch October 28, 2024 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants