Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
727aaf0
Added data studio page
JunHammy Jul 26, 2025
de2b08a
Added left item grid for data studio
JunHammy Jul 26, 2025
6c5fb14
Added groupToggle for books and category segments
JunHammy Jul 26, 2025
7107586
Added group card
JunHammy Jul 26, 2025
6675581
Added group item section to show items in the group
JunHammy Jul 26, 2025
324e3f3
Added arrow scrolling for group item section
JunHammy Jul 26, 2025
524cfa4
Added overflow scrolling for item groups
JunHammy Jul 26, 2025
43b1e20
Refined group toggle
JunHammy Jul 26, 2025
e9b0a20
Changed groupToggle colour, added ArtefactEditor page
JunHammy Jul 28, 2025
f179e40
Added description and disabled hover effect for data studio card item
JunHammy Jul 28, 2025
0de53f1
Added rough drag and drop for data studio
JunHammy Jul 28, 2025
5014738
Refined drag and drop for data studio
JunHammy Jul 28, 2025
b019c36
Added GroupView, modified paths
JunHammy Jul 29, 2025
a9114c9
Added item view toggle
JunHammy Jul 29, 2025
ec41909
Refined item view toggle
JunHammy Jul 29, 2025
0a78b6a
Added item view menu
JunHammy Jul 29, 2025
9b238c0
Added item view menu for mobile
JunHammy Jul 29, 2025
e105261
Added skeleton for metadataDisplay and itemChat for catalogueItemView
JunHammy Jul 29, 2025
24b889a
Displayed metadata on catalogue item view
JunHammy Jul 30, 2025
39c8b6c
Fixed mobile view
JunHammy Jul 30, 2025
2d802f4
Added transcriptionToggle jsx
JunHammy Jul 30, 2025
9937f0c
Added Batch to groupToggle for studio
JunHammy Jul 30, 2025
920d8fb
Added transcription toggle and rendering of ner labels as highlights …
JunHammy Jul 30, 2025
10a1950
Added hover tooltip for metadata display
JunHammy Jul 31, 2025
c460d86
Added animation for hovering of ner labels
JunHammy Jul 31, 2025
2e85203
Merge pull request #20 from ArchAIve-Project/prakhar
Prakhar896 Jul 31, 2025
749906b
Added showing of hf images
JunHammy Aug 1, 2025
05a1fab
Fixed bug for rendering english translation with NER highlights
JunHammy Aug 1, 2025
d46db18
Fixed skeleton loading in metadatadisplay
JunHammy Aug 1, 2025
80e7d9e
Fixed mobile view for catalogue item view
JunHammy Aug 1, 2025
af996d8
Changed toast messages
JunHammy Aug 1, 2025
44c412c
fixed public gallery and catalofye item view
JunHammy Aug 1, 2025
c8211c2
Added comments for code, removed console logs.
JunHammy Aug 1, 2025
963121d
Merge pull request #24 from ArchAIve-Project/prakhar
Prakhar896 Aug 4, 2025
2159e43
Removed uneccsary states for cardItem and cardComponent
JunHammy Aug 9, 2025
f47ba42
Removed redundant hasRendered state in catalogueItemView
JunHammy Aug 9, 2025
57649dc
Fixed fetchMetadata() in catalogueItemView
JunHammy Aug 9, 2025
46f4291
Shifted fetchMetadata into MetadataDisplay from CatalogueItemView
JunHammy Aug 9, 2025
36ff221
Used SkeletonCircle instead of Skeleton for metadata display
JunHammy Aug 9, 2025
80eec6e
use a more suitable font size for card component description
JunHammy Aug 9, 2025
167e260
Removed redundant image loading and error checks in metadata display
JunHammy Aug 9, 2025
1adfa9e
Added loaded state in catalogue to check for session validity before …
JunHammy Aug 9, 2025
8b7bc41
Refined fetchCatalogue function
JunHammy Aug 9, 2025
7fac10a
Removed unused image preloading for mmSection and Section
JunHammy Aug 9, 2025
7ee6d8f
Removed error state in metadataDisplay
JunHammy Aug 9, 2025
9beeb67
Merge branch 'main' into junhan
Prakhar896 Aug 9, 2025
b1465b8
Merge pull request #22 from ArchAIve-Project/junhan
Prakhar896 Aug 9, 2025
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
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
},
"dependencies": {
"@chakra-ui/react": "^3.20.0",
"@dnd-kit/core": "^6.3.1",
"@emotion/react": "^11.14.0",
"@reduxjs/toolkit": "^2.8.2",
"axios": "^1.9.0",
Expand Down
82 changes: 47 additions & 35 deletions src/components/Catalogue/arrowOverlay.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,46 +4,58 @@ import { motion, AnimatePresence } from "framer-motion";

const MotionBox = motion.create(Box);

const ArrowOverlay = ({ direction, isDisabled, onClick, isOverflowing }) => {
const ArrowOverlay = ({ direction, isDisabled, onClick, isOverflowing, smaller = false }) => {
const isLeft = direction === "left";

const commonProps = {
initial: { opacity: 0, x: isLeft ? -20 : 20 },
animate: { opacity: 1, x: 0 },
exit: { opacity: 0, x: isLeft ? -20 : 20 },
transition: { duration: 0.3 },
position: "absolute",
top: 0,
bottom: 0,
left: isLeft ? 0 : "auto",
right: isLeft ? "auto" : 0,
display: "flex",
alignItems: "center",
justifyContent: isLeft ? "flex-start" : "flex-end",
zIndex: 10,
cursor: isDisabled ? "not-allowed" : "pointer",
pointerEvents: isDisabled ? "none" : "auto",
opacity: isDisabled ? 0.3 : 1,
onClick,
bgGradient: isLeft ? "to-r" : "to-l",
gradientFrom: "rgb(255, 255, 255)",
gradientTo: "rgba(255, 255, 255, 0)",
};

return (
<AnimatePresence>
{isOverflowing && (
<MotionBox
key={direction}
initial={{ opacity: 0, x: isLeft ? -20 : 20 }}
animate={{ opacity: 1, x: 0 }}
exit={{ opacity: 0, x: isLeft ? -20 : 20 }}
transition={{ duration: 0.3 }}
position="absolute"
top={0}
bottom={0}
left={isLeft ? 0 : "auto"}
right={isLeft ? "auto" : 0}
width="100px"
display="flex"
alignItems="center"
justifyContent={isLeft ? "flex-start" : "flex-end"}
zIndex={10}
px={6}
bgGradient={isLeft ? "to-r" : "to-l"}
gradientFrom="rgb(255, 255, 255)"
gradientTo="rgba(255, 255, 255, 0)"
cursor={isDisabled ? "not-allowed" : "pointer"}
pointerEvents={isDisabled ? "none" : "auto"}
opacity={isDisabled ? 0.3 : 1}
onClick={onClick}
>
<Icon
as={isLeft ? FaChevronLeft : FaChevronRight}
color="black"
boxSize={8}
mx={1}
transition="transform 0.2s ease"
_hover={!isDisabled ? { transform: "scale(1.2)" } : {}}
/>
</MotionBox>
smaller ? (
<MotionBox {...commonProps} width="30px" px={2} key={direction}>
<Icon
as={isLeft ? FaChevronLeft : FaChevronRight}
color="black"
boxSize={4}
mx={1}
transition="transform 0.2s ease"
_hover={!isDisabled ? { transform: "scale(1.2)" } : {}}
/>
</MotionBox>
) : (
<MotionBox {...commonProps} width="100px" px={6} key={direction}>
<Icon
as={isLeft ? FaChevronLeft : FaChevronRight}
color="black"
boxSize={8}
mx={1}
transition="transform 0.2s ease"
_hover={!isDisabled ? { transform: "scale(1.2)" } : {}}
/>
</MotionBox>
)
)}
</AnimatePresence>
);
Expand Down
6 changes: 3 additions & 3 deletions src/components/Catalogue/cardComponent.jsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { Card, Image, Text, Skeleton } from "@chakra-ui/react";
import { useState } from "react";

const CardComponent = ({ imageSrc, itemTitle, itemDescription, isSelected, expanded }) => {
const CardComponent = ({ imageSrc, itemTitle, itemDescription, expanded }) => {
const [isImageLoaded, setIsImageLoaded] = useState(false);

const isLoading = !isImageLoaded;

return (
<Card.Root overflow="hidden" boxShadow={isSelected ? "lg" : "md"} transition="all 0.3s ease-in-out">
<Card.Root overflow="hidden" boxShadow={"md"} transition="all 0.3s ease-in-out">
<Skeleton loading={isLoading} height="180px">
<Image
src={imageSrc}
Expand All @@ -24,7 +24,7 @@ const CardComponent = ({ imageSrc, itemTitle, itemDescription, isSelected, expan
</Skeleton>
{expanded && (
<Skeleton loading={isLoading} mt={2}>
<Text>{itemDescription}</Text>
<Text fontSize={14}>{itemDescription}</Text>
</Skeleton>
)}
</Card.Body>
Expand Down
26 changes: 6 additions & 20 deletions src/components/Catalogue/cardItem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,15 @@ import CardComponent from "./cardComponent";

const MotionBox = motion.create(Box);

const CardItem = ({ itemTitle, itemDescription, selectedTitle, imageSrc }) => {
const CardItem = ({ itemTitle, itemDescription, imageSrc, expandable = true, descriptionDisplay = false }) => {
const isMobile = useBreakpointValue({ base: true, md: false });

const [isHovered, setIsHovered] = useState(false);
const [isSelected, setIsSelected] = useState(selectedTitle === itemTitle);
const [isLoading, setIsLoading] = useState(true);

const cardRef = useRef(null);
const [hoverPos, setHoverPos] = useState({ top: 0, left: 0 });
const scrollContainerRef = useRef(null);
const hoverTimeoutRef = useRef(null);

useEffect(() => {
setIsSelected(selectedTitle === itemTitle);
}, [selectedTitle, itemTitle]);

const updateHoverPosition = () => {
const rect = cardRef.current?.getBoundingClientRect();
if (rect) {
Expand All @@ -44,7 +37,7 @@ const CardItem = ({ itemTitle, itemDescription, selectedTitle, imageSrc }) => {
};

const handleMouseEnter = () => {
if (isMobile) return;
if (isMobile || !expandable) return;
hoverTimeoutRef.current = setTimeout(() => {
updateHoverPosition();
setIsHovered(true);
Expand Down Expand Up @@ -99,24 +92,18 @@ const CardItem = ({ itemTitle, itemDescription, selectedTitle, imageSrc }) => {
transition="all 0.1s ease-in-out"
cursor="pointer"
w="280px"
border={isSelected ? "1px solid" : "none"}
borderColor={isSelected ? "blue.600" : "transparent"}
bg={isSelected ? "gray.100" : "white"}
borderRadius="md"
boxShadow={isSelected ? "lg" : "md"}
zIndex={isHovered ? 30 : "auto"} // Conditional z-index
zIndex={isHovered ? 30 : "auto"}
>
<CardComponent
imageSrc={imageSrc}
itemTitle={itemTitle}
itemDescription={itemDescription}
isLoading={isLoading}
isSelected={isSelected}
expanded={false}
expanded={descriptionDisplay}
/>
</Box>

{!isMobile && (
{!isMobile && expandable && (
<AnimatePresence>
{isHovered && (
<MotionBox
Expand All @@ -129,7 +116,7 @@ const CardItem = ({ itemTitle, itemDescription, selectedTitle, imageSrc }) => {
position: "fixed",
top: hoverPos.top,
left: hoverPos.left + 15,
zIndex: 30, // Always high z-index for expanded card
zIndex: 30,
pointerEvents: "auto",
width: "280px",
}}
Expand All @@ -142,7 +129,6 @@ const CardItem = ({ itemTitle, itemDescription, selectedTitle, imageSrc }) => {
imageSrc={imageSrc}
itemTitle={itemTitle}
itemDescription={itemDescription}
isSelected={isSelected}
expanded={true}
/>
</MotionBox>
Expand Down
Loading