Skip to content
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
36 changes: 0 additions & 36 deletions client/app/[username]/components/GallerySection.jsx

This file was deleted.

97 changes: 0 additions & 97 deletions client/app/[username]/components/GallerySection.module.css

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
position: relative;
}

/* Prompt: how can I customize the styling of the embla carousel component used within my media panel? I want to ensure that it can fit within the bounds of the post modal. Provide CSS examples to adjust its appearance, but do not modify the code, I will decide what to include */
.media :global(.carouselWrapper) {
width: 100%;
height: 100%;
Expand Down
4 changes: 2 additions & 2 deletions client/app/api/uploadthing/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const ourFileRouter = {
.onUploadComplete(async ({ metadata, file }) => {
// This code RUNS ON YOUR SERVER after upload
console.log("Upload complete for userId:", metadata.userId);
console.log("file url", file.url);
console.log("file url", file.ufsUrl);

// Extract EXIF from uploaded image
let exifData = null;
Expand All @@ -42,7 +42,7 @@ export const ourFileRouter = {
const response = await fetch(`${API_URL}/api/exif/extract`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ imageUrl: file.url }),
body: JSON.stringify({ imageUrl: file.ufsUrl }),
});

if (response.ok) {
Expand Down
15 changes: 13 additions & 2 deletions client/app/feed/Feed.module.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
/* Feed.module.css */
/* Feed.module.css
* GenAI Usage Note: After implementing the feed's data fetching and component structure,
* I used Copilot for styling refinements. Example prompt: "Help style the feed container
* with appropriate spacing, a centered max-width layout, and a soft background."
* I maintained full control by reviewing each suggestion and ensuring consistency
* with our established color palette and spacing system.
*/

.page {
min-height: 100vh;
background-color: #f5f0eb;
Expand Down Expand Up @@ -56,7 +63,11 @@
margin: 2rem 0;
}

/* Category Filter Styles */
/* Category Filter Styles:
* Prompt: Can you provide some potential approaches to styling a category filter bar
* for the feed page that complements the existing design? Do not implement any code, however, provide a number of suggestions
* and explain your reasoning for each one
*/
.filterBar {
display: flex;
align-items: center;
Expand Down
8 changes: 7 additions & 1 deletion client/app/feed/components/Post.module.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
/* Post.module.css */
/* Post.module.css
* GenAI Usage Note: I designed the post component structure and functionality myself.
* For visual polish, I asked Copilot: "Style the post card with rounded corners,
* subtle shadow, and appropriate padding for a clean feed appearance."
* I reviewed the output and adjusted the coloring and shadow intensity to align with the rest of our design.
*/

.post {
border-radius: 1.5rem;
padding: 1.5rem;
Expand Down
11 changes: 11 additions & 0 deletions client/app/feed/components/likesDialog.module.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
/* likesDialog.module.css
* GenAI Usage Note: I built the likes dialog component and modal logic independently.
* For animation polish, I asked Copilot: "Add smooth fade-in and slide-up animations
* for the modal overlay and dialog box with appropriate timing."
* I did some research on what @keyframes does, and once I understood it, I came to the conclusion
* that it would be best to use it here.
* I reviewed the keyframe animations and adjusted duration values to ensure
* the transitions felt natural and weren't too slow.
*/

.overlay {
position: fixed;
top: 0;
Expand Down Expand Up @@ -99,6 +109,7 @@
border-bottom: 1px solid #f0f0f0;
}

/* prompt: How do I ensure the border doesn't apply to the last item only? */
.likeItem:last-child {
border-bottom: none;
}
Expand Down
11 changes: 11 additions & 0 deletions client/app/feed/components/postImage.module.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/* postImage.module.css
* GenAI Usage Note: I implemented the image carousel logic using Embla Carousel library.
* For carousel button styling, I prompted Copilot: "Style navigation buttons with
* circular shape, semi-transparent background, and smooth hover transitions."
* I retained control by adjusting opacity, backdrop-filter, and z-index values
* to ensure buttons were visible but not obtrusive.
*/

.carouselWrapper {
position: relative;
width: 100%;
Expand All @@ -16,6 +24,9 @@
justify-content: center;
}

/* Prompt: Is it possible to use my own styling for the embla carousel component?
* If so, please give suggestions on how to approach that.
*/
.embla {
overflow: hidden;
border-radius: 1rem;
Expand Down
8 changes: 8 additions & 0 deletions client/app/upload/Upload.module.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/* Upload.module.css
* GenAI Usage Note: After building the upload form structure and logic myself,
* I used Copilot to assist with visual styling elements. Specifically, I prompted:
* "Help style the upload page container with a soft background, centered layout,
* and proper spacing for a clean multi-step form appearance."
* I reviewed the suggestions and adjusted values to match our project's design system.
*/

.page {
min-height: 100vh;
background-color: #f5f0eb;
Expand Down
8 changes: 3 additions & 5 deletions client/app/upload/components/CategoriesStep.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@
background-color: rgba(255, 255, 255, 0.8);
}

.catDropdownBtn[aria-expanded="true"] {
border-color: #da8d72;
background-color: rgba(255, 255, 255, 0.9);
}

.catPlaceholder {
color: #a49a87;
}
Expand All @@ -64,6 +59,9 @@
transition: transform 0.2s ease;
}

/* Prompt: How can I rotate the caret icon when the dropdown is expanded? Give
* recommended approaches, would this be a CSS problem, or something I address in the JSX * file?
*/
.catDropdownBtn[aria-expanded="true"] .catCaret {
transform: rotate(180deg);
}
Expand Down
65 changes: 8 additions & 57 deletions client/app/upload/components/ReviewSubmitStep.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"use client";
import useEmblaCarousel from "embla-carousel-react";
import { useEffect, useState } from "react";
import styles from "./ReviewSubmitStep.module.css";
import PostImage from "@/app/feed/components/postImage";

export default function ReviewSubmitStep({
uploadedFiles,
Expand All @@ -12,68 +11,20 @@ export default function ReviewSubmitStep({
onSubmit,
isSubmitting,
}) {
const [emblaRef, emblaApi] = useEmblaCarousel({ loop: true });
const [canScrollPrev, setCanScrollPrev] = useState(false);
const [canScrollNext, setCanScrollNext] = useState(false);

useEffect(() => {
if (!emblaApi) return;
const onSelect = () => {
setCanScrollPrev(emblaApi.canScrollPrev());
setCanScrollNext(emblaApi.canScrollNext());
};
emblaApi.on("select", onSelect);
emblaApi.on("reInit", onSelect);
onSelect();
return () => {
emblaApi.off("select", onSelect);
emblaApi.off("reInit", onSelect);
};
}, [emblaApi]);

useEffect(() => {
if (emblaApi && uploadedFiles.length > 0) emblaApi.reInit();
}, [emblaApi, uploadedFiles]);
// Convert uploadedFiles to image URLs for PostImage component
const imageUrls = uploadedFiles.map((file) => {
if (typeof file === "string") return file;
return file.url;
});

return (
<>
<h2>Step 4: Review Your Memory</h2>
<div className={styles.reviewContainer}>
<div className={styles.reviewSection}>
<h3>Photos ({uploadedFiles.length})</h3>
<div className={styles.embla} ref={emblaRef}>
<div className={styles.emblaContainer}>
{uploadedFiles.map((file, idx) => (
<div key={idx} className={styles.emblaSlide}>
<img
src={typeof file === "string" ? file : file.url}
alt={`preview ${idx + 1}`}
/>
</div>
))}
</div>
</div>
{uploadedFiles.length > 1 && (
<div className={styles.carouselControls}>
<button
onClick={() => emblaApi?.scrollPrev()}
disabled={!canScrollPrev}
className={styles.carouselBtn}
>
</button>
<span className={styles.slideCounter}>
{uploadedFiles.length} images
</span>
<button
onClick={() => emblaApi?.scrollNext()}
disabled={!canScrollNext}
className={styles.carouselBtn}
>
</button>
</div>
)}
{/* use postImage instead of reimplementing image display */}
<PostImage imageUrls={imageUrls} caption={null} />
</div>
<div className={styles.reviewSection}>
<h3>Caption</h3>
Expand Down
Loading