-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Conversation
c9a720c
to
96ae6cc
Compare
Two (or more) problems:
|
Done. |
7280c92
to
5f53495
Compare
346df87
to
ee90f34
Compare
All tests are passed! 🎉 |
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.
Self reviews
components/__snapshots__/formatted_markdown_message.test.jsx.snap
Outdated
Show resolved
Hide resolved
components/integrations/__snapshots__/abstract_command.test.jsx.snap
Outdated
Show resolved
Hide resolved
@@ -0,0 +1,107 @@ | |||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. |
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 file is a key change.
I'm not in a position to review this change right now -- @enahum, could you propose some reviewers? |
ce33a1f
to
3cc1c27
Compare
- Replace shallowWithIntl to shallow for components which aren't wrapped. - Remove `dive()` call. this is not necessary for shallowWithIntl anymore.
- Fix localized input to use forwardedRef - shallowWithIntl/mountWithIntl now attemps to unwrap forwardRef - Remove legacy ref API usage for LocalizedInput component - Fix related tests
- Remove unnecessary `.dive()` calls
3f0bc75
to
6df811b
Compare
@hmhealey Sorry, I just rebased this PR again. rebasing is much easier for me at now. I wanna know the context for merging by exploring the history, not just resolving conflicts. |
fd8ccbb
to
36432ea
Compare
f775b22
to
e60230b
Compare
Excellent, thanks for fixing that! For some reason, it was showing that the build had failed for me up until now, so I'm glad to get this in before it breaks again 😛 |
* Upgrade react-intl to v3 * Update test helpers and related tests * Fix lint * Explicitly set testComponent to span * Fix tests for LeavePrivateChannelModal component * Fix intl-test-helper to unwrap injectIntl properly without mocking * Fix snapshots using new helper * Fix a test for NewMessageSeparator component * Add options to mountWithIntl to be any element * Fix snapshots for test helper update * Fix tests for GetLinkModal component * Add helpful exception to shallowWithIntl helper * Cleanup helpers and snapshots * Fix tests and snpashots - Replace shallowWithIntl to shallow for components which aren't wrapped. - Remove `dive()` call. this is not necessary for shallowWithIntl anymore. * Fix tests and snapshots about LocalizedInput - Fix localized input to use forwardedRef - shallowWithIntl/mountWithIntl now attemps to unwrap forwardRef - Remove legacy ref API usage for LocalizedInput component - Fix related tests * Fix tests and snapshots - Remove unnecessary `.dive()` calls * Fix lint and typings * Change inline snapshots to file snapshot * Fix broken tests since rebase * Remove an unused contextTypes definition * Refactor test code for <FormattedMarkdownMessage/> component * More discriptive displayName for the <LocalizedInput> component * Update some outdated snapshots * Fix a type error since last rebase * Re-gen clean lock file * Fix unresolved apis * Fix type error
Summary
Upgrade/Migrate react-intl package to v3 to brings modern APIs like
useIntl
hook and native Intl locale data.https://github.com/formatjs/react-intl/blob/master/docs/Upgrade-Guide.md#breaking-api-changes
intlShape
PropType (is not supported anymore, useIntlShape
TypeScript definition instead)addLocaleData()
, and add polyfills forIntl.PluralRules
andIntl.RelativeTimeFormat
.Migrate<FormattedRelative/>
into<FormatRelativeTime/>
MigrateformatRelative()
intoformatRelativeTime()
textComponent
to'span'
explicitlySo after this merged we should:
LocalizedInput
component.shallowWithIntl()
helper for only wrapped byinjectIntl()
(not need to.dive()
after.shallowWithIntl()
.)Ticket Link