-
Notifications
You must be signed in to change notification settings - Fork 514
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:#4558 Optimize Camera Feed for Mobile Usage #7363
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
❌ Deploy Preview for care-egov-staging failed.
|
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.
Use aspect-ratio
of tailwindcss instead of using js to handle this logic
https://tailwindcss.com/docs/aspect-ratio#setting-the-aspect-ratio
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.
We could do something like the Live Feed page. https://care.ohc.network/facility/0c95c7f0-e1d2-4aff-83fa-933cef60d3a8/live-monitoring?location=09ab6e88-9132-434a-b8ab-b342b10e7bef&page=1&limit=4 |
@rithviknishad |
Can we also make the buttons of uniform height? The preset buttons looks broken with various when there are many presets |
@rithviknishad these buttons? |
@rithviknishad where exactly is this page located |
@rithviknishad its says page not found |
Use dev district admin credentials as mentioned in the readme |
IMO this doesn't seem to be any better than before. We could have a select menu instead like how I've mentioned in #7363 (comment) |
<div className="flex flex-wrap items-center bg-gray-100"> | ||
<Popover className="relative"> | ||
<Popover.Button> | ||
<ButtonV2 variant="secondary" border> | ||
<CareIcon className="care-l-setting text-lg" /> | ||
Presets | ||
</ButtonV2> | ||
</Popover.Button> | ||
<Transition | ||
as={Fragment} | ||
enter="transition ease-out duration-200" | ||
enterFrom="opacity-0 translate-y-1" | ||
enterTo="opacity-100 translate-y-0" | ||
leave="transition ease-in duration-150" | ||
leaveFrom="opacity-100 translate-y-0" | ||
leaveTo="opacity-0 translate-y-1" | ||
> | ||
{preset.meta.preset_name || `Preset ${index + 1}`} | ||
</button> | ||
))} | ||
<Popover.Panel className="absolute z-30 mt-1 h-60 w-60 -translate-x-1/3 overflow-y-scroll px-4 sm:px-0 md:w-96 md:-translate-x-1/2 lg:max-w-3xl"> | ||
<div className="rounded-lg shadow-lg ring-1 ring-gray-400"> | ||
<div className="rounded-t-lg bg-gray-100 px-6 py-4"> | ||
<span className="block text-sm text-gray-800"> | ||
Camera(s) preset | ||
</span> | ||
</div> | ||
<div className="flex flex-col"> | ||
{bedPresets?.map((preset: any, index: number) => ( | ||
<ButtonV2 | ||
key={preset.id} | ||
variant={ | ||
currentPreset === preset ? "primary" : "secondary" | ||
} | ||
onClick={() => { | ||
setLoading(CAMERA_STATES.MOVING.GENERIC); | ||
// gotoBedPreset(preset); | ||
absoluteMove(preset.meta.position, { | ||
onSuccess: () => { | ||
setLoading(CAMERA_STATES.IDLE); | ||
setCurrentPreset(preset); | ||
console.log( | ||
"onSuccess: Set Preset to " + | ||
preset?.meta?.preset_name | ||
); | ||
triggerGoal("Camera Preset Clicked", { | ||
presetName: preset?.meta?.preset_name, | ||
consultationId, | ||
userId: authUser.id, | ||
result: "success", | ||
}); | ||
}, | ||
onError: () => { | ||
setLoading(CAMERA_STATES.IDLE); | ||
setCurrentPreset(preset); | ||
console.log( | ||
"onError: Set Preset to " + | ||
preset?.meta?.preset_name | ||
); | ||
triggerGoal("Camera Preset Clicked", { | ||
presetName: preset?.meta?.preset_name, | ||
consultationId, | ||
userId: authUser.id, | ||
result: "error", | ||
}); | ||
}, | ||
}); | ||
getCameraStatus({}); | ||
}} | ||
className="w-full" | ||
> | ||
{preset.meta.preset_name || `Preset ${index + 1}`} | ||
</ButtonV2> | ||
))} | ||
</div> | ||
</div> | ||
</Popover.Panel> | ||
</Transition> | ||
</Popover> |
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.
hmm ok Co-authored-by: Rithvik Nishad <[email protected]>
hmm ok Co-authored-by: Rithvik Nishad <[email protected]>
0a85cc1
to
d9f1321
Compare
👋 Hi, @bishwas-10, This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there. |
Closing as stale + deploy failed not fixed + conflicts + solved in #7654 |
Proposed Changes
Fixes Optimize Camera Feed for Mobile Usage #4558
made camera feed responsive by positioning them
before
after
@coronasafe/care-fe-code-reviewers @coronasafe/code-reviewers
Merge Checklist