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

Show more CNS monitors on large displays #7440

Closed

Conversation

MjStar24
Copy link

Proposed Changes

@coronasafe/care-fe-code-reviewers @coronasafe/code-reviewers

@MjStar24 MjStar24 requested a review from a team as a code owner March 19, 2024 16:26
Copy link

vercel bot commented Mar 19, 2024

@MjStar24 is attempting to deploy a commit to the Open Healthcare Network Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

netlify bot commented Mar 19, 2024

Deploy Preview for care-egov-staging ready!

Name Link
🔨 Latest commit 2bd9918
🔍 Latest deploy log https://app.netlify.com/sites/care-egov-staging/deploys/660d22166a2b770009e2ac8b
😎 Deploy Preview https://deploy-preview-7440--care-egov-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Comment on lines 79 to 88
const size = useBreakpoints({ "4k": 2560, default: 1920 });

useEffect(() => {
if (size < LARGE_SCREEN_WIDTH) {
setPerPageLimit(PER_PAGE_LIMIT);
} else {
setPerPageLimit(PER_PAGE_LIMIT_LARGE);
}
}, [size]);

Copy link
Member

Choose a reason for hiding this comment

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

You don't need a useState nor useEffect when using useBreakpoints since you could directly set the per page limits.

Suggested change
const size = useBreakpoints({ "4k": 2560, default: 1920 });
useEffect(() => {
if (size < LARGE_SCREEN_WIDTH) {
setPerPageLimit(PER_PAGE_LIMIT);
} else {
setPerPageLimit(PER_PAGE_LIMIT_LARGE);
}
}, [size]);
const perPageLimit = useBreakpoints({ "4k": 9, default: 6 });

Copy link
Author

Choose a reason for hiding this comment

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

"My apologies, @rithviknishad. I became a bit confused with the useBreakpoints hook. I've made the necessary updates now

@rithviknishad rithviknishad changed the title display CNS on large display Show more CNS monitors on large displays Mar 22, 2024
@Ashesh3
Copy link
Member

Ashesh3 commented Mar 23, 2024

@nihal467
Copy link
Member

image

@MjStar24 when we are viewing the cns page of a facility, its crashing and showing a white page.

@MjStar24
Copy link
Author

hey @nihal467 now its working

Copy link
Member

@rithviknishad rithviknishad left a comment

Choose a reason for hiding this comment

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

@MjStar24

Although it renders more monitors in 4K display, there is a lot of unused space in each of the monitor. Can we use grid-cols-5 for 4K screens? (Consider adding a breakpoint to tailwind config itself if not present).

image

Expected:

image

Copy link

Hi, This pr has been automatically marked as stale because it has not had any recent activity. It will be automatically closed if no further activity occurs for 7 more days. Thank you for your contributions.

@github-actions github-actions bot added the stale label Apr 11, 2024
Copy link

Hi, @gigincg, @nihal467, @khavinshankar, @mathew-alex, This pr has been automatically closed because it has not had any recent activity. Thank you for your contributions. Feel free to repopen the pr.

@github-actions github-actions bot closed this Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show more monitors in CNS on very large displays
4 participants