Skip to content

Convert EuiToast to TypeScript#2032

Merged
pugnascotia merged 5 commits intoelastic:masterfrom
pugnascotia:convert-toast-to-ts
Jun 13, 2019
Merged

Convert EuiToast to TypeScript#2032
pugnascotia merged 5 commits intoelastic:masterfrom
pugnascotia:convert-toast-to-ts

Conversation

@pugnascotia
Copy link
Contributor

Summary

Convert EuiToast to TypeScript.

Checklist

  • This was checked in mobile
  • This was checked in IE11
  • This was checked in dark mode
  • Any props added have proper autodocs
  • Documentation examples were added
  • A changelog entry exists and is marked appropriately
  • This was checked for breaking changes and labeled appropriately
  • Jest tests were updated or added to match the most common scenarios
  • This was checked against keyboard-only and screenreader scenarios
  • This required updates to Framer X components

@@ -1,14 +1,13 @@
import React from 'react';
import { render, mount } from 'enzyme';
import sinon from 'sinon';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💝💖

Copy link
Contributor

@chandlerprall chandlerprall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small change requested, approving to not block merging.

});

let headerIcon;
let headerIcon: ReactElement<typeof EuiIcon>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ReactElement's signature takes props as the first arg, then the component constructor. This should be ReactElement<PropsOf<EuiIcon>, typeof EuiIcon> (PropsOf from EUI's common.ts). However, the argument defaults are fine and this can be simplified to let headerIcon: ReactElement;

@pugnascotia pugnascotia force-pushed the convert-toast-to-ts branch from 0fd863e to 82a05a8 Compare June 13, 2019 09:27
@pugnascotia pugnascotia merged commit 1bede52 into elastic:master Jun 13, 2019
@pugnascotia pugnascotia deleted the convert-toast-to-ts branch June 13, 2019 10:30
@PhilippBaranovskiy
Copy link
Contributor

@pugnascotia, I'm sorry, have you just rename global_toast_list snapshot without updating?
May the following error be a result of this PR?

Capture

I'm not sure when and why I started getting this.

@pugnascotia
Copy link
Contributor Author

Those aren't snapshot errors. Strange though - I couldn't have merged if CI wasn't passing. Are you seeing that on master, or another branch?

@PhilippBaranovskiy
Copy link
Contributor

Those aren't snapshot errors. Strange though - I couldn't have merged if CI wasn't passing. Are you seeing that on master, or another branch?

Hm. Seems that merging master into my branch solved the issue, strange.
I did it just 20 minutes earlier and it hadn't.

Anyway, thanks 🙏

@chandlerprall
Copy link
Contributor

That's a known flaky test in our suite #1999

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants