Skip to content
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

Replace deprecated ant-design props from ReferenceButton and KeyValuesTable #1864

Merged
merged 4 commits into from
Oct 12, 2023

Conversation

anshgoyalevil
Copy link
Member

@anshgoyalevil anshgoyalevil commented Oct 11, 2023

Which problem is this PR solving?

Description of the changes

  • This PR replaces the deprecated ant-design props from ReferenceButton and KeyValuesTable
  • The colums.render prop is no longer required to return children as JSX. Instead, it is by default.

How was this change tested?

  • manually, and unit tests

Checklist

Signed-off-by: Ansh Goyal <anshgoyal1704@gmail.com>
Signed-off-by: Ansh Goyal <anshgoyal1704@gmail.com>
Signed-off-by: Ansh Goyal <anshgoyal1704@gmail.com>
Comment on lines +126 to +127
// KeyValuesTable is displayed as a menu at span level.
// Example: https://github.com/jaegertracing/jaeger-ui/assets/94157520/b518cad9-cb37-4775-a3d6-b667a1235f89
Copy link
Member Author

@anshgoyalevil anshgoyalevil Oct 11, 2023

Choose a reason for hiding this comment

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

Example

(Used some dummy data to visualize this component)

Copy link
Member

@yurishkuro yurishkuro Oct 12, 2023

Choose a reason for hiding this comment

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

what happens if there's only one link, do we still show the sandwich menu or the outgoing link directly? The latter would be more usable (I think it's unusual to have >1 link on a tag)

Copy link
Member Author

Choose a reason for hiding this comment

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

In case there's one link only, the link is shown directly, instead of DropDown.

if (links?.length === 1) {
valueMarkup = (
<div>
<LinkValue href={links[0].url} title={links[0].text}>
{jsonTable}
</LinkValue>
</div>
);
} else if (links && links.length > 1) {

@codecov
Copy link

codecov bot commented Oct 11, 2023

Codecov Report

All modified lines are covered by tests ✅

Files Coverage Δ
...nitor/ServicesView/operationDetailsTable/index.tsx 100.00% <100.00%> (ø)
...TracePage/TraceTimelineViewer/ReferencesButton.tsx 100.00% <100.00%> (ø)
.../TraceTimelineViewer/SpanDetail/KeyValuesTable.tsx 97.77% <100.00%> (ø)

📢 Thoughts on this report? Let us know!.

Comment on lines +31 to +32
// ReferencesButton is displayed as a menu at the span level.
// Example: https://github.com/jaegertracing/jaeger-ui/assets/94157520/2b29921a-2225-4a01-9018-1a1952f186ef
Copy link
Member Author

Choose a reason for hiding this comment

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

Example

(Used some dummy data to visualize this component)

Signed-off-by: Ansh Goyal <anshgoyal1704@gmail.com>
@yurishkuro yurishkuro merged commit 022c8c4 into jaegertracing:main Oct 12, 2023
9 checks passed
@yurishkuro yurishkuro added the changelog:bugfix-or-minor-feature 🐞 Bug fixes, Minor Improvements label Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:bugfix-or-minor-feature 🐞 Bug fixes, Minor Improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants