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

Release #2044

Merged
merged 6 commits into from
Jan 2, 2024
Merged

Release #2044

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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Skeleton from 'react-loading-skeleton';
import Skeleton from './Skeleton';
import { Card, VerticalSeparator } from 'lib/components';
import { DraggerIcon } from 'lib/components/svgs';

Expand Down
27 changes: 27 additions & 0 deletions apps/web/components/shared/skeleton/Skeleton.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { clsxm } from '@app/utils';

const Skeleton = ({
height,
width,
borderRadius,
className
}: {
height: number;
width: number;
borderRadius: number;
className: string;
}) => {
console.log({ borderRadius });
return (
<div
className={clsxm(
'p-1 animate-pulse rounded-lg bg-[#F0F0F0] dark:bg-[#353741]',
height ? `h-[${height}px]` : 'h-[20px]',
width ? `w-[${width}px]` : 'w-[160px]',
className
)}
/>
);
};

export default Skeleton;
35 changes: 29 additions & 6 deletions apps/web/components/shared/skeleton/UserTeamCardSkeleton.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { clsxm } from '@app/utils';
import { Card, VerticalSeparator } from 'lib/components';
import { DraggerIcon } from 'lib/components/svgs';
import Skeleton from 'react-loading-skeleton';

const UserTeamCardSkeletonCard = () => {
return (
Expand All @@ -11,16 +11,16 @@ const UserTeamCardSkeletonCard = () => {
<div className="w-[330px] px-4 flex space-x-3 items-center">
<div className="w-8 h-8 bg-[#F0F0F0] dark:bg-[#353741] rounded-full" />
<div className="w-10 h-10 bg-[#F0F0F0] dark:bg-[#353741] rounded-full" />
<Skeleton height={20} width={180} borderRadius={10} className="dark:bg-[#353741]" />
<Skeleton height={20} width={160} borderRadius={10} className="dark:bg-[#353741]" />
</div>
<VerticalSeparator />

<div className="w-[330px] px-4 flex flex-col items-center">
<div className="flex flex-col items-start">
<Skeleton height={10} width={280} borderRadius={10} className="dark:bg-[#353741] ml-2" />
<div className="w-[330px] px-4 flex flex-col items-center gap-2">
<div className="flex flex-col items-start gap-2">
<Skeleton height={10} width={160} borderRadius={10} className="dark:bg-[#353741] ml-2" />
<Skeleton height={10} width={120} borderRadius={10} className="dark:bg-[#353741] ml-2" />
</div>
<div className="flex justify-around items-center">
<div className="flex justify-around items-center gap-2">
<Skeleton height={15} width={80} borderRadius={10} className="dark:bg-[#353741] mr-2" />
<Skeleton height={15} width={80} borderRadius={10} className="dark:bg-[#353741] mr-2" />
<Skeleton height={15} width={80} borderRadius={10} className="dark:bg-[#353741]" />
Expand Down Expand Up @@ -48,4 +48,27 @@ const UserTeamCardSkeletonCard = () => {
);
};

const Skeleton = ({
height,
width,
borderRadius,
className
}: {
height: number;
width: number;
borderRadius: number;
className: string;
}) => {
return (
<div
className={clsxm(
'p-1 animate-pulse rounded-lg bg-[#F0F0F0] dark:bg-[#353741]',
height ? `h-[${height}px]` : 'h-[20px]',
width ? `w-[${width}px]` : 'w-[160px]',
className
)}
></div>
);
};

export default UserTeamCardSkeletonCard;
4 changes: 2 additions & 2 deletions apps/web/lib/features/team-members-card-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const TeamMembersCardView: React.FC<Props> = ({
handleChangeOrder(peopleClone[draggedOverTeamMember.current], dragTeamMember.current);
}

const handleChangeOrder = (employee: OT_Member, order: number) => {
const handleChangeOrder = (employee: OT_Member, order: number) => {
updateOrganizationTeamEmployeeOrderOnList(employee, order);
};

Expand Down Expand Up @@ -122,7 +122,7 @@ const TeamMembersCardView: React.FC<Props> = ({
leaveFrom="opacity-100"
leaveTo="opacity-0"
>
{[1, 2].map((_, i) => {
{[0, 2].map((_, i) => {
return (
<li key={i} className="mt-3">
<UserTeamCardSkeleton />
Expand Down
2 changes: 1 addition & 1 deletion apps/web/lib/features/team/user-team-card/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export function UserTeamCard({
<TaskInfo
edition={taskEdition}
memberInfo={memberInfo}
className="2xl:w-80 3xl:w-[32rem] w-1/5 lg:px-4 px-2 overflow-y-auto"
className="2xl:w-80 3xl:w-[32rem] w-1/5 lg:px-4 px-2 overflow-y-hidden"
publicTeam={publicTeam}
/>
<VerticalSeparator className="ml-2" />
Expand Down
7 changes: 6 additions & 1 deletion apps/web/lib/features/team/user-team-card/task-info.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ type Props = IClassName & {

export function TaskInfo({ className, memberInfo, edition, publicTeam }: Props) {
return (
<div className={clsxm('h-full flex flex-col items-start justify-between gap-[1.0625rem]', className)}>
<div
className={clsxm(
'h-full flex flex-col items-start justify-between gap-[1.0620rem] max-h-full overflow-hidden',
className
)}
>
{/* task */}
<div className={clsxm('w-full h-10', edition.editMode ? [''] : ['overflow-hidden'])}>
{edition.task && (
Expand Down
4 changes: 2 additions & 2 deletions apps/web/styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ html.dark {
}
}

@keyframes pulse {
/* @keyframes pulse {
0%,
100% {
opacity: 1;
Expand All @@ -304,7 +304,7 @@ html.dark {
opacity: 1;
transform: scale(1.2);
}
}
} */

.progress-ring__circle {
stroke-dasharray: 400, 400;
Expand Down
Loading