Conversation
📚 Storybook for dfd4276: 📦 Build files for dfd4276:
🎭 Playwright reports for dfd4276: |
|
Size Change: 0 B Total Size: 2.31 MB ℹ️ View Unchanged
|
assets/js/components/email-reporting/UserSettingsSelectionPanel/index.test.js
Show resolved
Hide resolved
aaemnnosttv
left a comment
There was a problem hiding this comment.
I see @tofumatt is reviewing as well, just adding a few thoughts.
| Email_Reporting_Settings::FREQUENCY_WEEKLY => 7, | ||
| Email_Reporting_Settings::FREQUENCY_MONTHLY => 30, | ||
| Email_Reporting_Settings::FREQUENCY_QUARTERLY => 90, |
There was a problem hiding this comment.
We shouldn't use a fixed number of days here as the only period which has a fixed length is weekly.
There was a problem hiding this comment.
Indeed, as part of this issue (even though it's not mentioned in the ACs), we're best off using the number of days in the respective quarter, same as we do for each month.
Originally I thought that this constant is inaccurately-named, as the text is actually "last 90 days", but we should either label the intent is clearly to send an email every quarter:
Let's update this as part of this issue as well.
There was a problem hiding this comment.
We should have the endDate defined here to have an explicit date range. sendDate doesn't really matter so long as its after the end date as long as the date ranges to use are fixed.
There was a problem hiding this comment.
Good point, I am not sure (can't recall the reason) why early on, we went with sendDate
tofumatt
left a comment
There was a problem hiding this comment.
The change to monthly looks good, but as Evan mentioned: let's update the quarterly logic as well to fix the fixed-dates for both date ranges as part of this one issue 👍🏻
| Email_Reporting_Settings::FREQUENCY_WEEKLY => 7, | ||
| Email_Reporting_Settings::FREQUENCY_MONTHLY => 30, | ||
| Email_Reporting_Settings::FREQUENCY_QUARTERLY => 90, |
There was a problem hiding this comment.
Indeed, as part of this issue (even though it's not mentioned in the ACs), we're best off using the number of days in the respective quarter, same as we do for each month.
Originally I thought that this constant is inaccurately-named, as the text is actually "last 90 days", but we should either label the intent is clearly to send an email every quarter:
Let's update this as part of this issue as well.
Summary
Addresses issue:
Relevant technical choices
PR Author Checklist
Do not alter or remove anything below. The following sections will be managed by moderators only.
Code Reviewer Checklist
Merge Reviewer Checklist