Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
69ad0ec
Merge pull request #33 from ArchAIve-Project/main
Prakhar896 Aug 13, 2025
58076e9
Added fetchCollection for artefact editor
JunHammy Aug 13, 2025
2c72b3c
Added colID and artID check for artefact editor
JunHammy Aug 13, 2025
c49df20
Added scrolling for artefact editor
JunHammy Aug 13, 2025
2d66452
Made metadataDisplay scrollable
JunHammy Aug 13, 2025
e32cbba
Linked cb to ae
JunHammy Aug 13, 2025
2e650a6
Changed artifact to artefact
JunHammy Aug 13, 2025
f6a3803
Shifted unused compoenents to /old, added rough UI for group view
JunHammy Aug 13, 2025
bea5102
Updated AE fetchCollection to accept list from endpoint
JunHammy Aug 13, 2025
01eb7ae
Fixed AE refetching data
JunHammy Aug 13, 2025
42ae28f
Fixed back button for AE
JunHammy Aug 13, 2025
a6f0430
Added navigation from section to group view
JunHammy Aug 13, 2025
ab5912f
Added smaller component groupCardItem for GroupView
JunHammy Aug 13, 2025
f3b7d7c
Removed debug console log
JunHammy Aug 13, 2025
fa6d5c7
Shifted DataStudio to Old
JunHammy Aug 13, 2025
bae85ae
Improved responsiveness for AE
JunHammy Aug 14, 2025
a4623d7
Added navigatiuon for catalogue item view for mobile
JunHammy Aug 14, 2025
1d6daa5
Removed collection view
JunHammy Aug 14, 2025
d990574
Shifted unused components to Old folder
JunHammy Aug 14, 2025
256ce43
Added cursor pointer for IoOpen
JunHammy Aug 14, 2025
6e4fafe
Added toast wizards for groupview fetch collection
JunHammy Aug 14, 2025
0e25c0c
Removed unused states, Fixed responsiveness for AE
JunHammy Aug 14, 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 .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ package-lock.json

.env
/src/pages/test.jsx
/src/components/Old
35 changes: 30 additions & 5 deletions src/components/Catalogue/catalogueItemView.jsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
import { Portal, CloseButton, Image, Box, Text, Icon, Flex, useBreakpointValue } from "@chakra-ui/react";
import { Tooltip } from "../../components/ui/tooltip"
import { useEffect, useState, useRef } from "react";
import { useNavigate } from "react-router-dom";
import { motion, AnimatePresence } from "framer-motion";
import { FaChevronLeft, FaChevronRight } from "react-icons/fa";
import ItemViewToggle from "./itemViewToggle";
import ItemViewMenu from "./itemViewMenu";
import MetadataDisplay from "./metadataDisplay";
import ItemChat from "./itemChat";
import { IoOpen } from "react-icons/io5";

const MotionBox = motion.create(Box);
const MotionChevron = motion.create(Box);

const CatalogueItemView = ({ isOpen, onClose, title, items, setDialogTitle, imageSrc }) => {
const CatalogueItemView = ({ isOpen, onClose, title, sectionId, items, setDialogTitle, imageSrc }) => {
const [isNavigating, setIsNavigating] = useState(false);
const [direction, setDirection] = useState(0);
const [isInitialRender, setIsInitialRender] = useState(true);
Expand All @@ -20,6 +22,8 @@ const CatalogueItemView = ({ isOpen, onClose, title, items, setDialogTitle, imag
const scrollRef = useRef(null);
const modalRef = useRef(null);
const currentIndex = items.findIndex((item) => item.title === title);
const currentId = currentIndex !== -1 ? items[currentIndex].id : null;
const navigate = useNavigate()

const prevItem = () => {
if (!isNavigating && currentIndex > 0) {
Expand Down Expand Up @@ -357,7 +361,17 @@ const CatalogueItemView = ({ isOpen, onClose, title, items, setDialogTitle, imag
>
{item.title}
</Text>
<ItemViewMenu />

<Tooltip
showArrow
content="Open in Data Studio"
positioning={{ placement: "right-end" }}
closeDelay={150}
openDelay={150}
contentProps={{ css: { "--tooltip-bg": "#12144C" } }}
>
<IoOpen size={25} color="#12144C" onClick={() => navigate(`/studio/${sectionId}/${currentId}`)} cursor={"pointer"}/>
</Tooltip>
</Flex>

<CloseButton
Expand Down Expand Up @@ -481,10 +495,21 @@ const CatalogueItemView = ({ isOpen, onClose, title, items, setDialogTitle, imag
lg: "2xl",
}}
fontWeight="bold"
mr={4}
>
{title}
</Text>
<ItemViewMenu />

<Tooltip
showArrow
content="Open in Data Studio"
positioning={{ placement: "right-end" }}
closeDelay={150}
openDelay={150}
contentProps={{ css: { "--tooltip-bg": "#12144C" } }}
>
<IoOpen size={25} color="#12144C" onClick={() => navigate(`/studio/${sectionId}/${currentId}`)} cursor={"pointer"}/>
</Tooltip>
</Flex>

<Box
Expand All @@ -505,7 +530,7 @@ const CatalogueItemView = ({ isOpen, onClose, title, items, setDialogTitle, imag
/>
</Box>

<Box flex={1} mt={4}>
<Box flex={1} mt={4} overflowY={"auto"} scrollbar={"hidden"}>
{selectedSegment ===
"metadata" ? (
<MetadataDisplay
Expand Down
31 changes: 0 additions & 31 deletions src/components/Catalogue/itemViewMenu.jsx

This file was deleted.

4 changes: 2 additions & 2 deletions src/components/Catalogue/metadataDisplay.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -249,13 +249,13 @@ function MetadataDisplay({ currentItem, isOpen }) {
{metadata.addInfo && (
<>
<Text fontWeight="bold" mb={1}>Additional Info:</Text>
<Text>{metadata.addInfo}</Text>
<Text mb={6}>{metadata.addInfo}</Text>
</>
)}

{/* Figure headshots (if available) */}
{Array.isArray(metadata.figureIDs) && metadata.figureIDs.length > 0 ? (
<Flex wrap="wrap" gap={4} mb={4}>
<Flex wrap="wrap" gap={10} mb={4}>
{metadata.figureIDs.map((id) => (
<Box
key={id}
Expand Down
32 changes: 21 additions & 11 deletions src/components/Catalogue/section.jsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import { Box, Text, Flex, useBreakpointValue, Image } from "@chakra-ui/react";
import { Box, Text, Flex, useBreakpointValue, Image, Button } from "@chakra-ui/react";
import { useRef, useState, useEffect } from "react";
import CardItem from "./cardItem.jsx";
import CatalogueItemView from "./catalogueItemView.jsx";
import ArrowOverlay from "./arrowOverlay.jsx";
import placeholderImage from "../../assets/placeholderImage.png"
import { useNavigate } from "react-router-dom";
import { BsEye } from "react-icons/bs";

const Section = ({ sectionTitle, onItemClick, artefacts = [] }) => {
const Section = ({ sectionTitle, sectionId, onItemClick, artefacts = [] }) => {
const isMobile = useBreakpointValue({ base: true, md: false });
const navigate = useNavigate()

const items = artefacts.map((art) => ({
id: art.id,
Expand Down Expand Up @@ -66,15 +69,21 @@ const Section = ({ sectionTitle, onItemClick, artefacts = [] }) => {

return (
<Box mt={5} position="relative" overflow="hidden">
<Text
paddingLeft={14}
textStyle="xl"
zIndex={20}
position="relative"
mb={4}
>
{sectionTitle}
</Text>
<Flex flexDirection={"row"} alignItems={"center"} mb={4}>
<Text
paddingLeft={14}
textStyle="xl"
zIndex={20}
position="relative"
>
{sectionTitle}
</Text>

<Button size={"sm"} variant={"ArchPrimary"} ml={6} onClick={() => navigate(`/studio/${sectionId}`)}>
<BsEye />
<Text>View</Text>
</Button>
</Flex>

{!isMobile && (
<>
Expand Down Expand Up @@ -136,6 +145,7 @@ const Section = ({ sectionTitle, onItemClick, artefacts = [] }) => {
isOpen={dialogOpen}
onClose={() => setDialogOpen(false)}
title={dialogTitle}
sectionId={sectionId}
items={items}
setDialogTitle={setDialogTitle}
imageSrc={currentItem?.imageSrc}
Expand Down
58 changes: 0 additions & 58 deletions src/components/DataStudio/ItemGrid.jsx

This file was deleted.

72 changes: 0 additions & 72 deletions src/components/DataStudio/ItemGroups.jsx

This file was deleted.

Loading