Skip to content
Open
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: 6 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 0 additions & 19 deletions packages/web/app/components/climb-info/climb-info-drawer.tsx

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
/* Flex row to replace AntD Row/Col with responsive props */
.itemRow {
display: flex;
width: 100%;
gap: 8px;
align-items: center;
flex-wrap: nowrap;
}

/* Thumbnail column: xs=6 (25%), sm=5 (20.83%) */
.thumbnailCol {
flex: 0 0 25%;
max-width: 25%;
}

@media (min-width: 576px) {
.thumbnailCol {
flex: 0 0 20.83%;
max-width: 20.83%;
}
}

/* Title column without user: xs=15 (62.5%), sm=17 (70.83%) */
.titleCol {
flex: 0 0 62.5%;
max-width: 62.5%;
}

@media (min-width: 576px) {
.titleCol {
flex: 0 0 70.83%;
max-width: 70.83%;
}
}

/* Title column with user: xs=13 (54.17%), sm=15 (62.5%) */
.titleColWithUser {
flex: 0 0 54.17%;
max-width: 54.17%;
}

@media (min-width: 576px) {
.titleColWithUser {
flex: 0 0 62.5%;
max-width: 62.5%;
}
}

/* Avatar column: xs=2 (8.33%), sm=2 (8.33%) */
.avatarCol {
flex: 0 0 8.33%;
max-width: 8.33%;
}

/* Menu button column: xs=3 (12.5%), sm=2 (8.33%) */
.menuCol {
flex: 0 0 12.5%;
max-width: 12.5%;
}

@media (min-width: 576px) {
.menuCol {
flex: 0 0 8.33%;
max-width: 8.33%;
}
}
23 changes: 12 additions & 11 deletions packages/web/app/components/queue-control/queue-list-item.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useEffect, useRef, useState, useCallback } from 'react';
import { useRouter } from 'next/navigation';
import { Row, Col, Avatar, Tooltip, Dropdown, Button } from 'antd';
import { Avatar, Tooltip, Dropdown, Button } from 'antd';
import { CheckOutlined, CloseOutlined, UserOutlined, DeleteOutlined, MoreOutlined, InfoCircleOutlined, AppstoreOutlined } from '@ant-design/icons';
import { BoardDetails, ClimbUuid, Climb } from '@/app/lib/types';
import { draggable, dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
Expand All @@ -15,6 +15,7 @@ import ClimbTitle from '../climb-card/climb-title';
import { useBoardProvider } from '../board-provider/board-provider-context';
import { themeTokens } from '@/app/theme/theme-config';
import { constructClimbViewUrl, constructClimbViewUrlWithSlugs, parseBoardRouteParams, constructClimbInfoUrl } from '@/app/lib/url-utils';
import styles from './queue-list-item.module.css';

type QueueListItemProps = {
item: ClimbQueueItem;
Expand Down Expand Up @@ -327,29 +328,29 @@ const QueueListItem: React.FC<QueueListItemProps> = ({
}}
onDoubleClick={() => setCurrentClimbQueueItem(item)}
>
<Row style={{ width: '100%' }} gutter={[8, 8]} align="middle" wrap={false}>
<Col xs={6} sm={5}>
<div className={styles.itemRow}>
<div className={styles.thumbnailCol}>
<ClimbThumbnail
boardDetails={boardDetails}
currentClimb={item.climb}
/>
</Col>
<Col xs={item.addedByUser ? 13 : 15} sm={item.addedByUser ? 15 : 17}>
</div>
<div className={item.addedByUser ? styles.titleColWithUser : styles.titleCol}>
<ClimbTitle
climb={item.climb}
showAngle
centered
nameAddon={<AscentStatus climbUuid={item.climb?.uuid} />}
/>
</Col>
</div>
{item.addedByUser && (
<Col xs={2} sm={2}>
<div className={styles.avatarCol}>
<Tooltip title={item.addedByUser.username}>
<Avatar size="small" src={item.addedByUser.avatarUrl} icon={<UserOutlined />} />
</Tooltip>
</Col>
</div>
)}
<Col xs={3} sm={2}>
<div className={styles.menuCol}>
<Dropdown
menu={{
items: [
Expand Down Expand Up @@ -385,8 +386,8 @@ const QueueListItem: React.FC<QueueListItemProps> = ({
>
<Button type="text" icon={<MoreOutlined />} />
</Dropdown>
</Col>
</Row>
</div>
</div>
</div>
{closestEdge && <DropIndicator edge={closestEdge} gap="1px" />}
</div>
Expand Down
95 changes: 95 additions & 0 deletions packages/web/app/components/queue-control/queue-list.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
/* Flex row to replace AntD Row/Col with responsive props */
.suggestionRow {
display: flex;
width: 100%;
gap: 8px;
align-items: center;
flex-wrap: nowrap;
}

/* Thumbnail column: xs=6 (25%), sm=5 (20.83%) */
.thumbnailCol {
flex: 0 0 25%;
max-width: 25%;
}

@media (min-width: 576px) {
.thumbnailCol {
flex: 0 0 20.83%;
max-width: 20.83%;
}
}

/* Title column: xs=15 (62.5%), sm=17 (70.83%) */
.titleCol {
flex: 0 0 62.5%;
max-width: 62.5%;
}

@media (min-width: 576px) {
.titleCol {
flex: 0 0 70.83%;
max-width: 70.83%;
}
}

/* Button column: xs=3 (12.5%), sm=2 (8.33%) */
.buttonCol {
flex: 0 0 12.5%;
max-width: 12.5%;
}

@media (min-width: 576px) {
.buttonCol {
flex: 0 0 8.33%;
max-width: 8.33%;
}
}

/* Skeleton row for loading state */
.skeletonRow {
display: flex;
width: 100%;
gap: 8px;
align-items: center;
flex-wrap: nowrap;
}

/* Skeleton thumbnail column */
.skeletonThumbnailCol {
flex: 0 0 25%;
max-width: 25%;
}

@media (min-width: 576px) {
.skeletonThumbnailCol {
flex: 0 0 20.83%;
max-width: 20.83%;
}
}

/* Skeleton title column */
.skeletonTitleCol {
flex: 0 0 62.5%;
max-width: 62.5%;
}

@media (min-width: 576px) {
.skeletonTitleCol {
flex: 0 0 70.83%;
max-width: 70.83%;
}
}

/* Skeleton button column */
.skeletonButtonCol {
flex: 0 0 12.5%;
max-width: 12.5%;
}

@media (min-width: 576px) {
.skeletonButtonCol {
flex: 0 0 8.33%;
max-width: 8.33%;
}
}
35 changes: 18 additions & 17 deletions packages/web/app/components/queue-control/queue-list.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client';
import React, { useEffect, useState, useCallback, useRef } from 'react';
import { Divider, Row, Col, Button, Flex, Drawer, Space, Typography, Skeleton } from 'antd';
import { Divider, Button, Flex, Drawer, Space, Typography, Skeleton } from 'antd';
import { PlusOutlined, LoginOutlined } from '@ant-design/icons';
import { useQueueContext } from '../graphql-queue';
import { Climb, BoardDetails } from '@/app/lib/types';
Expand All @@ -15,6 +15,7 @@ import { SUGGESTIONS_THRESHOLD } from '../board-page/constants';
import { useBoardProvider } from '../board-provider/board-provider-context';
import { LogAscentDrawer } from '../logbook/log-ascent-drawer';
import AuthModal from '../auth/auth-modal';
import styles from './queue-list.module.css';

const { Text, Paragraph } = Typography;

Expand Down Expand Up @@ -169,22 +170,22 @@ const QueueList: React.FC<QueueListProps> = ({ boardDetails, onClimbNavigate })
borderBottom: `1px solid ${themeTokens.neutral[200]}`,
}}
>
<Row style={{ width: '100%' }} gutter={[8, 8]} align="middle" wrap={false}>
<Col xs={6} sm={5}>
<div className={styles.suggestionRow}>
<div className={styles.thumbnailCol}>
<ClimbThumbnail
boardDetails={boardDetails}
currentClimb={climb}
enableNavigation={true}
onNavigate={onClimbNavigate}
/>
</Col>
<Col xs={15} sm={17}>
</div>
<div className={styles.titleCol}>
<ClimbTitle climb={climb} showAngle centered />
</Col>
<Col xs={3} sm={2}>
</div>
<div className={styles.buttonCol}>
<Button type="default" icon={<PlusOutlined />} onClick={() => addToQueue(climb)} />
</Col>
</Row>
</div>
</div>
</div>
))}
</Flex>
Expand All @@ -198,17 +199,17 @@ const QueueList: React.FC<QueueListProps> = ({ boardDetails, onClimbNavigate })
{(isFetchingClimbs || isFetchingNextPage) && (
<Flex vertical gap={themeTokens.spacing[2]} style={{ padding: themeTokens.spacing[2] }}>
{[1, 2, 3].map((i) => (
<Row key={i} gutter={[8, 8]} align="middle" wrap={false}>
<Col xs={6} sm={5}>
<div key={i} className={styles.skeletonRow}>
<div className={styles.skeletonThumbnailCol}>
<Skeleton.Image active style={{ width: '100%', height: 60 }} />
</Col>
<Col xs={15} sm={17}>
</div>
<div className={styles.skeletonTitleCol}>
<Skeleton active paragraph={{ rows: 1 }} title={false} />
</Col>
<Col xs={3} sm={2}>
</div>
<div className={styles.skeletonButtonCol}>
<Skeleton.Button active size="small" />
</Col>
</Row>
</div>
</div>
))}
</Flex>
)}
Expand Down
Loading