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

Convert portal user store to TS #15327

Merged
merged 13 commits into from
Jan 13, 2025
Merged

Convert portal user store to TS #15327

merged 13 commits into from
Jan 13, 2025

Conversation

aptkingston
Copy link
Member

Description

Convert portal user store to TS.

Copy link

qa-wolf bot commented Jan 8, 2025

QA Wolf here! As you write new code it's important that your test coverage is keeping up.
Click here to request test coverage for this PR!

@github-actions github-actions bot added the size/m label Jan 8, 2025
Base automatically changed from type-portal-org-store to master January 9, 2025 09:33
@aptkingston aptkingston marked this pull request as ready for review January 9, 2025 10:40
@aptkingston aptkingston requested a review from a team as a code owner January 9, 2025 10:40
@aptkingston aptkingston requested review from mike12345567 and removed request for a team January 9, 2025 10:40
Comment on lines 32 to 36
// Update quotas after any add or remove operation
this.create = this.refreshUsage(this.create)
this.save = this.refreshUsage(this.save)
this.delete = this.refreshUsage(this.delete)
this.bulkDelete = this.refreshUsage(this.bulkDelete)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would worry that this method of implementing quota updates is quite confusing. I can envision myself reading each of these implementations, having not seen this constructor, and believing we may have a bug where we're not updating quota.

It's repetitive and a bit lame, but putting the quota refresh inline in each of these functions would lead to easier to understand code.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yea that's fair. I did a straight copy of the old code (and probably wouldn't have implemented this way from scratch), but I'll refactor it in the interest of readability.

@aptkingston
Copy link
Member Author

Don't merge yet - small change needed.

@aptkingston aptkingston added the do not merge PR is not ready to be merged - generally the PR description should say why label Jan 13, 2025
@aptkingston aptkingston marked this pull request as draft January 13, 2025 10:17
@aptkingston aptkingston marked this pull request as ready for review January 13, 2025 10:38
@aptkingston aptkingston removed the do not merge PR is not ready to be merged - generally the PR description should say why label Jan 13, 2025
@aptkingston aptkingston enabled auto-merge January 13, 2025 11:07
@aptkingston aptkingston merged commit 0468dac into master Jan 13, 2025
20 checks passed
@aptkingston aptkingston deleted the type-portal-user-store-2 branch January 13, 2025 11:07
@github-actions github-actions bot locked and limited conversation to collaborators Jan 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants