-
Notifications
You must be signed in to change notification settings - Fork 2
Issue 7 individual game pages frontend preview #25
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
base: main
Are you sure you want to change the base?
Conversation
…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
….io account the value is added
…ignment and spacing
…dersforcauses/game-dev into issue-7-Individual_game_pages-backend Pulling any changes from issue-7-Individual_game_pages
SafetyInObscurity
left a comment
There was a problem hiding this 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!
server/game_dev/models.py
Outdated
| 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) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
server/game_dev/models.py
Outdated
| 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) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
…ages-backend Add backend changes of Itch Emed
…g and layout responsive
… 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
…, contributors, and embed Itch.io game
…st ItchEmbed component styling
…dering and improve component structure
|
@nicostellar Have you done anything about color adjustments on your own branch? We can use the global color now: #24 |
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
EventsandGamesmodels toserver/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.0002_events_games.py) to add the newEventsandGamestables 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.
IndividualGamePagecomponent inclient/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)ItchEmbedcomponent toclient/src/components/ui/ItchEmbed.tsxfor embedding itch.io games with customizable dimensions and linking.Frontend: Configuration
next.config.mjsto allow images fromupload.wikimedia.orgso 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.
Explanation: (Only static frontend pages has been created and tested)
Other Information
[Is there anything in particular in the review that I should be aware of?]
Related issue