Skip to content

Fix inconsistencies in the comments and some spaces - #42

Open
DaniyelMe wants to merge 4 commits into
samuelgozi:masterfrom
DaniyelMe:master
Open

Fix inconsistencies in the comments and some spaces#42
DaniyelMe wants to merge 4 commits into
samuelgozi:masterfrom
DaniyelMe:master

Conversation

@DaniyelMe

Copy link
Copy Markdown
Contributor

These are inconsistencies in the comments, and missing spaces.

@telesvar telesvar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Great changes, but I disagree with some. Please, check the comments ✌

Comment thread src/main.js Outdated

// If the response returned an error, try to get a Firebase error code/message.
// Sometimes the error codes are joined with an explanation, we don't need that(its a bug).
// Sometimes the error codes are joined with an explanation, we don't need that (its a bug).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think, "it's a bug" should be fixed too

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Agreed.

Comment thread src/main.js Outdated
/**
* Makes sure the user is signed-in and has up-to-date credentials.
* @throws Will throw if the user is not signed-in.
* Makes sure the user is logged in and has up-to-date credentials.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe logged in should be signed in everywhere? I long for "sign in" as this verb is used in the API.

Comment thread src/main.js Outdated
* @param {boolean} [updateStorage = true] Check whether to update localStorage or not.
* Updates the user data in the localStorage.
* @param {Object} userData The new user data.
* @param {boolean} [updateStorage = true] Whether to update local storage or not.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Check is essential here, otherwise the sentence is incomplete.

Also, I did not think about storage method can be replaced and may not be localStorage exclusively.

Maybe, "localStorage" should be replaced by "browser storage" in the comments?

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

This lib is used by some outside of the browser, that's why I try to avoid using any other term.
And localStorage is the name of the storage we are currently using by default, so I think its OK to use.

As for "check". I think the change is OK.

Comment thread src/main.js Outdated
* Sets up a function that will be called whenever the user state is changed.
* @param {function} callback Function to call when the event is triggered.
* @returns {function} The function that unsubscribes your callback after being called.
* Set up a function that will be called whenever the user state is changed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why removing s at the end of the "Set"?

@samuelgozi

Copy link
Copy Markdown
Owner

@DaniyelMe please look into some of the suggested changes made by @aidarkhanov.
Some of them I "thumbed-up" and are In my opinion needed changes.

Comment thread src/main.js Outdated
@DaniyelMe

Copy link
Copy Markdown
Contributor Author

@aidarkhanov can you please take a look to the changes/fixes I made.

@telesvar telesvar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Great!

But I realized, that "signed-in", "signed-out", "sign-in", "sign-out" should all be "signed in", "signed out", "sign in" and "sign out" as these are verbs. Therefore, dash there is incorrect.

Can you also fix all appearances of these verbs in the comments?

Comment thread src/main.js
/**
* Makes sure the user is logged in and has up-to-date credentials.
* @throws Will throw if the user is not signed in.
* Makes sure the user is signed-in and has up-to-date credentials.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Great!

But I realized, that "signed-in", "signed-out", "sign-in", "sign-out" should all be "signed in", "signed out", "sign in" and "sign out" as these are verbs. Therefore, dash there is incorrect.

Can you also fix all appearances of these verbs in the comments?

Comment thread src/main.js
*/
async enforceAuth() {
if (!this.user) throw Error('The user must be logged-in to use this method.');
if (!this.user) throw Error('The user must be signed-in to use this method.');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same

@samuelgozi

Copy link
Copy Markdown
Owner

@DaniyelMe Take your time, but I think you should work on a different branch, and then make a pull request to master.
That might be what's causing the conflicts.

All of your changes show as conflicts, and the name of both branches is the same so it makes it a little difficult to resolve.

@DaniyelMe

Copy link
Copy Markdown
Contributor Author

@samuelgozi Sorry for the mess, I've fixed all the merge conflicts and @aidarkhanov great suggestions.
The complete fix is on another pull-request, here #43.

Please let me know if I missed something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants