Skip to content

Conversation

@bilibilistack
Copy link
Collaborator

@bilibilistack bilibilistack commented Dec 4, 2025

Change Summary

This pull request introduces new models for games and events to the backend, and adds frontend components and configuration to support displaying detailed game pages with images and embedded external content. The main changes are grouped into backend model/migration additions and frontend feature enhancements.

Backend: New Models and Migrations

  • Added Events and Games models to server/game_dev/models.py, including fields for name, description, completion status, hosting URL, media path, and event association. This enables structured storage and querying of game and event data.
  • Created a migration (0002_events_games.py) to add the new Events and Games tables to the database, with appropriate fields and relationships.

Frontend: Game Page and Embedding Support
Visit http://localhost:3000/games/xx to browse the individual game pages, backend integration has not been performed yet.

  • Implemented a new IndividualGamePage component in client/src/pages/games/[id].tsx, which displays game details, contributors, event info, game art, and embeds external content (e.g., itch.io games). (client/src/pages/games/[id].tsxR1-R123)
  • Added a reusable ItchEmbed component to client/src/components/ui/ItchEmbed.tsx for embedding itch.io games with customizable dimensions and linking.

Frontend: Configuration

  • Updated next.config.mjs to allow images from upload.wikimedia.org so that external game covers and art can be displayed securely.

Change Form

Fill this up (NA if not available). If a certain criteria is not met, can you please give a reason.

  • [✅] The pull request title has an issue number Individual game pages #7
  • The change works by "Smoke testing" or quick testing
    Explanation: (Only static frontend pages has been created and tested)
  • The change has tests
  • [✅] The change has documentation

Other Information

[Is there anything in particular in the review that I should be aware of?]

Related issue

nicostellar and others added 21 commits November 29, 2025 04:42
…dersforcauses/game-dev into issue-7-Individual_game_pages

This because my branch and the 'origin/issue-7-Individual_game_pages' have diverged
…dersforcauses/game-dev into issue-7-Individual_game_pages

Fixed issue with the server side models.py, migrated the two new models games and events
…ternal image domains for better asset management
@bilibilistack bilibilistack self-assigned this Dec 4, 2025
@bilibilistack bilibilistack added the frontend Task must have a front end issue label Dec 4, 2025
…dersforcauses/game-dev into issue-7-Individual_game_pages-backend

Pulling any changes from issue-7-Individual_game_pages
Copy link
Collaborator

@SafetyInObscurity SafetyInObscurity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Off to a good start!

active = models.BooleanField(default=True, null=False)
hostURL = models.CharField(max_length=2083)
isItch = models.BooleanField(default=True, null=False)
pathToMedia = models.CharField(max_length=2083)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similarly to the "members" table, we should be storing the images with an Image field.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SafetyInObscurity Thanks for the feedback. I have fixed the field to be called pathToThumbnail with the correct model datatype and path to "games/" subfolder under the media/ folder. The changes have been pushed to the issue-7-Individual_game_pages branch

hostURL = models.CharField(max_length=2083)
isItch = models.BooleanField(default=True, null=False)
pathToMedia = models.CharField(max_length=2083)
event = models.ForeignKey(Events, on_delete=models.CASCADE, null=False)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Event is an optional field. Not all games must have an associated game. When an event is deleted, the field should be set to Null.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Events problem "event = models.ForeignKey(Events, on_delete=models.CASCADE, null=False)" has been fixed event = models.ForeignKey(Events, on_delete=models.SET_NULL, null=True, blank=True), accommodating changing/deleting of events to not effect this field (becomes set to null) and can be null or blank as not all games must have an associated event.

bilibilistack and others added 3 commits December 6, 2025 14:23
…ages-backend

Add backend changes of Itch Emed
… field and upload location, events foregein key can be empty or set to empty if event is removed, if isItch is true then hostURL is itch.io game id 7 digit
@bilibilistack
Copy link
Collaborator Author

@nicostellar Have you done anything about color adjustments on your own branch? We can use the global color now: #24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend Task must have a front end issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Individual game pages

5 participants