Add Comments for methods, classes and interface.#254
Open
SushilMallRC wants to merge 4 commits intomasterfrom
Open
Add Comments for methods, classes and interface.#254SushilMallRC wants to merge 4 commits intomasterfrom
SushilMallRC wants to merge 4 commits intomasterfrom
Conversation
DaKingKong
reviewed
Apr 29, 2024
|
|
||
| import {SDK} from '@ringcentral/sdk'; | ||
|
|
||
| // Utility function to get display name |
Contributor
There was a problem hiding this comment.
What is a display name? Who's name? A user? A service? Or something else
| // Utility function for delaying execution | ||
| const delay = () => new Promise(res => setTimeout(res, 0)); | ||
|
|
||
| // Interface for the state of AuthGate component |
| authError: null | Error; | ||
| } | ||
|
|
||
| // Interface for the render props provided by AuthGate |
| logout: () => Promise<any>; | ||
| } | ||
|
|
||
| // Interface for the props of AuthGate component |
| children: (props: AuthGateRenderProps) => any; | ||
| } | ||
|
|
||
| // AuthGate component definition |
Contributor
There was a problem hiding this comment.
What does AuthGate do in general?
| // Handler for before event | ||
| public before = () => this.mounted && this.setState({authorizing: true}); | ||
|
|
||
| // Handler for error event |
Contributor
There was a problem hiding this comment.
What does this do in the handler?
| // Handler for error event | ||
| public error = async e => this.updateState(e); | ||
|
|
||
| // Handler for success event |
Contributor
There was a problem hiding this comment.
What does this do in the handler?
| // Handler for success event | ||
| public success = async () => this.updateState(null); | ||
|
|
||
| // Method to get login URL |
| } | ||
| }; | ||
|
|
||
| // Method to update state |
Contributor
There was a problem hiding this comment.
Need more description of this method. This looks a bit like an unauth, which is confusing. Why is authorizing set to false?
| }); | ||
| }; | ||
|
|
||
| // Render method |
Contributor
There was a problem hiding this comment.
Not this one, but the one below if you expand the hidden code for Line 153 ~162.
There's a clear comment saying TODO Definition there. That's a very clear sign that we want to add its definition there.
This file contains hidden or 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
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.
No description provided.