components icon indicating copy to clipboard operation
components copied to clipboard

Added error message when no Email data provided

Open yifanplanet opened this issue 3 years ago • 1 comments

Description

  • For Email component, if user didn't pass any one of the following properties, we show the error message saying that no email data provided:
    • thread, thread_id, message or message_id
  • To correctly show this message in component's lifecycle, we only show it after component is mounted and $$props are loaded.
  • For users who want to control the time when the email data is passed in, added new Email component property loading to allow it to show a loading spinner when no email data provided.

Code changes

  • [x] Added handleError in Email component when no email data is populated
  • [x] Update nylas-error component to include the link to the corresponding Nylas Docs

Readiness checklist

  • [x] Added changes to component CHANGELOG.md
  • [x] Cypress tests passing?
  • [x] New cypress tests added?
  • [x] Included before/after screenshots, if the change is visual

Screenshots

Screen Shot 2022-03-29 at 1 46 55 PM

Screen Shot 2022-03-29 at 1 46 49 PM

License

I confirm that this contribution is made under the terms of the MIT license and that I have the authority necessary to make this contribution on behalf of its copyright owner.

yifanplanet avatar Mar 29 '22 17:03 yifanplanet

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/nylas/components/CDMEzQkE5ZmyKamkkny8EkPKCnHc
✅ Preview: https://components-git-yifan-tw-391show-error-when-no-thre-92700b-nylas.vercel.app

[Deployment for 889ce61 failed]

vercel[bot] avatar Mar 29 '22 17:03 vercel[bot]