Repository navigation
Improve report a problem flow #2990 #3010
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,6 +20,18 @@ body: | |
| validations: | ||
| required: false | ||
|
|
||
| - type: input | ||
| id: resolution | ||
| attributes: | ||
| label: Game resolution | ||
| placeholder: e.g. 1920x1080 | ||
| description: > | ||
| If you report a problem from within the game, this will have been filled automatically with the current resolution. | ||
|
|
||
| You can change this if you are reporting a problem you saw in a different resolution. | ||
| validations: | ||
| required: false | ||
|
|
||
| - type: input | ||
| id: scene | ||
| attributes: | ||
|
|
@@ -35,6 +47,19 @@ body: | |
| validations: | ||
| required: false | ||
|
|
||
| - type: input | ||
| id: location | ||
| attributes: | ||
| label: Player location (X,Y) | ||
| placeholder: e.g. 0,0 | ||
| description: > | ||
| Provide the player's coordinates in the format `X,Y` (integers only, no spaces). If reporting from within the game, | ||
| this will have been filled automatically with the player's current location. | ||
|
|
||
| Leave blank if location is irrelevant to the issue. | ||
|
Comment on lines
+56
to
+59
Collaborator
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. This one too, nice explanation! |
||
| validations: | ||
| required: false | ||
|
|
||
| - type: textarea | ||
| id: about | ||
| attributes: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,4 +22,18 @@ func _on_pressed() -> void: | |
| if current_scene: | ||
| url += "&scene=" + current_scene.scene_file_path.uri_encode() | ||
|
|
||
| var game_resolution := DisplayServer.window_get_size() | ||
| if game_resolution: | ||
| url += "&resolution=" + ("%sx%s" % [game_resolution.x, game_resolution.y]) | ||
|
|
||
| var player := get_tree().get_first_node_in_group("player") | ||
| if player: | ||
| url += ( | ||
| "&location=" | ||
| + ( | ||
| ("%s,%s" % [player.get_global_position().x, player.get_global_position().y]) | ||
|
Collaborator
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. You can use the Also why is this Vector2 being encoded with Also you are doing custom formatting on each, the resolution Vector2 has a
Contributor
Author
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. The reason it is being url encoded is to do with the format. currently game_resolution only ever returns integers separated by an The format of player_location however contains a I can see how this might be confusing though. I'll amend to use default formatting as suggested.
Collaborator
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. Yes, consider that at one point we will want to decode them. So is easier to do the same for both. Something like: Which outputs:
Collaborator
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. @BFoster-BF actually, after reading some more it looks like it's better to use
Collaborator
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. @BFoster-BF use this for encoding: var s := "&resolution=" + var_to_str(Vector2(1920, 1080)).uri_encode()
prints(s)And we will be able to decode it like this in the future: var v: Vector2 = str_to_var(s.split("=")[1].uri_decode())
prints(v) |
||
| . uri_encode() | ||
| ) | ||
| ) | ||
|
|
||
| OS.shell_open(url) | ||
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.
Good explanation!