Skip to content

Commit

Permalink
minor fixes(ui): Small UI display fixes (datahub-project#4190)
Browse files Browse the repository at this point in the history
  • Loading branch information
jjoyce0510 authored and maggiehays committed Aug 1, 2022
1 parent 7683795 commit 702832f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ export const ExpandedOwner = ({ entityUrn, owner, refetch }: Props) => {
name = entityRegistry.getDisplayName(EntityType.CorpUser, owner.owner);
}

const pictureLink = (owner.owner.__typename === 'CorpUser' && owner.owner.editableInfo?.pictureLink) || undefined;
const pictureLink =
(owner.owner.__typename === 'CorpUser' && owner.owner.editableProperties?.pictureLink) || undefined;

const onDelete = async () => {
try {
Expand Down
9 changes: 8 additions & 1 deletion datahub-web-react/src/app/entity/user/User.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,14 @@ export class UserEntity implements Entity<CorpUser> {
};

displayName = (data: CorpUser) => {
return data.editableProperties?.displayName || data.info?.displayName || data.info?.fullName || data.username;
return (
data.editableProperties?.displayName ||
data.properties?.displayName ||
data.properties?.fullName ||
data.info?.displayName || // Deprecated info field
data.info?.fullName || // Deprecated info field
data.username
);
};

getGenericEntityProperties = (user: CorpUser) => {
Expand Down
1 change: 1 addition & 0 deletions datahub-web-react/src/app/shared/avatar/CustomAvatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const AvatarStyled = styled(Avatar)<{ size?: number; $backgroundColor: string }>
.ant-avatar-string {
text-align: center;
top: 0px;
line-height: ${(props) => (props.size ? props.size : 24)}px;
}
`;

Expand Down

0 comments on commit 702832f

Please sign in to comment.