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

Add Timeline End Icon #945

Merged
merged 3 commits into from
Jul 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions front/src/modules/activities/timeline/components/Timeline.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import React from 'react';
import { useTheme } from '@emotion/react';
import styled from '@emotion/styled';

import { CommentThreadCreateButton } from '@/activities/components/CommentThreadCreateButton';
import { useOpenCreateCommentThreadDrawer } from '@/activities/hooks/useOpenCreateCommentThreadDrawer';
import { CommentableEntity } from '@/activities/types/CommentableEntity';
import { CommentThreadForDrawer } from '@/activities/types/CommentThreadForDrawer';
import { useIsMobile } from '@/ui/hooks/useIsMobile';
import { IconCircleDot } from '@/ui/icon';
import {
ActivityType,
SortOrder,
Expand Down Expand Up @@ -83,7 +85,17 @@ const StyledTopActionBar = styled.div`
top: 0px;
`;

const StyledStartIcon = styled.div`
align-self: flex-start;
color: ${({ theme }) => theme.font.color.tertiary};
display: flex;
height: 20px;
width: 20px;
`;

export function Timeline({ entity }: { entity: CommentableEntity }) {
const theme = useTheme();

const { data: queryResult, loading } = useGetCommentThreadsByTargetsQuery({
variables: {
commentThreadTargetIds: [entity.id],
Expand Down Expand Up @@ -132,6 +144,9 @@ export function Timeline({ entity }: { entity: CommentableEntity }) {
commentThread={commentThread}
/>
))}
<StyledStartIcon>
<IconCircleDot size={theme.icon.size.lg} />
</StyledStartIcon>
</StyledTimelineContainer>
</StyledMainContainer>
);
Expand Down
1 change: 1 addition & 0 deletions front/src/modules/ui/icon/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,4 @@ export { IconCurrencyDollar } from '@tabler/icons-react';
export { IconUserCircle } from '@tabler/icons-react';
export { IconCalendar } from '@tabler/icons-react';
export { IconPencil } from '@tabler/icons-react';
export { IconCircleDot } from '@tabler/icons-react';
brendanlaschke marked this conversation as resolved.
Show resolved Hide resolved