Skip to content

[Feature]: Provide Protondb information on game page #2824

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

Merged
merged 5 commits into from
Jun 30, 2023

Conversation

kohend
Copy link
Contributor

@kohend kohend commented Jun 24, 2023

Support in getting compatibility information from ProtonDB
Tests pending approval of basic logic.


Use the following Checklist if you have changed something on the Backend or Frontend:

  • Tested the feature and it's working on a current and clean install.
  • Tested the main App features and they are still working on a current and clean install. (Login, Install, Play, Uninstall, Move games, etc.)
  • Created / Updated Tests (If necessary)
  • Created / Updated documentation (If necessary)

Copy link
Collaborator

@Nocccer Nocccer left a comment

Choose a reason for hiding this comment

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

Really good job. Left some comments. If you don't want to write tests i can do that for you. Whats left is also the frontend. We could do this maybe in a seperated PR.

@kohend kohend requested a review from Nocccer June 25, 2023 16:16
@kohend kohend marked this pull request as ready for review June 25, 2023 16:18
@Nocccer Nocccer changed the title Protondb [Feature]: Provide Protondb information on game page Jun 25, 2023
Copy link
Collaborator

@Nocccer Nocccer left a comment

Choose a reason for hiding this comment

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

I found one improvement and i have one concern about making the response of protondb api a type. I don't know if axios crashes if the response does not match the type. Can happen if the api response changes.

@kohend kohend requested a review from Nocccer June 29, 2023 20:07
@kohend
Copy link
Contributor Author

kohend commented Jun 29, 2023

I want to add the SteamDeck compatibility support fetch and then add the frontend support for both, but I preferred to have both APIs in separate commits since they are mostly separate file paths, and thus separate features.

@Nocccer
Copy link
Collaborator

Nocccer commented Jun 29, 2023

I want to add the SteamDeck compatibility support fetch and then add the frontend support for both, but I preferred to have both APIs in separate commits since they are mostly separate file paths, and thus separate features.

Feel free to make more small PR's. Easier for us to review fast.

@Nocccer Nocccer added the pr:ready-for-review Feature-complete, ready for the grind! :P label Jun 29, 2023
@Nocccer Nocccer requested review from a team, arielj, flavioislima, CommandMC and imLinguin and removed request for a team June 29, 2023 20:25
Copy link
Collaborator

@Nocccer Nocccer left a comment

Choose a reason for hiding this comment

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

LGTM. Still left some questions. Let's arrange this in another PR. Will merge this now.

@@ -1,4 +1,4 @@
import { ProtonDBInfo, ProtonDBCompatibilityInfo } from 'common/types'
import { ProtonDBCompatibilityInfo } from 'common/types'
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't like the name ProtonDBCompatibilityInfo for me ProtonDBInfo fits much more.
Just my opinion.

@@ -12,7 +12,7 @@ export async function getInfoFromProtonDB(
const url = `https://www.protondb.com/api/v1/reports/summaries/${steamID}.json`

const response = await axios
.get<ProtonDBInfo>(url, { headers: {} })
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't have knowledge about axios with types. My question in the first place was if it crashes if the response does not match the type or if it just ignores not fitting json values? Maybe you have experience here you can share?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just made it non-typed, it's much safer, and it handles a case where the field we want doesn't exist.

@Nocccer Nocccer merged commit 126d369 into Heroic-Games-Launcher:main Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:ready-for-review Feature-complete, ready for the grind! :P
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants