-
Notifications
You must be signed in to change notification settings - Fork 291
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
feat: introduce variations to fail to add users (WPB-2299) #15497
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #15497 +/- ##
=======================================
Coverage 43.43% 43.44%
=======================================
Files 649 649
Lines 22076 22092 +16
Branches 5048 5052 +4
=======================================
+ Hits 9588 9597 +9
- Misses 11255 11263 +8
+ Partials 1233 1232 -1 |
{isOpen && ( | ||
<> | ||
{total <= 1 && ( |
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.
condition isOpen
is true when total > 1
so this will never happen
@@ -49,6 +55,7 @@ const config = Config.getConfig(); | |||
const FailedToAddUsersMessage: React.FC<FailedToAddUsersMessageProps> = ({ | |||
isMessageFocused, | |||
message, | |||
errorMessageType = ErrorMessageType.offlineBackEnd, |
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.
The different error messages are not part of the scope of the September release.
The only error message displayed stays the same as offline back-end
{total <= 1 && ( | ||
<p data-uie-name="1-user-not-added-details" data-uie-value={users[0].id}> | ||
<span | ||
css={warning} | ||
dangerouslySetInnerHTML={{ | ||
__html: t(`failedToAddParticipantSingularOfflineBackEnd`, { | ||
name: users[0].name(), | ||
domain: users[0].domain, | ||
}), | ||
}} | ||
/> | ||
{learnMore} | ||
</p> | ||
)} | ||
{total > 1 && ( | ||
<p | ||
css={warning} | ||
dangerouslySetInnerHTML={{ | ||
__html: t(`failedToAddParticipantsPlural`, {total: total.toString()}), | ||
}} | ||
/> | ||
)} |
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.
Could be simplified to just total <= 1 ? () : ()
, no?
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.
It could, I kept it the way @thisisamir98 did it.
Probably easier to read?
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.
The result will be the same, I'm fine with it
feature
errorMesssage
prop to thefailedToAddUser
component