Skip to content

Comments

#51 Adds settings page with showTitleDescriptionOnGamePanel#124

Closed
Pacodastre wants to merge 7 commits intoDrop-OSS:developfrom
Pacodastre:show-title-description-setting-51
Closed

#51 Adds settings page with showTitleDescriptionOnGamePanel#124
Pacodastre wants to merge 7 commits intoDrop-OSS:developfrom
Pacodastre:show-title-description-setting-51

Conversation

@Pacodastre
Copy link
Contributor

@Pacodastre Pacodastre commented Jun 23, 2025

This PR adds support for the showTitleDescriptionOnGamePanel setting.

  1. 3 new API endpoints were created: getting/saving the settings and getting dummy data
  2. The dummy data endpoint returns the first game found in the database, if no games are found, a placeholder game will be shown as an example
  3. The dummy data is added to the database through a nitro plugin. The image file is loaded from a folder from the plugin directory. The data will not be reloaded when the plugin is run multiple times.
  4. The settings are saved on the ApplicationSetting schema. I created a new column for the setting. Not sure if this is the best implementation. This will mean that each setting has their own column, which can result in a lot of columns as the settings page will grow over time.
  5. I added a isHidden flag on the Game schema. I then added a filter in all game queries to exclude the hidden games (i.e the dummy game). The hidden image is only used for dummy data.
  6. I'm not the best when it comes to naming things. Please let me know if you have better a better name than showTitleDescriptionOnGamePanel or OptionWrapper.
  7. I added 2 new properties to the GamePanel component: showTitleDescriptionOnGamePanel and animate. The hover animation is disabled on the settings page as the animation didn't work very well with the OptionWrapper component.

@DecDuck
Copy link
Member

DecDuck commented Jun 24, 2025

I think you're missing some files or commits, because I can't find isHidden in the Prisma schema.

A couple of notes:

  • Can we rename isHidden to system, because we may, down the line, allow admins to hide games from users, whereas system games should also be hidden from admins.
  • Can we add an @default(false) to this definiton, so we don't have to specify it everywhere (if it isn't already specified).
  • Loading local files won't work when the application is built (the paths change). The best option may to be download a random image from Unsplash or put the placeholder image on a URL, like https://droposs.org/assets/default-game.png
  • Maybe we can rename "showTitleDescriptionOnGamePanel" to something like "showGamePanelTextDecoration"?

I'll do a full line-by-line review after

@Pacodastre
Copy link
Contributor Author

  • I deleted the dummy game and the nitro plugin.
  • I also removed the system column.
  • I made some changes to the GamePanel component to be able to render the placeholder image.
  • I renamed showTitleDescriptionOnGamePanel to showGamePanelTextDecoration.

I'm not sure why I'm getting the eslint errors. The keys that it's complaining about are being used on the settings page.

@DecDuck
Copy link
Member

DecDuck commented Jul 6, 2025

See #130

Sorry for not using this PR, I hate GitHub. Edit: you should still get credit for the commits as the author.

@DecDuck DecDuck closed this Jul 6, 2025
@Pacodastre Pacodastre deleted the show-title-description-setting-51 branch November 7, 2025 23:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Toggle for showing title & description overlay on store page

2 participants