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

[NDD-429] css 버그 및 약간의 기획 변경 (7h/4h) #36

Merged
merged 12 commits into from
Apr 16, 2024
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
9 changes: 8 additions & 1 deletion apps/gomterview-com/src/atoms/serviceTour.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
import dayjs from 'dayjs';
import { atom } from 'recoil';

export const runState = atom<{
isRunning: boolean;
}>({
key: 'runState',
default: {
isRunning: false,
isRunning: (() => {
const skipped = localStorage.getItem('skipped');
if (!skipped) {
return true;
}
return dayjs(skipped).isAfter(dayjs());
})(),
},
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Button, Input, InputArea, Tooltip } from '@foundation/index';
import { Button, Input, InputArea, Typography } from '@foundation/index';
import { css } from '@emotion/react';
import { FormEventHandler, useState } from 'react';
import LabelBox from '@common/QuestionSelectionBox/WorkbookGeneratorModal/LabelBox';
Expand All @@ -8,7 +8,6 @@ import { theme } from '@styles/theme';
import useCategoryQuery from '@hooks/apis/queries/useCategoryQuery';
import useWorkbookAdd from '@hooks/useWorkbookAdd';
import { toast } from '@foundation/Toast/toast';
import { ShareRangeToggle } from '@common/index';

type WorkbookAddFormProps = {
closeModal: () => void;
Expand Down Expand Up @@ -112,22 +111,14 @@ const WorkbookAddForm: React.FC<WorkbookAddFormProps> = ({ closeModal }) => {
/>
</LabelBox>
<LabelBox labelName="공개 범위">
<Tooltip
title={'문제를 추가하여 공개로 전환할 수 있습니다.'}
position="bottom"
<Typography
variant="captionWeak"
css={css`
padding-left: 0.25rem;
`}
>
<ShareRangeToggle
isPublic={false}
onClick={() =>
toast.info('문제가 존재하지 않아 공개로 전환할 수 없습니다.')
}
publicText={{
text: '곰터뷰의 모든 사용자',
description:
'비회원을 포함한 곰터뷰의 모든 사용자에게 공개됩니다.',
}}
/>
</Tooltip>
문제 추가 후 수정에서 공개로 전환할 수 있습니다.
</Typography>
</LabelBox>
<LabelBox labelName="설명">
<InputArea
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
import { css } from '@emotion/react';
import WorkbookEditForm from '@common/QuestionSelectionBox/WorkbookGeneratorModal/WorkbookEditForm';
import WorkbookAddForm from '@common/QuestionSelectionBox/WorkbookGeneratorModal/WorkbookAddForm';
import ModalHeader from '@foundation/Modal/ModalHeader';
import { Modal } from '@foundation/index';
import { theme } from '@styles/theme';

type WorkbookGeneratorModalProps = {
closeModal: () => void;
workbookId?: number;
};
const WorkbookGeneratorModal: React.FC<WorkbookGeneratorModalProps> = ({
closeModal,
workbookId,
}) => {
return (
<Modal
Expand All @@ -28,20 +25,14 @@ const WorkbookGeneratorModal: React.FC<WorkbookGeneratorModalProps> = ({
}
`}
>
<ModalHeader closeModal={closeModal}>
{workbookId !== undefined ? '면접 세트 수정' : '새 면접 세트'}
</ModalHeader>
<ModalHeader closeModal={closeModal}>새 면접 세트</ModalHeader>
<div
css={css`
max-height: 80vh;
padding: 1.5rem;
`}
>
{workbookId !== undefined ? (
<WorkbookEditForm workbookId={workbookId} closeModal={closeModal} />
) : (
<WorkbookAddForm closeModal={closeModal} />
)}
<WorkbookAddForm closeModal={closeModal} />
</div>
</Modal>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,13 @@ const Thumbnail: React.FC<ThumbnailProps> = ({
crossOrigin="use-credentials"
src={image}
onError={(e) => (e.currentTarget.src = `${logo}`)}
// TODO: 에러 부분 때문에 첫 로딩시 layout shift가 발생합니다.
alt={videoName}
css={css`
aspect-ratio: 3 / 2;
aspect-ratio: 3 /2;
width: 100%;
height: auto;
object-fit: contain;
object-fit: cover;
border-radius: 1rem;
`}
/>
Expand Down
58 changes: 37 additions & 21 deletions apps/gomterview-com/src/components/common/VideoItem/VideoItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,15 @@ const VideoItem: React.FC<VideoItemProps> = ({
<Link
to={path}
css={css`
display: flex;
flex-direction: column;
text-decoration: none;
color: ${theme.colors.text.default};

&:hover {
> div {
text-decoration: underline;
text-decoration-color: ${theme.colors.text.subStrong};
}
}
`}
>
{children}
Expand All @@ -38,42 +43,53 @@ const VideoItem: React.FC<VideoItemProps> = ({
justify-content: space-between;
row-gap: 0.5rem;
padding: 1rem 0.5rem;
height: 100%;
cursor: pointer;
`}
>
<Typography
variant="body2"
css={css`
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
text-overflow: ellipsis;
line-height: 1.25rem;

&:hover {
text-decoration: underline;
text-decoration-color: ${theme.colors.text.subStrong};
}
`}
>
{videoName}
</Typography>
<div
css={css`
display: flex;
flex-direction: row;
justify-content: space-between;
gap: 0.6rem;
`}
>
<div
css={css`
display: flex;
gap: 0.625rem;
`}
>
{userThumbnail && nickname && (
<>
<Avatar src={userThumbnail} width="1.5rem" height="1.5rem" />
<Typography variant="body3">{nickname}</Typography>
</>
)}
</div>
{userThumbnail && nickname && (
<>
<Avatar
src={userThumbnail}
css={css`
max-width: 1.5rem;
min-width: 1.5rem;
height: auto;
`}
/>
<Typography
variant="body3"
noWrap
css={css`
overflow: hidden;
flex-grow: 1;
text-overflow: ellipsis; // 넘치는 텍스트에 말줄임표 표시
`}
>
{nickname}
</Typography>
</>
)}
<Typography variant="body3" color={theme.colors.text.subStrong}>
{date}
</Typography>
Expand Down
Loading