Refactor web app client source code #105
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Project/Client
Project/Server
Project/liblanbassador
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
luca0N/lanbassador!105
Loading…
Reference in a new issue
No description provided.
Delete branch "dev_client_refactor_consistency"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Make the web app client source code consistent.
Policies
The policies below define the coding convention for the Lanbassador web app client project.
String literals
All string literals must be enclosed with quotation mark characters
". Apostrophe characters (') for enclosing string literals are allowed for string literals with quotation marks in them, so as to avoid having to escape the quotation mark character.Importing
When importing multiple identifiers from other sources, use a trailing comma (after the last identifier that is being imported):
Indentation
All web app client source files should use the tab character (
\t) to indent lines, with the exception of the npm vendored files (package.jsonandpackage-lock.json), as these are auto-generated.Visibility
All class methods and fields must explicitly declare their visibility (e.g.,
private,protected,public), unless they are overridden and lack a visibility modifier on the parent class.b8aee8607586f6e006bbPrevious force-push operation from
b8aee86075to86f6e006bbwas made to include the same change on another file that was missing from the commit.b38b614f5a2fbab9ac6bPrevious force-push operation from
b38b614f5ato2fbab9ac6bwas made to fix the license header in a file.5c0222b89272415481f3Previous force-push operation from
5c0222b892to72415481f3was made to add missing changes to the i18n web app messages files.c8d017f8049cc7124e4f9cc7124e4f3b63b7b206Previous force-push operation from
c8d017f804to9cc7124e4fwas made to bump the year range in the source file header. Some other files that have an outdated year range may not have been modified, as the changes that were introduced in them are very trivial.Previous force-push operation from from
9cc7124e4fto3b63b7b206was made to correct a commit which used tab characters instead of spaces, unlike the rest of the web app client source tree.Speaking of tabs, I think all indentation in the web app source code should be changed to tabs instead of spaces, since both the server and liblanbassador source trees are using tab characters.
To be honest, I was just using whatever the default was in my text editor, so that is why it's different for the web app client source code. It would be a great idea to take advantage of this pull request and fix this issue now.
I could either write a workflow for checking the presence of space indentation (instead of tabs) or write a Git hook to fix this. I will probably do the latter, though it won't be possible for others to use it, unless I enforce it via server hooks.
WIP: Refactor web app client source codeto Refactor web app client source code69145455b0d53afed6b0Previous force-push operation from
69145455b0tod53afed6b0was made to fix incorrect indentation inServerComms.ts.@ -83,0 +79,4 @@.subscribe({next: r => {if (!r.ok || r.body == null)reject("An unknown error occurred while attempting to authenticate.");Incorrect indentation.
@ -86,1 +84,3 @@reject("An unknown error occurred while attempting to authenticate.")const response: any = r.body;if (response.response_code !== 0)reject("An unknown error occurred while attempting to authenticate.");Incorrect indentation.
d53afed6b047d24d5f34Previous force-push operation from
d53afed6b0to47d24d5f34was made to fix comments 2168 and 2169.14547ad915ff6e61e669Previous force-push operation from
14547ad915toff6e61e669was made to include missing changes that were left out of the commit.ff6e61e6692dc51cd719Previous force-push operation from
ff6e61e669to2dc51cd719was made to fix a build error, stemmed from an incorrect function access modifier.2dc51cd719a49dd7e049Previous force-push operation from
2dc51cd719toa49dd7e049was made to fix indentation on some lines that were left over.a49dd7e049596d8c4d10Previous force-push operation from
a49dd7e049to596d8c4d10was made to include missing documentation for theServerCommsclass.