-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Domains: Implement multi-target email forwards #98837
Open
alshakero
wants to merge
43
commits into
trunk
Choose a base branch
from
implement/mutliple-email-forwards
base: trunk
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+821
−726
Open
Changes from 12 commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
7c135cb
Implement multi email forwards
alshakero 3e50f1b
Add most of the needed UI
alshakero 6c0b00d
Switch to `new`
alshakero 81da338
Fix email section in Upgrades > Email section
alshakero d0896ba
CSS
alshakero 7f4a623
Handle duplicates
alshakero 3537d35
Limit globally
alshakero 24b1c4a
Fix duplication
alshakero 07b7cb1
Fix optimistic UI mutation
alshakero 86a706c
Fix destination encoding
alshakero b1738ab
Merge branch 'trunk' into implement/mutliple-email-forwards
alshakero 6f307e2
Bring back TS comment
alshakero 7c80149
Address feedback
alshakero 9dc7496
Code comment
alshakero f97f1a8
Merge branch 'trunk' into implement/mutliple-email-forwards
alshakero b32f5b6
Fix email context
alshakero 9c5db5c
Unify design amongst all contexts
alshakero fe82dbf
More unification
alshakero ac8086a
Implement new input form
alshakero 808bd2c
Add padding top
alshakero bc22633
Implement forward list
alshakero cf4ce9b
Visual fixes
alshakero 6e6d407
Merge branch 'trunk' into implement/mutliple-email-forwards
alshakero 1937fb7
Don't allow @
alshakero 77afbbe
UX improvements
alshakero 17b6a29
Handle duplicates
alshakero 881c7d2
Refactor
alshakero 5a22366
Remove unneeded file
alshakero 0492535
Fix typo
alshakero b9f56ec
Improve code comment
alshakero 129e2b0
Remove unused code
alshakero da3b5f9
Remove more unused code
alshakero f35e394
Revert "Remove unneeded file"
alshakero 061fb2f
Refactor
alshakero 70ff428
Fix validation and stop when tired next time
alshakero a4001c4
Bring back context menus
alshakero 562e9b5
Bring back context meu
alshakero e182922
Remove `resend` for active addresses
alshakero cb1934f
Add happy state
alshakero 94631b6
Fix focus issue WP dialog
alshakero 9e60359
Switch to WP dropdown for better acccessibility
alshakero ad48071
Don't show resend when there are no warnings
alshakero 33bd2b2
Remove unused code
alshakero File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
7 changes: 0 additions & 7 deletions
7
client/lib/domains/email-forwarding/has-duplicated-email-forwards.js
This file was deleted.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
client/lib/domains/email-forwarding/has-too-many-email-forwards.js
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
const MAX_FORWARD_DESTINATIONS = 5; | ||
|
||
/** | ||
* @param newEmailForward a string representing a new email forward | ||
* @returns { boolean } If the email forward is has more than the maximum number of destinations. | ||
*/ | ||
export function hasTooManyEmailForwardsForMailbox( newEmailForward, existingEmailForwards ) { | ||
return ( | ||
existingEmailForwards?.filter( | ||
( forward ) => | ||
forward.mailbox.localeCompare( newEmailForward, undefined, { sensitivity: 'base' } ) === 0 | ||
).length >= MAX_FORWARD_DESTINATIONS | ||
); | ||
} |
This file contains 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
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
Probably need to rephrase this