-
Notifications
You must be signed in to change notification settings - Fork 361
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
change: [M3-8290] - Improve experience of closing out of Support Ticket Dialog #10703
change: [M3-8290] - Improve experience of closing out of Support Ticket Dialog #10703
Conversation
} | ||
}; | ||
|
||
const handleClose = () => { | ||
props.onClose(); | ||
if (ticketType === 'smtp') { | ||
if (ticketType !== 'general') { |
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.
Fixed a small bug mentioned in the PR description. For accountLimit tickets, the drawer wasn't been reset properly when it was closed out.
Videos
Bug:
accountLimit.bug.mov
Fixed:
accountLimit.fix.mov
ae346b8
to
9f4cb29
Compare
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.
✅ Storage defaults and data are being stored properly
✅ Storage is reset when cancelled
✅ DIdn't notice any regressions in the experience after submitting multiple tickets
✅ Code changes look good to me
The unit test failure on |
@mjac0bs according to git bisect, the bad commit started a78ec2286aeddd7d4320d386a9ba734b023f13c6 |
Yeah, a78ec22 was where the real work was done for this PR. I don't understand why any of it is affecting the billing access panel test, though. These changes should be unrelated. |
supportText: { | ||
get: () => getStorage(SUPPORT, { description: '', title: '' }), | ||
supportTicket: { | ||
get: () => getStorage(SUPPORT, supportTicketStorageDefaults), |
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.
@mjac0bs I've narrowed it down to this line 🔍
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.
This may be influencing the local storage behavior or interaction in ways that were not present before, potentially causing the test to fail.
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.
Directly passing in the object from supportTicketStorageDefaults
seems to fix things, but still figuring out what's going on here...
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.
Ok this is definitely (99% confidence 😅) due to how imports are handled in the test environment. When you import supportTicketStorageDefaults
from another file, it might not be available or properly mocked during the test execution, causing the test to fail. My suggestion would be to move the definition of supportTicketStorageDefaults
and export it from storage.ts
.
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.
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.
My suggestion would be to move the definition of supportTicketStorageDefaults and export it from storage.ts
Done in 6c63947. I ran the unit tests repeatedly locally and didn't see any more unexpected failures or flake. Thank you for the investigation 🙏🏼 and good find!! 🔍 🙌🏼
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.
Good to learn about this too! Thank you
Coverage Report: ❌ |
Description 📝
Currently, when a user closes (but not cancels) out of the support ticket dialog, their ticket title and description are saved to local storage. No other field values are intentionally saved.
To provide a consistent experience, this PR saves all of the general support ticket form in local storage if a user closes out the dialog and repopulates them upon reopening the dialog. Currently, there is no way to close out of and then reopen a special support ticket type (
smtp
oraccountLimit
), since only ageneral
support ticket can be created with the Open New Ticket button.Additionally, we tag the Cancel and Close buttons with analytics to see which users are making more use of. The discrepancy in behavior between Cancel (clear form) and Close (store and reload data) behavior is intentional, but may be odd/unexpected, and we can consider improving the UX in the future.
Changes 🔄
Cancel
andX
buttons with analytics event.Preview 📷
prod.mov
this.branch.mov
How to test 🧪
Prerequisites
(How to setup test environment)
Reproduction steps
(How to reproduce the issue, if applicable)
Verification steps
(How to verify changes)
Please verify:
smtp
,accountLimit
,general
).Important
Please let me know if you see any crashes or white screens. In working with this PR, I would occasionally see the screen go white and a console failure about loading the splashscreen. I couldn't reliably replicate it and assume it was related to local storage updates while I was making changes, but want to be sure it's not still happening now.
As an Author I have considered 🤔
Check all that apply