forked from jaegertracing/jaeger-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bump antd to 3.26.20 (jaegertracing#1247)
## Which problem is this PR solving? - Contributes towards jaegertracing#1199 ## Short description of the changes With the TS update it now seems possible to update `antd`. There are two eventual benefits: * antd v4 contains React 18-compatible typings, * antd v4 supports [treeshakeable SVG icons](https://github.com/ant-design/ant-design/blob/4.24.8/docs/react/migration-v4.en-US.md#icon-upgrade), reducing the bundle size. The [migration guide](https://github.com/ant-design/ant-design/blob/4.24.8/docs/react/migration-v4.en-US.md) recommends updating to the latest v3 release before going to v4. Apart from ubiquitous snapshot changes, a few adjustments were necessary in components and tests: * The test case for the `<Page />` component that aimed to verify that the header was not rendered in embedded mode was only working by accident since 53937eb—the `Header` component didn't have a display name, so the test wouldn't find it even though the test setup was no longer correct. Fix the test setup to setup the `embedded` prop accordingly. * antd's `Menu` component is now wrapped in a `Context.Consumer`, so tests using enzyme's shallow rendering need to `dive` into it to be able to find the child components they are looking for. * The `Upload` component has more strictly typed props now, so the signature of the `loadJsonFile` prop had to be adjusted accordingly. The handling code was only accessing the `file` property of `FileList`, and the real type supplied by the event handler also has a `file` property, so no code changes were required apart from the typing update. * The `Table` component has one more internal wrapper (each passing down the `className` prop to the next), so the test in `TraceSpanView` had to be updated accordingly. * The `onCell` event handler for `Table`s is now strictly typed, so `DetailTable` needed an update to return an empty object `{}` if it intends to set no props. This is consistent with the upstream [examples](https://github.com/react-component/table/blob/83cce50ddb0a55d63bb0f435d3f4ff7e3301ebad/docs/examples/colspan-rowspan.tsx#L25). * `KeyboardShortcutsHelp` was setting a spurious `align` prop on `Modal`, which was already not part of its typings in 3.9.0 but was still present as a prop type. This caused a type error now that the prop type was removed. * In manual testing, I observed that the name selectors (e.g. "Group By") on the trace statistics view were not functioning—they would immediately close when clicking to open them. I thought this was a regression caused by the update, but experienced the same behavior on `main`. This was fixed by deferring event handler registration to ensure the event handlers don't end up catching the same event that triggered the original state change. ## Screenshots ![Screenshot 2023-03-09 at 23 05 09](https://user-images.githubusercontent.com/2721291/224171058-cda04376-b4b0-4fbd-84db-e190c4980394.png) ![Screenshot 2023-03-09 at 23 05 28](https://user-images.githubusercontent.com/2721291/224171065-55553175-c47c-4d6b-995b-2911715be1bb.png) ![Screenshot 2023-03-09 at 23 05 45](https://user-images.githubusercontent.com/2721291/224171068-ed533a61-ccb9-4f1c-8a0c-8e0088826b79.png) ![Screenshot 2023-03-09 at 23 06 07](https://user-images.githubusercontent.com/2721291/224171072-ec84393d-e402-4bd2-b422-cd37b8e21977.png) --------- Signed-off-by: Máté Szabó <mszabo@fandom.com>
- Loading branch information
1 parent
30085b3
commit c248de4
Showing
40 changed files
with
3,343 additions
and
3,140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.