rithmschool / cams-app-client Goto Github PK
View Code? Open in Web Editor NEWReact Front-End for CAMS
React Front-End for CAMS
app is sending a bunch of PATCH requests unnecessarily:
cams-app-client/src/ScreenWrapper.js
Lines 96 to 109 in e5d7e36
first, this request only needs to be sent when drag and drop is happening to re-order screens. Second, it would be better to only fire this event once (e.g. on a componentWillUnmount).
https://developer.mozilla.org/en-US/docs/Web/API/Navigator/getUserMedia
try using navigator.mediaDevices.getUserMedia
instead
Full screen if possible, but definitely bigger than their current size.
E.g. PatientHome
has props of assessment_id
and screenCount
Needs a test that mocks the BrowserDetect object in order to get a different snapshot.
We have an upload bar for doctors when they upload their own videos, we could recycle it for patients once they've completed their assessment.
Right now, if the camera isn't functioning, you can still progress through the assessment. (Thanks for catching this @aalanders!)
/login
and log in./login
again, and the form appears.cams-app-client/src/ScreenForm.js
Lines 62 to 88 in f202d7b
There are quite a few places where the same code is being written to grab the token from localStorage
, decode it, and find the logged in user's id. To remove duplication, it would be better to refactor this into a helper.
There's a lot of markup inside of the render
method that could probably be pulled out into a few different component files.
/playlist/home
needs some refactoring to accommodate the Question model. Right now, only videos get shown when a patient goes through the playlist, not questions.
Right now, after you've gone through an assessment and had your video recorded, you can click on the link and record the video again. Once the video has been recorded, the assessment shouldn't be accessible by patients any more.
indentation is a little inconsistent. Use 2 spaces throughout. Some files need to be looked over and fixed.
When I run the app locally, sometimes it seems like i'm being redirected to login before authentication is completed - i get a 401 and my playlists don't show up. Doesn't happen consistently, and when i refresh the page everything shows up normally.
Make sure that for files exporting a default component, the file name matches the component name. This currently isn't the case for a couple of files (e.g. Login
vs LoginForm
)
Some consistency around user/doctor assessment/patient
There are several client-side requests being made in the app that require an authorization header be sent. Rather than duplicating code across components and functions, you can tell axios to set this header on every request. App should be refactored so that on login, something like this happens:
axios.defaults.headers.common['Authorization'] = AUTH_TOKEN;
On logout, this default header can then be deleted.
spaceBarClick and index are marked as required but their values are undefined when loading assessment page
UI could use some improvement; there's no visual cue to press space bar after the timer is finished or a video is complete, for example. A little more visual polish overall would be good too.
I can't tell if it is being used by bootstrap or by our main.js as createElement.
either during playlist creation or edit
refactor these out. They're deprecated: https://facebook.github.io/react/docs/refs-and-the-dom.html
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.