-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Conversation
QA Wolf here! As you write new code it's important that your test coverage is keeping up. |
// 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) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Don't merge yet - small change needed. |
…se into type-portal-user-store-2
Description
Convert portal user store to TS.