-
Notifications
You must be signed in to change notification settings - Fork 9
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 bugs, add rough API documentation and make code more consistent. #1
Open
expeehaa
wants to merge
17
commits into
styluslabs:master
Choose a base branch
from
expeehaa:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
expeehaa
force-pushed
the
master
branch
2 times, most recently
from
May 4, 2020 12:26
1327440
to
3934078
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When trying the server out I noticed that some features are not working, for example the displaying of which users are currently connected to the whiteboard.
I am not sure if some of these changes break compatibility with older NodeJS versions. They were tested with version 12.16.1.
Since there isn’t any documentation on how the API works I tried to understand it from the source code an created a file with my results.
Lastly, I tried to improve the code. Some method names were changed to be either consistent with javascript conventions or more descriptive of what they do (I do not like abreviated names since it feels like manual and inconsequent obfuscation of code), string concatenations using the "+" operator were replaced with string interpolation for readability.
I also made the controversial decision to change the formatting of the code, which might be the main risk of acceptance for this pull request. I like tabs more than spaces for indentation and having similar code aligned to each other, and I also do not like early returns because in my opinion they make the readability of code worse by having to search for all returns. I suppose that you do not agree with that since it basically changes everything and I didn’t think of committing these changes somehow indepent from the bug fixes back when I made the commits.