-
Notifications
You must be signed in to change notification settings - Fork 4
Unifying art branches #155
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
Open
samjjacko
wants to merge
151
commits into
main
Choose a base branch
from
unifying_art_branches
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
151 commits
Select commit
Hold shift + click to select a range
66f1c0d
feat: add Art model
Karl-Sue ddbf780
refactor: keep model register minimal
Karl-Sue b26d12d
Add ArtContributor model with API endpoints
DDuu123321 8ac4927
art-page-frontend
hanminh1203 8b98a06
art-page-frontend
hanminh1203 67ba4d8
Merge branch 'issue-8/art-page' of https://github.com/codersforcauses…
hanminh1203 7f91e0b
refactor: keep admin register simple
Karl-Sue aeedeec
fix: space error
Karl-Sue 31954af
Load arts from backend
hanminh1203 9e67fa6
Change field name style
hanminh1203 c955b14
Readd art field to create data
hanminh1203 c10ee23
Make the image height corresponding to the text
hanminh1203 9af2dc9
Filter on backend + include contributors into art
hanminh1203 1f2ce0c
Add Pagination on backend
hanminh1203 eed05ce
Improve frontend to support responsive
hanminh1203 a1371d6
Improve resize image
hanminh1203 1f1958c
Back button padding
hanminh1203 f4d442a
feature: improve responsive layout
Karl-Sue ac79752
fix: resolve merge conflicts in artwork pages
Karl-Sue 3b5607e
feat: add Art hook
Karl-Sue 2e9ef67
feat: add Artwork hook
Karl-Sue 3d38119
feat: add placeholder art
Karl-Sue 0b4164d
Fix flake8
hanminh1203 45afd6d
fix: match Prettier code style
Karl-Sue b7273d5
Fix flake8
hanminh1203 fd90b63
Merge pull request #37 from codersforcauses/issue-8-resolve-merge-con…
Karl-Sue 53e30c3
Refactor code for reuseability
hanminh1203 b234e60
Error message
hanminh1203 cc4ac45
Remove mock data on Frontend
hanminh1203 fb3f1c9
Merge remote-tracking branch 'origin/main' into issue-8-Individual_ar…
hanminh1203 f0c5e4c
Solve conflict and adapt code
hanminh1203 08f0865
fix flake8 on backend
hanminh1203 23b65ea
Fix Prettier and type check
hanminh1203 6cc9d1c
Correct django-filter version
hanminh1203 39306ef
Commit poetry.lock
hanminh1203 d564d05
Commit poetry.lock
hanminh1203 b0a3062
Correct script order
hanminh1203 d1c5ee9
Correct script order
hanminh1203 c820c7d
feat: implement individual art pages with full functionality
DDuu123321 2112171
fix: remove null=True from URLField to pass flake8
DDuu123321 6640e7f
style: fix prettier formatting in error-modal.tsx
DDuu123321 f77d7a7
Remove the import and then add the icon import: Discord and Instagram
DDuu123321 4277b4d
Fix import formatting in [id].tsx
DDuu123321 959c3e1
feature: add mock data for dev
Karl-Sue 6a7a5e0
chore: update migrations and frontend components
DDuu123321 e971856
style: fix prettier formatting issues in [id].tsx
DDuu123321 24965ba
feature: add link to button
Karl-Sue 27777e2
merge: resolve merge conflict between local and remote branch
Karl-Sue 4c5c1ba
Refactor: Move social links from ArtContributor to Member model and r…
DDuu123321 2951ead
Fix: Remove hardcoded social media fields to comply with schema design
DDuu123321 1138ccb
Resolve merge conflict in Navbar: keep z-100 from main
DDuu123321 6df9c3d
Fix: Remove django_filters import and usage from views.py
DDuu123321 8e9de27
Update views.py
DDuu123321 85ea95d
Fix: Add newline at end of views.py
DDuu123321 163cc05
refactor: remove pagination
Karl-Sue 57a7a84
refactor: change from viewset to a standard RetrieveAPIView
Karl-Sue 752ed72
bug: remove leftover code:
Karl-Sue ec5f54a
Create backend model and API to retrieve featured art pieces.
hanminh1203 2a1cea8
refactor: remove redundant file
Karl-Sue 7afaaa9
bug: fix the unused components error
Karl-Sue 1900c91
Merge branch 'main' into issue-8-Individual_art_pages
Karl-Sue 255583e
Merge branch 'main' into issue-8-feature
Karl-Sue 1a41234
Merge branch 'main' into issue-8-Individual_art_pages
SafetyInObscurity 60c5243
Merge branch 'main' into issue-8-Individual_art_pages
SafetyInObscurity cfda27b
Merge branch 'main' into issue-8-Individual_art_pages
DDuu123321 665ac3d
refactor: redesign artshowcase
Karl-Sue 387fbf0
fix: styling
Karl-Sue c487a57
feat: add interactive artwork cards with flip animation and responsiv…
Karl-Sue 8d20e20
Merge branch 'issue-8-feature' into issue-8-Individual_art_pages
Karl-Sue 5deca41
merge: resolve merge conflict when merging main
Karl-Sue ab4a7ee
refactor: remove discord + insta url for frontend
Karl-Sue 0a6c08c
refactor: remove basedto + page-reponse
Karl-Sue 08b4de6
styling: using font-sans instead of font-jersey10
Karl-Sue ca9ec39
Fix: Remove deprecated social media fields and unify font usage
DDuu123321 d455d9c
Merge branch 'main' into issue-8-Individual_art_pages
DDuu123321 1f56957
Merge conflicting migrations
DDuu123321 fd39a11
Fix flake8 formatting error
DDuu123321 76e5048
conflict: merge main
Karl-Sue bd8ad2b
add: migration
Karl-Sue 46bb94c
merge: issue 40
Karl-Sue 7b047ef
Fix API response for featured arts
DDuu123321 ae42906
merge: issue-40/backend
Karl-Sue fb56dfc
add: migration
Karl-Sue 2f50442
refactor: change api response
Karl-Sue c84e9dc
merge: main + resolve conflict
Karl-Sue 0aa032d
added source_game fields to the API
DDuu123321 7793066
add: migration
Karl-Sue 7ac5eeb
fix: eslint type
Karl-Sue e130d81
refactor: use svgs instead of inline declaration
Karl-Sue 8853c77
refactor: using AddConstraint in migration instead of AlterConstraint
Karl-Sue f82e5e2
Merge remote-tracking branch 'origin/issue-40/backend' into issue-8-m…
Karl-Sue a12b072
feature: connect frontend + backend
Karl-Sue 626ac05
feature: add tests for art model
Karl-Sue 319b1a2
feature: add fallback when server fail
Karl-Sue 1246ac5
feature: add api endpoint /api/arts/[id]
Karl-Sue f72ee8a
fix: eslint error
Karl-Sue 0e2e2b4
add art doc
Karl-Sue 03f7e1a
fix: art documentation - provide more details
Karl-Sue e99cb33
refactor: move file location to /client, next to src and public
Karl-Sue af9d741
changed to match db names
KKatariah 5f30aa9
bolded rthe rquired label and added descriptions for game contributors
KKatariah 7e445c9
refactor: Art class for consistency with Game team issue #81
Karl-Sue 5ca579c
merge: resolve merge conflict with main branch
Karl-Sue cfe92cb
Reworked how pronouns and names are arranged
Games4Doritos ab66a47
Undid ternary logic for pronouns
Games4Doritos 6030880
changed the python version constraints in the pyproject.toml to avoid…
samjjacko a38fe17
linked landing page buttons to game and art showcase respectively
c8854b2
Added member profile documentation
ba34f30
Added social media link information to the member profile documentation
7952656
404 page stuffs
saltyypringle 21ec32f
fixed small styling
saltyypringle 5b81c47
typo
saltyypringle 981ffc8
moved the trivia to a json file
saltyypringle f9ede4f
prettier
saltyypringle efdee09
Update client/src/pages/404.tsx
saltyypringle da1caa5
Update client/src/pages/404.tsx
saltyypringle 544b666
fixed styling for mobile view
saltyypringle 5d5df64
resolve conflict between remote and local branch
Karl-Sue 25c468f
still needs a description potentially
KKatariah 98880aa
fix: remove unnecessary test
Karl-Sue 876d7cd
fix: formatting
Karl-Sue 4422c5d
Merge branch 'main' of https://github.com/codersforcauses/game-dev in…
KKatariah 29babd8
delete: placeholder image that is no longer needed
Karl-Sue 120cb70
delete: redundant comment
Karl-Sue 7e79d4f
Merge branch 'main' into issue-8-merge-40
laurenpudz 5cd8f7c
remove old migrations
laurenpudz 942133f
get rid of svgs and unnecessary components
laurenpudz 7ea45a1
simplify individual art page and contributor list
laurenpudz c04847e
make individual page somewhat responsive
laurenpudz 67def40
start cleaning up showcase page
laurenpudz 095b63b
Merge branch 'main' into issue-93-events_documentation
Games4Doritos f18ed12
Refined Events docs
Games4Doritos 8480665
Merge branch 'main' into issue-96-contributors_documentation
Games4Doritos 3d19d0d
Re-did contributors docs, no just for art and game
Games4Doritos ee28504
oops
Games4Doritos f8395b4
Fixing test and flake8 errors
SafetyInObscurity 8d35c4f
Merge branch 'main' into issue-8-merge-40
SafetyInObscurity 80a53e3
Merge migrations
SafetyInObscurity 3e30b57
Merge remote-tracking branch 'origin/main' into issue-96-contributors…
samjjacko 95f87ee
Merge remote-tracking branch 'origin/main' into issue-93-events_docum…
samjjacko 87aea7e
added url
samjjacko 22c27c3
renamed and removed random script directory
samjjacko 06d08d6
merged issue-81 into this branch
samjjacko 2d68543
glued branches together, refactored a bit and wrote some logic to dis…
samjjacko f02f14b
Merge branch 'issue-96-contributors_documentation' into unifying_art
samjjacko 0f3c3a7
Merge branch 'issue-93-events_documentation' into unifying_art_branches
samjjacko f8ee130
added events documentation
samjjacko 0fc6ef3
genuinely have no idea how duplicates emerged
samjjacko 8208665
prettier
samjjacko c9c1823
Correct migrations
SafetyInObscurity 16b1109
quick fixes - add utility classes and remove commentsd
laurenpudz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| ## Contributors | ||
|
|
||
| Models that associate a member object with another certain object as a contributor to it. There are two types: | ||
|
|
||
| ## Game Contributor | ||
| URL: `/admin/game_dev/gamecontributor/` | ||
| A model that will associate a certain member with having contributed to a certain game. A Game Contributor object will be represented under the 'Contributors' section of a game's page as the name of the member who contributed. | ||
|
|
||
| ## Fields | ||
|
|
||
| **Game:** Required field for the game that the contributor is for. It is an integer field that corresponds to the raw integer id of a Game object in the Game table, known as a Foreign Key. | ||
|
|
||
| **Member:** Required field for the member that is the contributor to the specified game. It is an integer field that corresponds to the raw integer id of a Member object in the Member table, known as a Foreign Key. | ||
|
|
||
| **Role:** Required character field for the description of the role that the person played in contributing to the game. Maximum length of 100 characters | ||
|
|
||
| ## Other Notes | ||
|
|
||
| You will see a little magnifying glass when selecting a Game and Member, click on it to see their respective table and be able choose the integer id's using the desired details. Though none of the individual fields are a primary key, the actual primary key is the unique (Game, Member) pair that each object forms. | ||
|
|
||
|
|
||
| ## Art Contributor | ||
| * This can be found inline inside of an art entry, e.g. `/admin/game_dev/art/1/change/`. | ||
| A model that will associate a certain member with having contributed to a certain artwork. | ||
|
|
||
| ## Fields | ||
|
|
||
| **Member:** Required field for the member that is the contributor to the specified artwork. It is an integer field that corresponds to the raw integer id of a Member object in the Member table, known as a Foreign Key. | ||
|
|
||
| **Role:** Required character field for the description of the role that the person played in contributing to the artwork. Maximum length of 100 characters |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| ## Events | ||
|
|
||
| URL: `/admin/game_dev/event/add` | ||
|
|
||
| Event instances that are displayed on the landing and events pages | ||
|
|
||
| ## Fields | ||
|
|
||
| **Name:** Required character field for the event's name. | ||
|
|
||
| **Date:** Required field for the event date and time. Must be a valid date and time. Uses either ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ) or American format (MM-DD-YYYY HH:MM) for date and time representation. | ||
|
|
||
| **Description:** Optional character field for a description of the event. | ||
|
|
||
| **Publication Date:** Required field for the date the event is published. Uses either ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ) or American format (MM-DD-YYYY HH:MM) for date and time representation. | ||
|
|
||
| **Cover Image:** Optional field to upload a cover image for the event, which will otherwise display the event's name. | ||
|
|
||
| **Location:** Required field for the event location. | ||
|
|
||
| ## Other Notes | ||
|
|
||
| An Event object can referenced in a Game object's 'Event' field, which is also a foreign key. On the events page, events will either show up under past or upcoming depending on their date, and each Event object can be directly routed to at /events/{id} (integer uid). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Need to check if this is actually getting used or not |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| import Link from "next/link"; | ||
|
|
||
| import { ArtContributor } from "@/types/art-contributor"; | ||
|
|
||
| interface ContributorsListProps { | ||
| contributors: ArtContributor[]; | ||
| } | ||
|
|
||
| export default function ContributorsList({ | ||
| contributors, | ||
| }: ContributorsListProps) { | ||
| if (contributors.length === 0) { | ||
| return null; | ||
| } | ||
|
|
||
| return ( | ||
| <> | ||
| <div className="font-jersey10 text-2xl text-accent">Contributors</div> | ||
| <div className="relative flex flex-col gap-1"> | ||
| {contributors.map((contributor) => ( | ||
| <div key={contributor.id}> | ||
| <Link | ||
| href={`/members/${contributor.member_id}`} | ||
| className="text-accent hover:underline" | ||
| onClick={(e) => e.stopPropagation()} | ||
| > | ||
| {contributor.member_name} | ||
| </Link> | ||
| {" - "} | ||
| <span>{contributor.role}</span> | ||
| </div> | ||
| ))} | ||
| </div> | ||
| </> | ||
| ); | ||
| } |
|
laurenpudz marked this conversation as resolved.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,122 @@ | ||
| // This carousel is for Artworks to be displayed in the Gameshowcase | ||
|
|
||
| import { ChevronLeft, ChevronRight } from "lucide-react"; | ||
| import Image from "next/image"; | ||
| import Link from "next/link"; | ||
| import { useEffect, useRef, useState } from "react"; | ||
|
|
||
| import type { UiArtwork } from "@/hooks/useGames"; | ||
|
|
||
| type GameArtCarouselProps = { | ||
| items: UiArtwork[]; | ||
| }; | ||
|
|
||
| const GAP = 20; | ||
| const maxItemsPerPage = 4; | ||
|
|
||
| export default function GameArtCarousel({ items }: GameArtCarouselProps) { | ||
| const firstItemRef = useRef<HTMLDivElement>(null); | ||
|
|
||
| const [currentIndex, setCurrentIndex] = useState(0); | ||
| const [itemWidth, setItemWidth] = useState(0); | ||
| const [visibleCount, setVisibleCount] = useState(maxItemsPerPage); | ||
|
|
||
| const maxIndex = Math.max(items.length - visibleCount, 0); | ||
|
|
||
| const slideLeft = () => { | ||
| setCurrentIndex((prev) => Math.max(prev - 1, 0)); | ||
| }; | ||
|
|
||
| const slideRight = () => { | ||
| setCurrentIndex((prev) => Math.min(prev + 1, maxIndex)); | ||
| }; | ||
|
|
||
| const translateX = -(currentIndex * (itemWidth + GAP)); | ||
|
|
||
| useEffect(() => { | ||
| if (!firstItemRef.current) return; | ||
|
|
||
| const observer = new ResizeObserver(() => { | ||
| const width = firstItemRef.current?.clientWidth ?? 0; | ||
| setItemWidth(width); | ||
| }); | ||
|
|
||
| observer.observe(firstItemRef.current); | ||
|
|
||
| return () => observer.disconnect(); | ||
| }, []); | ||
|
|
||
| useEffect(() => { | ||
| const updateVisibleCount = () => { | ||
| if (window.innerWidth < 768) { | ||
| setVisibleCount(1); | ||
| } else { | ||
| setVisibleCount(maxItemsPerPage); | ||
| } | ||
| }; | ||
|
|
||
| updateVisibleCount(); | ||
| window.addEventListener("resize", updateVisibleCount); | ||
|
|
||
| return () => window.removeEventListener("resize", updateVisibleCount); | ||
| }, []); | ||
|
|
||
| return ( | ||
| <div className="container mx-auto py-10"> | ||
| <div className="relative"> | ||
| {/* LEFT ARROW */} | ||
| <button | ||
| onClick={slideLeft} | ||
| disabled={currentIndex === 0} | ||
| className="absolute left-[-50px] top-1/2 z-10 flex h-10 w-10 -translate-y-1/2 items-center justify-center rounded-full bg-dark_3 text-white shadow-md hover:bg-accent disabled:opacity-30" | ||
| > | ||
| <ChevronLeft size={30} /> | ||
| </button> | ||
|
|
||
| {/* VIEWPORT */} | ||
| <div className="overflow-hidden"> | ||
| <div | ||
| className="flex transition-transform duration-300 ease-out" | ||
| style={{ | ||
| gap: GAP, | ||
| transform: `translateX(${translateX}px)`, | ||
| }} | ||
| > | ||
| {items.map((art, index) => ( | ||
| <div | ||
| key={art.id} | ||
| ref={index === 0 ? firstItemRef : undefined} | ||
| className="flex-shrink-0" | ||
| style={{ | ||
| width: `calc((100% - ${(visibleCount - 1) * GAP}px) / ${visibleCount})`, | ||
| }} | ||
| > | ||
| <Link href={`/artwork/${art.id}`}> | ||
| <div className="relative aspect-[4/3] w-full overflow-hidden rounded-lg"> | ||
| <Image | ||
| src={art.image} | ||
| alt={art.name} | ||
| fill | ||
| className="object-cover" | ||
| /> | ||
| </div> | ||
| </Link> | ||
|
|
||
| <h3 className="mt-4 text-lg text-white">{art.name}</h3> | ||
| </div> | ||
| ))} | ||
| </div> | ||
| </div> | ||
|
|
||
| {/* RIGHT ARROW */} | ||
| <button | ||
| onClick={slideRight} | ||
| disabled={currentIndex === maxIndex} | ||
| className="absolute right-[-50px] top-1/2 z-10 flex h-10 w-10 -translate-y-1/2 items-center justify-center rounded-full bg-dark_3 text-white shadow-md hover:bg-accent disabled:opacity-30" | ||
| > | ||
| <ChevronRight size={30} /> | ||
| </button> | ||
| </div> | ||
| </div> | ||
| ); | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.