Brijesh619 commented on code in PR #737:
URL: https://github.com/apache/atlas/pull/737#discussion_r3927378318
##########
dashboard/src/views/DetailPage/EntityDetailTabs/RelationshipLineage.tsx:
##########
@@ -48,28 +48,40 @@ import { CloseIcon, LightTooltip } from
"@components/muiComponents";
import { useAppSelector } from "@hooks/reducerHook";
import { Link as MUILink } from "@mui/material";
+interface CustomLinkProps {
+ href: string;
+ status: string;
+ guid: string;
+ name: string;
+ typeName: string;
+ params: URLSearchParams | string;
+}
+
const CustomLink = ({
href,
status,
- entityColor,
guid,
name,
typeName,
params
-}: any): any => {
+}: CustomLinkProps): JSX.Element => {
+ const displayLabel = typeName ? `${name} (${typeName})` : name;
return (
<li className={status}>
- <MUILink
- component={RouterLink}
- to={{
- pathname: href,
- search: params.toString() ? params.toString() : ""
- }}
- style={{ color: entityColor }}
- replace={true}
- >
- {name} ({typeName})
- </MUILink>
+ <LightTooltip title={displayLabel}>
Review Comment:
I've wrapped the MUILink components inside <span> elements under
LightTooltip in both CustomLink and getWithButton. This guarantees proper ref
handling and avoids console warnings when rendering MUI Tooltips over composite
link elements.
##########
dashboardv2/public/js/views/graph/RelationshipLayoutView.js:
##########
@@ -271,27 +271,29 @@ define([
}
return entity;
}.bind(this),
- getdefault = function(options) {
- return "<pre class='entity-type-name' style='color:" +
options.color + "'>" + options.name + "</pre>";
+ getdefault = function (options) {
Review Comment:
Thanks for pointing that out! I've removed the dead helper functions
(getdefault, getWithButton, getEntityTypelist, and getElement) from searchNode
in RelationshipLayoutView.js since buildListItem() is used for rendering list
items
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]