Skip to content
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

add documentation for memberUtils #571

Closed
wants to merge 1 commit into from

Conversation

oscarwang20
Copy link
Contributor

Summary

This PR adds some documentation for memberUtils in the IDOL backend.

@oscarwang20 oscarwang20 requested a review from a team as a code owner December 4, 2023 01:06
@dti-github-bot
Copy link
Member

[diff-counting] Significant lines: 24.

* Computes the differences between the currently approved members and the
* members who've submitted changes to their profiles.
* @param allApprovedMembersList - the list of all approved members.
* @param allLatestMembersList - the list of all members who've submitted changes.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Or is this just all the non-approved member data for all members? I.e. some members in this array could be the same as the member in the approvedMembersList?

I'd double check this docstring.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think allLatestMembersList is the list of members coming from members and allApprovedMembersList is just the list of members coming from approved-members.

@henry-li-06
Copy link
Collaborator

henry-li-06 commented Dec 4, 2023

I would really suggest not documenting this file purely for the sake of adding documentation 🙃

cc: @andrew032011

@@ -15,6 +26,11 @@ export const filterImagesResponse = (
fileName: image.fileName.slice(image.fileName.indexOf('/') + 1)
}));

/**
* Serialize an `IdolMember` from a Firestore document reference.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
* Serialize an `IdolMember` from a Firestore document reference.
* Materialize an `IdolMember` from a Firestore document reference.

Comment on lines +13 to +18
/**
* Filters the response from Google Cloud Storage to only include the filename
* of the image.
* @param images - a list of image filenmaes and their URLs.
* @returns a list of profile images.
*/
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd make this more descriptive of what the filename (does it contain the full path, does it contain the file extension, what file extensions are there, etc) looks like and what the purpose of the URL is.

@@ -15,6 +26,11 @@ export const filterImagesResponse = (
fileName: image.fileName.slice(image.fileName.indexOf('/') + 1)
}));

/**
* Serialize an `IdolMember` from a Firestore document reference.
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should really also mention how this will lookup members from the members archive if the member isn't found in the db and will return undefined if the member doesn't exist in the db or the members archive.

* Computes the differences between the currently approved members and the
* members who've submitted changes to their profiles.
* @param allApprovedMembersList - the list of all approved members.
* @param allLatestMembersList - the list of all members who've submitted changes.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think allLatestMembersList is the list of members coming from members and allApprovedMembersList is just the list of members coming from approved-members.

* Filters the response from Google Cloud Storage to only include the filename
* of the image.
* @param images - a list of image filenmaes and their URLs.
* @returns a list of profile images.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
* @returns a list of profile images.
* @returns An array containing metadata about all member profile images.

@oscarwang20 oscarwang20 closed this Mar 4, 2024
@oscarwang20 oscarwang20 deleted the ow39/memberUtils-documentation branch March 24, 2024 19:53
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.

4 participants