Skip to content

Fix merge conflict and some additional typos - #43

Open
DaniyelMe wants to merge 10 commits into
samuelgozi:masterfrom
DaniyelMe:fix-comments
Open

Fix merge conflict and some additional typos#43
DaniyelMe wants to merge 10 commits into
samuelgozi:masterfrom
DaniyelMe:fix-comments

Conversation

@DaniyelMe

Copy link
Copy Markdown
Contributor

@samuelgozi I've fixed the merge conflicts and I added some additional typo fixes.

@samuelgozi samuelgozi left a comment

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.

There are many small changes that are not really useful to fix. For example regular comments, and comments in tests. The problem with them is that it’s time consuming to check them, and the grammar fix doesn’t really alp at all.
I’ll approve the, this time, but please avoid investing time in such small changes.
All other changes are good, and welcome.

I’ll wait for any additional feedback from the community as English is not my first language, and please fix the requested changes.

Thank you!

Comment thread README.md Outdated
1. It is more secure. The reason you need to whitelist in the first place is for security.
2. It is way faster, in some cases up to 5 seconds faster.
3. I don't trust firebase (or anyone) with my user's private data, and you shouldn't either.
1. More secure, it's the reason you need to whitelist in the first place is for security.

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 fix is not good. The sentence doesn’t make sense. It should be:
It’s more secure. That’s the reason you need to whitelist in the first place is for security.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

resolved in #86991a5

Comment thread README.md Outdated
2. It is way faster, in some cases up to 5 seconds faster.
3. I don't trust firebase (or anyone) with my user's private data, and you shouldn't either.
1. More secure, it's the reason you need to whitelist in the first place is for security.
2. Way faster, in some cases up to 5 seconds faster.

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.

Here too. Omitting “It’s” doesn’t make sense.

Comment thread src/main.js Outdated
window.addEventListener('storage', e => {
// This code will run if localStorage for this user
// data was updated from a different browser window.
// This code will run if the local storage for this user

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.

The meaning was literally “localStorage” as in the API, so this one needs to remain as it was.

Comment thread src/main.js Outdated

/**
* Makes a post request to a specific endpoint and returns the response.
* Makes post request to a specific endpoint and return the response.

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.

Here too it should be as it was.
If you are checking this with grammarly or something similar it will think that “post” is a verb, but it isn’t, so it doesn’t make sense to remove “a”. And it should also remain “returns”.

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.

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.

The comment that’s it’s a bug is important so that future contributors know why the code does what it does. If it gets fixed in the future it will affect the way we want to handle it

Comment thread src/main.js Outdated
// (No docs on this...)
await this.storage.set(this.sKey('SessionId'), sessionId);
// Save if this is a fresh log-in or a "link account" request.
// Save if this is a fresh signed in or a "link account" request.

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.

Should be “sign in” not “signed in”

Comment thread src/main.js
// Check for the edge case in which the user signed out
// before completing the linkAccount request.
if (linkAccount && !this.user) throw Error('Request to "Link account" was made, but user is no longer signed-in');
if (linkAccount && !this.user) throw Error('Request to "Link account" was made, but user is no longer signed in');

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.

Changing error messages should be done separately or with a notice as some users might depend on the exact string.
Since this is a beta I’ll approve it but it’s can usually be considered a breaking change.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is important to know, I didn't know. Thanks.

Comment thread src/main.js

/**
* Sends an out-of-band confirmation code for an account.
* It can be used to reset a password, to verify an email address and send a sign-in email link.

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.

Sign-in is used as a noun here, so the hyphen should remain.

Comment thread src/main.js
Comment thread src/main.js Outdated
* @param {Object} newData An object with the new data.
* @throws Will throw if the user is not signed-in.
* @throws Will throw if the user is not signed in.
* Update user's profile.

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.

Again. The description should be on top. Please revert

@DaniyelMe

Copy link
Copy Markdown
Contributor Author

Thank you for your patient, I've fixed the requested changes.
It's wise to take the time and evaluate the changes by others, that's way I'm always asking @awinograd feedback.

Anyway, feel free to cherry pick changes, if at all.
Stay safe.

@awinograd awinograd 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.

Most of the changes are stylistic / personal preference. There are a handful of grammar fixes. Nothing harmful in my opinion

Comment thread src/main.js
}

/**
* Emits an event and triggers all the listeners.

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.

duplicate line

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I removed the other one (line78), thanks.

Comment thread src/main.js Outdated
* Updates the user data in localStorage.
* @param {Object} userData New user data.
* @param {boolean} [updateStorage = true] Check whether to update localStorage or not.
* @param {boolean} [persist = 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.

should be localStorage for consistency with the rest of comments

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

true, I'll fix it and another one in line 260.

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