Skip to content

Commit

Permalink
fix(dashbaords): add tooltip to creator avatar in dashboards table vi…
Browse files Browse the repository at this point in the history
…ew (#82025)

Add tooltip to creator avatar in dashboards table view. (Using
UserAvatar to match the avatars in the Edit Access Trigger Label.
  • Loading branch information
harshithadurai authored Dec 12, 2024
1 parent 62b658f commit 6021578
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions static/app/views/dashboards/editAccessSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ const StyledDisplayName = styled('div')`
const StyledAvatarList = styled(AvatarList)`
margin-left: 10px;
margin-right: -3px;
font-weight: normal;
`;

const StyledFeatureBadge = styled(FeatureBadge)`
Expand Down
11 changes: 7 additions & 4 deletions static/app/views/dashboards/manage/dashboardTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {addErrorMessage, addSuccessMessage} from 'sentry/actionCreators/indicato
import type {Client} from 'sentry/api';
import Feature from 'sentry/components/acl/feature';
import {ActivityAvatar} from 'sentry/components/activity/item/avatar';
import UserAvatar from 'sentry/components/avatar/userAvatar';
import {Button} from 'sentry/components/button';
import {openConfirmModal} from 'sentry/components/confirm';
import EmptyStateWarning from 'sentry/components/emptyStateWarning';
Expand Down Expand Up @@ -205,7 +206,9 @@ function DashboardTable({

if (column.key === ResponseKeys.OWNER) {
return dataRow[ResponseKeys.OWNER] ? (
<ActivityAvatar type="user" user={dataRow[ResponseKeys.OWNER]} size={26} />
<BodyCellContainer>
<UserAvatar hasTooltip user={dataRow[ResponseKeys.OWNER]} size={26} />
</BodyCellContainer>
) : (
<ActivityAvatar type="system" size={26} />
);
Expand Down Expand Up @@ -240,7 +243,7 @@ function DashboardTable({

if (column.key === ResponseKeys.CREATED) {
return (
<DateActionsContainer>
<BodyCellContainer>
<DateSelected>
{dataRow[ResponseKeys.CREATED] ? (
<DateStatus>
Expand Down Expand Up @@ -281,7 +284,7 @@ function DashboardTable({
disabled={dashboards && dashboards.length <= 1}
/>
</ActionsIconWrapper>
</DateActionsContainer>
</BodyCellContainer>
);
}

Expand Down Expand Up @@ -337,7 +340,7 @@ const DateStatus = styled('span')`
padding-left: ${space(1)};
`;

const DateActionsContainer = styled('div')`
const BodyCellContainer = styled('div')`
display: flex;
gap: ${space(4)};
justify-content: space-between;
Expand Down

0 comments on commit 6021578

Please sign in to comment.