feat: show duplicate emails and stats summary in B2B seat assignment modal#3509
Conversation
OpenAPI ChangesNo changes detected Unexpected changes? Ensure your branch is up-to-date with |
- Deduplicate duplicateEmails for 3+ occurrences of the same address - Drop redundant duplicateCount prop; derive from duplicateEmails.length - Show "Sending…" on Send button while async confirm is in flight - Fix pre-existing test failures from ambiguous queries and timing
| {overCapacity && ( | ||
| <Alert severity="error"> | ||
| You entered {validCount} {pluralize("email", validCount)}, but only{" "} | ||
| {availableSeats} unassigned {pluralize("seat", availableSeats)} are |
There was a problem hiding this comment.
I think if availableSeats is 1, it'll end up reading "but only 1 available seat are available.`
There was a problem hiding this comment.
good catch. All set now
| ) | ||
| } | ||
|
|
||
| const copyToClipboard = (text: string) => { |
There was a problem hiding this comment.
This might just be a me/my browser problem, but attempting to copy duplicate emails when uploading a CSV w/ dupes doesn't seem to actually copy to the clipboard. It does switch the text to Copied!, but when I try and paste it looks like it just has whatever I previously copied.
That said, I also get some very unrelated looking errors, so I'd say if this isn't reproducible and everything looks shipshape for others, feel free to ignore this!
There was a problem hiding this comment.
Nope, not your browser - you found a real bug. But should be resolved now
There was a problem hiding this comment.
Looking good on my end! Thanks!
dsubak
left a comment
There was a problem hiding this comment.
Tested all the manual cases, seems pretty good!
I only noticed one hiccup with the clipboard copying, but as noted in the comment, I can't even be sure if this is my browser or not so feel free to ignore it if it can't be reproduced.
| let resolve!: () => void | ||
| const promise = new Promise<void>((res) => { | ||
| resolve = res | ||
| }) |
There was a problem hiding this comment.
BTW, Promise.withResolvers exists now
const { promise, resolve, reject } = Promise.withResolvers();There was a problem hiding this comment.
Promise.withResolvers() is cleaner and the ! assertion was a lie TypeScript was happy to accept.
What are the relevant tickets?
Description (What does it do?)
Screen Recording (if appropriate):
AssignSeats.mov
Using NVDA
assign_seats_nvda.mp4
How can this be tested?
Confirm step (no issues):
Review step (duplicates):
Review step (all invalid):
Review step (invalid + duplicates):
Over-capacity (CSV):
Over-capacity (manual entry):
Additional Context